Dereckson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/245466
Change subject: Avoid function call in a for loop
......................................................................
Avoid function call in a for loop
Change-Id: I971d0842bb47b799db9da82fb0f0e6123c7f0b67
---
M Git2Pages.body.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Git2Pages
refs/changes/66/245466/1
diff --git a/Git2Pages.body.php b/Git2Pages.body.php
index 8887e4b..1dc986f 100644
--- a/Git2Pages.body.php
+++ b/Git2Pages.body.php
@@ -58,10 +58,10 @@
*/
public static function PullContentFromRepo( $parser ) {
global $wgGit2PagesDataDir;
- $opts = array();
- for ( $i = 1; $i < func_num_args(); $i++ ) {
- $opts[] = func_get_arg( $i );
- }
+
+ $opts = func_get_args();
+ array_shift( $opts );
+
$options = self::extractOptions( $opts );
$url = $options['repository'];
if ( isset( $options['branch'] ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/245466
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I971d0842bb47b799db9da82fb0f0e6123c7f0b67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Git2Pages
Gerrit-Branch: master
Gerrit-Owner: Dereckson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits