X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-includes/atomlib.php diff --git a/wp-includes/atomlib.php b/wp-includes/atomlib.php index 9c2335c6..271635fe 100644 --- a/wp-includes/atomlib.php +++ b/wp-includes/atomlib.php @@ -1,13 +1,13 @@ - * @version: 0.4 - * @since 2.3 + * @author Elias Torres + * @version 0.4 + * @since 2.3.0 */ /** @@ -87,7 +87,10 @@ class AtomParser { var $feed; var $current; - function AtomParser() { + /** + * PHP5 constructor. + */ + function __construct() { $this->feed = new AtomFeed(); $this->current = null; @@ -95,6 +98,13 @@ class AtomParser { $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";'); } + /** + * PHP4 constructor. + */ + public function AtomParser() { + self::__construct(); + } + function _p($msg) { if($this->debug) { print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n"; @@ -130,9 +140,10 @@ class AtomParser { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { - trigger_error(sprintf(__('XML error: %s at line %d')."\n", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); + /* translators: 1: error message, 2: line number */ + trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", + xml_error_string(xml_get_error_code($parser)), + xml_get_current_line_number($parser))); $ret = false; break; } @@ -350,5 +361,3 @@ class AtomParser { $string ); } } - -?>