From: Ævar Arnfjörð Bjarmason Date: Mon, 27 Jun 2005 08:23:22 +0000 (+0000) Subject: * Removed a comment, "FIXME require in a foreach", require_once() will be X-Git-Tag: 1.5.0beta2~176 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=e34aa50e1321a6912287ba4e938854f4d707d594;p=lhc%2Fweb%2Fwiklou.git * Removed a comment, "FIXME require in a foreach", require_once() will be evaluated exactly once during execution (it has an effect similar to the static keyword), do demonstrate this behaviour run the code for ($i = 0; $i < 10; ++$i) require("file.txt"); in a directory that has a file called 'file.txt' and then change require() to require_once(); --- diff --git a/includes/Parser.php b/includes/Parser.php index 435196480c..2dbc4e955e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -396,7 +396,7 @@ class Parser # gallery $text = Parser::extractTags('gallery', $text, $gallery_content, $uniq_prefix); foreach( $gallery_content as $marker => $content ) { - require_once( 'ImageGallery.php' ); // FIXME require in a foreach ? + require_once( 'ImageGallery.php' ); if ( $render ) { $gallery_content[$marker] = Parser::renderImageGallery( $content ); } else {