|
Line 0
Link Here
|
|
|
1 |
--- libraries/pear/HTML/Template/IT.php.orig 2020-01-19 18:03:01.000000000 +0100 |
| 2 |
+++ libraries/pear/HTML/Template/IT.php 2022-02-18 17:21:48.000000000 +0100 |
| 3 |
@@ -11,7 +11,7 @@ |
| 4 |
* with this package in the file LICENSE, and is available through |
| 5 |
* the world-wide-web at |
| 6 |
* http://www.opensource.org/licenses/bsd-license.php |
| 7 |
- * If you did not receive a copy of the new BSDlicense and are unable |
| 8 |
+ * If you did not receive a copy of the new BSD license and are unable |
| 9 |
* to obtain it through the world-wide-web, please send a note to |
| 10 |
* pajoye@php.net so we can mail you a copy immediately. |
| 11 |
* |
| 12 |
@@ -23,13 +23,12 @@ |
| 13 |
* @package HTML_Template_IT |
| 14 |
* @author Ulf Wendel <uw@netuse.de> |
| 15 |
* @license BSD http://www.opensource.org/licenses/bsd-license.php |
| 16 |
- * @version CVS: $Id: IT.php 3 2017-06-22 07:32:17Z martin $ |
| 17 |
+ * @version CVS: $Id$ |
| 18 |
* @link http://pear.php.net/packages/HTML_Template_IT |
| 19 |
* @access public |
| 20 |
*/ |
| 21 |
|
| 22 |
require_once 'PEAR.php'; |
| 23 |
-$myPEAR = new PEAR(); |
| 24 |
|
| 25 |
define('IT_OK', 1); |
| 26 |
define('IT_ERROR', -1); |
| 27 |
@@ -49,7 +48,7 @@ |
| 28 |
* one you can build. template::parse() [phplib template = Isotemplate] requests |
| 29 |
* you to name a source and a target where the current block gets parsed into. |
| 30 |
* Source and target can be block names or even handler names. This API gives you |
| 31 |
- * a maximum of fexibility but you always have to know what you do which is |
| 32 |
+ * a maximum of flexibility but you always have to know what you do which is |
| 33 |
* quite unusual for php skripter like me. |
| 34 |
* |
| 35 |
* I noticed that I do not any control on which block gets parsed into which one. |
| 36 |
@@ -279,9 +278,9 @@ |
| 37 |
* should be preserved although they are empty (no placeholder replaced). |
| 38 |
* Think of a shopping basket. If it's empty you have to drop a message to |
| 39 |
* the user. If it's filled you have to show the contents of |
| 40 |
- * the shopping baseket. Now where do you place the message that the basket |
| 41 |
+ * the shopping basket. Now where do you place the message that the basket |
| 42 |
* is empty? It's no good idea to place it in you applications as customers |
| 43 |
- * tend to like unecessary minor text changes. Having another template file |
| 44 |
+ * tend to like unnecessary minor text changes. Having another template file |
| 45 |
* for an empty basket means that it's very likely that one fine day |
| 46 |
* the filled and empty basket templates have different layout. I decided |
| 47 |
* to introduce blocks that to not contain any placeholder but only |
| 48 |
@@ -289,7 +288,7 @@ |
| 49 |
* |
| 50 |
* Now if there is no replacement done in such a block the block will |
| 51 |
* be recognized as "empty" and by default ($removeEmptyBlocks = true) be |
| 52 |
- * stripped off. To avoid thisyou can now call touchBlock() to avoid this. |
| 53 |
+ * stripped off. To avoid this you can now call touchBlock() to avoid this. |
| 54 |
* |
| 55 |
* The array $touchedBlocks stores a list of touched block which must not |
| 56 |
* be removed even if they are empty. |
| 57 |
@@ -301,14 +300,6 @@ |
| 58 |
var $touchedBlocks = array(); |
| 59 |
|
| 60 |
/** |
| 61 |
- * List of blocks which should not be shown even if not "empty" |
| 62 |
- * @var array $_hiddenBlocks |
| 63 |
- * @see hideBlock(), $removeEmptyBlocks |
| 64 |
- * @access private |
| 65 |
- */ |
| 66 |
- var $_hiddenBlocks = array(); |
| 67 |
- |
| 68 |
- /** |
| 69 |
* Variable cache. |
| 70 |
* |
| 71 |
* Variables get cached before any replacement is done. |
| 72 |
@@ -395,7 +386,7 @@ |
| 73 |
); |
| 74 |
|
| 75 |
/** |
| 76 |
- * Builds some complex regular expressions and optinally sets the |
| 77 |
+ * Builds some complex regular expressions and optionally sets the |
| 78 |
* file root directory. |
| 79 |
* |
| 80 |
* Make sure that you call this constructor if you derive your template |
| 81 |
@@ -408,7 +399,7 @@ |
| 82 |
* @see setRoot() |
| 83 |
* @access public |
| 84 |
*/ |
| 85 |
- function __construct($root = '', $options = null) |
| 86 |
+ function __construct($root = '', $options = null) |
| 87 |
{ |
| 88 |
if (!is_null($options)) { |
| 89 |
$this->setOptions($options); |
| 90 |
@@ -440,8 +431,7 @@ |
| 91 |
*/ |
| 92 |
function setOption($option, $value) |
| 93 |
{ |
| 94 |
- global $myPEAR; |
| 95 |
- switch ($option) { |
| 96 |
+ switch ($option) { |
| 97 |
case 'removeEmptyBlocks': |
| 98 |
$this->removeEmptyBlocks = $value; |
| 99 |
return IT_OK; |
| 100 |
@@ -452,7 +442,7 @@ |
| 101 |
return IT_OK; |
| 102 |
} |
| 103 |
|
| 104 |
- return $myPEAR->raiseError( |
| 105 |
+ return PEAR::raiseError( |
| 106 |
$this->errorMessage(IT_UNKNOWN_OPTION) . ": '{$option}'", |
| 107 |
IT_UNKNOWN_OPTION |
| 108 |
); |
| 109 |
@@ -472,12 +462,10 @@ |
| 110 |
*/ |
| 111 |
function setOptions($options) |
| 112 |
{ |
| 113 |
- global $myPEAR; |
| 114 |
if (is_array($options)) { |
| 115 |
foreach ($options as $option => $value) { |
| 116 |
$error = $this->setOption($option, $value); |
| 117 |
- if ($myPEAR->isError($error)) { |
| 118 |
- |
| 119 |
+ if (PEAR::isError($error)) { |
| 120 |
return $error; |
| 121 |
} |
| 122 |
} |
| 123 |
@@ -512,13 +500,12 @@ |
| 124 |
*/ |
| 125 |
function get($block = '__global__') |
| 126 |
{ |
| 127 |
- global $myPEAR; |
| 128 |
- if ($block == '__global__' && !$this->flagGlobalParsed) { |
| 129 |
+ if ($block == '__global__' && !$this->flagGlobalParsed) { |
| 130 |
$this->parse('__global__'); |
| 131 |
} |
| 132 |
|
| 133 |
if (!isset($this->blocklist[$block])) { |
| 134 |
- $this->err[] = $myPEAR->raiseError( |
| 135 |
+ $this->err[] = PEAR::raiseError( |
| 136 |
$this->errorMessage(IT_BLOCK_NOT_FOUND) . '"' . $block . "'", |
| 137 |
IT_BLOCK_NOT_FOUND |
| 138 |
); |
| 139 |
@@ -562,11 +549,10 @@ |
| 140 |
*/ |
| 141 |
function parse($block = '__global__', $flag_recursion = false) |
| 142 |
{ |
| 143 |
- global $myPEAR; |
| 144 |
- static $regs, $values; |
| 145 |
+ static $regs, $values; |
| 146 |
|
| 147 |
if (!isset($this->blocklist[$block])) { |
| 148 |
- return $myPEAR->raiseError( |
| 149 |
+ return PEAR::raiseError( |
| 150 |
$this->errorMessage(IT_BLOCK_NOT_FOUND) . '"' . $block . "'", |
| 151 |
IT_BLOCK_NOT_FOUND |
| 152 |
); |
| 153 |
@@ -754,7 +740,7 @@ |
| 154 |
/** |
| 155 |
* Sets a variable value. |
| 156 |
* |
| 157 |
- * The function can be used eighter like setVariable( "varname", "value") |
| 158 |
+ * The function can be used either like setVariable( "varname", "value") |
| 159 |
* or with one array $variables["varname"] = "value" |
| 160 |
* given setVariable($variables) quite like phplib templates set_var(). |
| 161 |
* |
| 162 |
@@ -791,9 +777,9 @@ |
| 163 |
*/ |
| 164 |
function setCurrentBlock($block = '__global__') |
| 165 |
{ |
| 166 |
- global $myPEAR; |
| 167 |
+ |
| 168 |
if (!isset($this->blocklist[$block])) { |
| 169 |
- return $myPEAR->raiseError( |
| 170 |
+ return PEAR::raiseError( |
| 171 |
$this->errorMessage(IT_BLOCK_NOT_FOUND) |
| 172 |
. '"' . $block . "'", |
| 173 |
IT_BLOCK_NOT_FOUND |
| 174 |
@@ -817,9 +803,8 @@ |
| 175 |
*/ |
| 176 |
function touchBlock($block) |
| 177 |
{ |
| 178 |
- global $myPEAR; |
| 179 |
- if (!isset($this->blocklist[$block])) { |
| 180 |
- return $myPEAR->raiseError( |
| 181 |
+ if (!isset($this->blocklist[$block])) { |
| 182 |
+ return PEAR::raiseError( |
| 183 |
$this->errorMessage(IT_BLOCK_NOT_FOUND) . '"' . $block . "'", |
| 184 |
IT_BLOCK_NOT_FOUND |
| 185 |
); |
| 186 |
@@ -876,7 +861,7 @@ |
| 187 |
/** |
| 188 |
* Sets the template. |
| 189 |
* |
| 190 |
- * You can eighter load a template file from disk with |
| 191 |
+ * You can either load a template file from disk with |
| 192 |
* LoadTemplatefile() or set the template manually using this function. |
| 193 |
* |
| 194 |
* @param string $template template content |
| 195 |
@@ -1009,7 +994,7 @@ |
| 196 |
} // end func getGlobalvariables |
| 197 |
|
| 198 |
/** |
| 199 |
- * Recusively builds a list of all blocks within the template. |
| 200 |
+ * Recursively builds a list of all blocks within the template. |
| 201 |
* |
| 202 |
* @param string $string string that gets scanned |
| 203 |
* |
| 204 |
@@ -1019,8 +1004,7 @@ |
| 205 |
*/ |
| 206 |
function findBlocks($string) |
| 207 |
{ |
| 208 |
- global $myPEAR; |
| 209 |
- $blocklist = array(); |
| 210 |
+ $blocklist = array(); |
| 211 |
|
| 212 |
if (preg_match_all($this->blockRegExp, $string, $regs, PREG_SET_ORDER)) { |
| 213 |
foreach ($regs as $k => $match) { |
| 214 |
@@ -1030,7 +1014,7 @@ |
| 215 |
if (isset($this->blocklist[$blockname])) { |
| 216 |
$msg = $this->errorMessage(IT_BLOCK_DUPLICATE, $blockname); |
| 217 |
|
| 218 |
- $this->err[] = $myPEAR->raiseError($msg, IT_BLOCK_DUPLICATE); |
| 219 |
+ $this->err[] = PEAR::raiseError($msg, IT_BLOCK_DUPLICATE); |
| 220 |
|
| 221 |
$this->flagBlocktrouble = true; |
| 222 |
} |
| 223 |
@@ -1073,15 +1057,14 @@ |
| 224 |
*/ |
| 225 |
function getFile($filename) |
| 226 |
{ |
| 227 |
- global $myPEAR; |
| 228 |
- if ($filename{0} == '/' && substr($this->fileRoot, -1) == '/') { |
| 229 |
+ if ($filename[0] == '/' && substr($this->fileRoot, -1) == '/') { |
| 230 |
$filename = substr($filename, 1); |
| 231 |
} |
| 232 |
|
| 233 |
$filename = $this->fileRoot . $filename; |
| 234 |
|
| 235 |
if (!($fh = @fopen($filename, 'r'))) { |
| 236 |
- $this->err[] = $myPEAR->raiseError( |
| 237 |
+ $this->err[] = PEAR::raiseError( |
| 238 |
$this->errorMessage(IT_TPL_NOT_FOUND) . ': "' .$filename .'"', |
| 239 |
IT_TPL_NOT_FOUND |
| 240 |
); |
| 241 |
@@ -1097,10 +1080,9 @@ |
| 242 |
$content = fread($fh, $fsize); |
| 243 |
fclose($fh); |
| 244 |
|
| 245 |
- // "#<!-- INCLUDE (.*) -->#ime", wma/PEAR error |
| 246 |
- return preg_replace( |
| 247 |
+ return preg_replace_callback( |
| 248 |
"#<!-- INCLUDE (.*) -->#im", |
| 249 |
- "\$this->getFile('\\1')", |
| 250 |
+ function ($m) { return $this->getFile($m[1]); }, |
| 251 |
$content |
| 252 |
); |
| 253 |
} // end func getFile |
| 254 |
@@ -1169,8 +1151,7 @@ |
| 255 |
*/ |
| 256 |
function errorMessage($value, $blockname = '') |
| 257 |
{ |
| 258 |
- global $myPEAR; |
| 259 |
- static $errorMessages; |
| 260 |
+ static $errorMessages; |
| 261 |
if (!isset($errorMessages)) { |
| 262 |
$errorMessages = array( |
| 263 |
IT_OK => '', |
| 264 |
@@ -1186,7 +1167,7 @@ |
| 265 |
); |
| 266 |
} |
| 267 |
|
| 268 |
- if ($myPEAR->isError($value)) { |
| 269 |
+ if (PEAR::isError($value)) { |
| 270 |
$value = $value->getCode(); |
| 271 |
} |
| 272 |
|
| 273 |
--- libraries/pear/HTML/Template/ITX.php.orig 2020-01-19 18:03:01.000000000 +0100 |
| 274 |
+++ libraries/pear/HTML/Template/ITX.php 2022-02-18 17:22:12.000000000 +0100 |
| 275 |
@@ -11,7 +11,7 @@ |
| 276 |
* with this package in the file LICENSE, and is available through |
| 277 |
* the world-wide-web at |
| 278 |
* http://www.opensource.org/licenses/bsd-license.php |
| 279 |
- * If you did not receive a copy of the new BSDlicense and are unable |
| 280 |
+ * If you did not receive a copy of the new BSD license and are unable |
| 281 |
* to obtain it through the world-wide-web, please send a note to |
| 282 |
* pajoye@php.net so we can mail you a copy immediately. |
| 283 |
* |
| 284 |
@@ -23,7 +23,7 @@ |
| 285 |
* @package HTML_Template_IT |
| 286 |
* @author Ulf Wendel <uw@netuse.de> |
| 287 |
* @license BSD http://www.opensource.org/licenses/bsd-license.php |
| 288 |
- * @version CVS: $Id: ITX.php 3 2017-06-22 07:32:17Z martin $ |
| 289 |
+ * @version CVS: $Id$ |
| 290 |
* @link http://pear.php.net/packages/HTML_Template_IT |
| 291 |
* @access public |
| 292 |
*/ |
| 293 |
@@ -36,7 +36,7 @@ |
| 294 |
* |
| 295 |
* With this class you get the full power of the phplib template class. |
| 296 |
* You may have one file with blocks in it but you have as well one main file |
| 297 |
-* and multiple files one for each block. This is quite usefull when you have |
| 298 |
+* and multiple files one for each block. This is quite useful when you have |
| 299 |
* user configurable websites. Using blocks not in the main template allows |
| 300 |
* you to modify some parts of your layout easily. |
| 301 |
* |
| 302 |
@@ -136,7 +136,7 @@ |
| 303 |
* @access public |
| 304 |
* @see HTML_Template_IT() |
| 305 |
*/ |
| 306 |
- function HTML_Template_ITX($root = '') |
| 307 |
+ function __construct($root = '') |
| 308 |
{ |
| 309 |
|
| 310 |
$this->checkblocknameRegExp = '@' . $this->blocknameRegExp . '@'; |
| 311 |
@@ -144,7 +144,7 @@ |
| 312 |
$this->functionRegExp = '@' . $this->functionPrefix . '(' . |
| 313 |
$this->functionnameRegExp . ')\s*\(@sm'; |
| 314 |
|
| 315 |
- $this->HTML_Template_IT($root); |
| 316 |
+ parent::__construct($root); |
| 317 |
} // end func constructor |
| 318 |
|
| 319 |
/** |
| 320 |
@@ -173,7 +173,7 @@ |
| 321 |
* Replaces an existing block with new content. |
| 322 |
* |
| 323 |
* This function will replace a block of the template and all blocks |
| 324 |
- * contained in the replaced block and add a new block insted, means |
| 325 |
+ * contained in the replaced block and add a new block instead, means |
| 326 |
* you can dynamically change your template. |
| 327 |
* |
| 328 |
* Note that changing the template structure violates one of the IT[X] |
| 329 |
@@ -311,7 +311,7 @@ |
| 330 |
} elseif (count($parents) > 1) { |
| 331 |
|
| 332 |
reset($parents); |
| 333 |
- while (list($k, $parent) = each($parents)) { |
| 334 |
+ foreach ($parents as $k => $parent) { |
| 335 |
$msg .= "$parent, "; |
| 336 |
} |
| 337 |
$msg = substr($parent, -2); |
| 338 |
@@ -373,7 +373,7 @@ |
| 339 |
* |
| 340 |
* @return string Name of the (first) block that contains |
| 341 |
* the specified placeholder. |
| 342 |
- * If the placeholder was not found or an error occured |
| 343 |
+ * If the placeholder was not found or an error occurred |
| 344 |
* an empty string is returned. |
| 345 |
* @throws IT_Error |
| 346 |
* @access public |
| 347 |
@@ -397,7 +397,7 @@ |
| 348 |
if (is_array($variables = $this->blockvariables[$block])) { |
| 349 |
// search the value in the list of blockvariables |
| 350 |
reset($variables); |
| 351 |
- while (list($k, $variable) = each($variables)) { |
| 352 |
+ foreach ($variables as $k => $variable) { |
| 353 |
if ($k == $placeholder) { |
| 354 |
$found = $block; |
| 355 |
break; |
| 356 |
@@ -409,7 +409,7 @@ |
| 357 |
// search all blocks and return the name of the first block that |
| 358 |
// contains the placeholder |
| 359 |
reset($this->blockvariables); |
| 360 |
- while (list($blockname, $variables) = each($this->blockvariables)) { |
| 361 |
+ foreach ($this->blockvariables as $blockname => $variables) { |
| 362 |
if (is_array($variables) && isset($variables[$placeholder])) { |
| 363 |
$found = $blockname; |
| 364 |
break; |
| 365 |
@@ -430,7 +430,7 @@ |
| 366 |
function performCallback() |
| 367 |
{ |
| 368 |
reset($this->functions); |
| 369 |
- while (list($func_id, $function) = each($this->functions)) { |
| 370 |
+ foreach ($this->functions as $func_id => $function) { |
| 371 |
if (isset($this->callback[$function['name']])) { |
| 372 |
if ($this->callback[$function['name']]['expandParameters']) { |
| 373 |
$callFunction = 'call_user_func_array'; |
| 374 |
@@ -493,7 +493,7 @@ |
| 375 |
* |
| 376 |
* This is an absolutely evil feature. If your application makes heavy |
| 377 |
* use of such callbacks and you're even implementing if-then etc. on |
| 378 |
- * the level of a template engine you're reiventing the wheel... - that's |
| 379 |
+ * the level of a template engine you're reinventing the wheel... - that's |
| 380 |
* actually how PHP came into life. Anyway, sometimes it's handy. |
| 381 |
* |
| 382 |
* Consider also using XML/XSLT or native PHP. And please do not push |
| 383 |
@@ -528,7 +528,7 @@ |
| 384 |
* @return boolean False on failure. |
| 385 |
* @throws IT_Error |
| 386 |
* @access public |
| 387 |
- * @deprecated The $callbackobject parameter is depricated since |
| 388 |
+ * @deprecated The $callbackobject parameter is deprecated since |
| 389 |
* version 1.2 and might be dropped in further versions. |
| 390 |
*/ |
| 391 |
function setCallbackFunction($tplfunction, $callbackfunction, |
| 392 |
@@ -536,7 +536,7 @@ |
| 393 |
$expandCallbackParameters = false) { |
| 394 |
if ($tplfunction == '' || $callbackfunction == '') { |
| 395 |
return new IT_Error("No template function "."('$tplfunction')". |
| 396 |
- " and/or no callback function ('$callback') given.", |
| 397 |
+ " and/or no callback function ('$callbackfunction') given.", |
| 398 |
__FILE__, __LINE__); |
| 399 |
} |
| 400 |
$this->callback[$tplfunction] = array( |
| 401 |
@@ -567,7 +567,7 @@ |
| 402 |
} // end func setCallbackFunctiontable |
| 403 |
|
| 404 |
/** |
| 405 |
- * Recursively removes all data assiciated with a block, including |
| 406 |
+ * Recursively removes all data associated with a block, including |
| 407 |
* all inner blocks |
| 408 |
* |
| 409 |
* @param string $block block to be removed |
| 410 |
@@ -610,7 +610,7 @@ |
| 411 |
} // end func getBlocklist |
| 412 |
|
| 413 |
/** |
| 414 |
- * Checks wheter a block exists. |
| 415 |
+ * Checks whether a block exists. |
| 416 |
* |
| 417 |
* @param string $blockname Blockname |
| 418 |
* |
| 419 |
@@ -647,7 +647,7 @@ |
| 420 |
} // end func getBlockvariables |
| 421 |
|
| 422 |
/** |
| 423 |
- * Checks wheter a block variable exists. |
| 424 |
+ * Checks whether a block variable exists. |
| 425 |
* |
| 426 |
* @param string $block Blockname |
| 427 |
* @param string $variable Variablename |
| 428 |
@@ -712,7 +712,7 @@ |
| 429 |
} // end func buildFunctionlist |
| 430 |
|
| 431 |
/** |
| 432 |
- * Truncates the given code from the first occurence of |
| 433 |
+ * Truncates the given code from the first occurrence of |
| 434 |
* $delimiter but ignores $delimiter enclosed by " or '. |
| 435 |
* |
| 436 |
* @param string $code The code which should be parsed |
| 437 |
@@ -782,7 +782,7 @@ |
| 438 |
} |
| 439 |
|
| 440 |
reset($this->blockvariables[$block]); |
| 441 |
- while (list($varname, $val) = each($this->blockvariables[$block])) { |
| 442 |
+ foreach ($this->blockvariables[$block] as $varname => $val) { |
| 443 |
if (isset($variables[$varname])) { |
| 444 |
unset($this->blockvariables[$block][$varname]); |
| 445 |
} |
| 446 |
@@ -840,10 +840,10 @@ |
| 447 |
{ |
| 448 |
$parents = array(); |
| 449 |
reset($this->blocklist); |
| 450 |
- while (list($blockname, $content) = each($this->blocklist)) { |
| 451 |
+ foreach ($this->blocklist as $blockname => $content) { |
| 452 |
reset($this->blockvariables[$blockname]); |
| 453 |
|
| 454 |
- while (list($varname, $val) = each($this->blockvariables[$blockname])) { |
| 455 |
+ foreach ($this->blockvariables[$blockname] as $varname => $val) { |
| 456 |
if ($variable == $varname) { |
| 457 |
$parents[] = $blockname; |
| 458 |
} |
| 459 |
@@ -858,8 +858,8 @@ |
| 460 |
* calls die() depending on the flags |
| 461 |
* |
| 462 |
* @param string $message Warning |
| 463 |
- * @param string $file File where the warning occured |
| 464 |
- * @param int $line Linenumber where the warning occured |
| 465 |
+ * @param string $file File where the warning occurred |
| 466 |
+ * @param int $line Linenumber where the warning occurred |
| 467 |
* |
| 468 |
* @see $warn, $printWarning, $haltOnWarning |
| 469 |
* @access private |
| 470 |
--- libraries/pear/HTML/Template/IT_Error.php 2020-01-19 18:03:01.000000000 +0100 |
| 471 |
+++ libraries/pear/HTML/Template/IT_Error.php 2022-02-18 17:22:29.000000000 +0100 |
| 472 |
@@ -11,7 +11,7 @@ |
| 473 |
* with this package in the file LICENSE, and is available through |
| 474 |
* the world-wide-web at |
| 475 |
* http://www.opensource.org/licenses/bsd-license.php |
| 476 |
- * If you did not receive a copy of the new BSDlicense and are unable |
| 477 |
+ * If you did not receive a copy of the new BSD license and are unable |
| 478 |
* to obtain it through the world-wide-web, please send a note to |
| 479 |
* pajoye@php.net so we can mail you a copy immediately. |
| 480 |
* |
| 481 |
@@ -23,7 +23,7 @@ |
| 482 |
* @package HTML_Template_IT |
| 483 |
* @author Ulf Wendel <uw@netuse.de> |
| 484 |
* @license BSD http://www.opensource.org/licenses/bsd-license.php |
| 485 |
- * @version CVS: $Id: IT_Error.php 3 2017-06-22 07:32:17Z martin $ |
| 486 |
+ * @version CVS: $Id$ |
| 487 |
* @link http://pear.php.net/packages/HTML_Template_IT |
| 488 |
* @access public |
| 489 |
*/ |
| 490 |
@@ -53,10 +53,10 @@ |
| 491 |
* Creates an cache error object. |
| 492 |
* |
| 493 |
* @param string $msg error message |
| 494 |
- * @param string $file file where the error occured |
| 495 |
- * @param string $line linenumber where the error occured |
| 496 |
+ * @param string $file file where the error occurred |
| 497 |
+ * @param string $line linenumber where the error occurred |
| 498 |
*/ |
| 499 |
- function IT_Error($msg, $file = __FILE__, $line = __LINE__) |
| 500 |
+ function __construct($msg, $file = __FILE__, $line = __LINE__) |
| 501 |
{ |
| 502 |
$this->PEAR_Error(sprintf("%s [%s on line %d].", $msg, $file, $line)); |
| 503 |
} // end func IT_Error |