Last modified: 2013-07-23 21:14:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52987, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50987 - Use $dir instead of __DIR__
Use $dir instead of __DIR__
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
BookManagerv2 (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Molly White
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 23:04 UTC by Molly White
Modified: 2013-07-23 21:14 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Molly White 2013-07-08 23:04:29 UTC
In BookManagerv2.php, use $dir instead of __DIR__ for slight optimization.
Comment 1 Sam Reed (reedy) 2013-07-08 23:25:19 UTC
(In reply to comment #0)
> In BookManagerv2.php, use $dir instead of __DIR__ for slight optimization.

Eh?
Comment 2 Molly White 2013-07-08 23:30:34 UTC
I've been told that

$dir = __DIR__;
$wgAutoloadClasses += array(
'BookManagerv2Hooks' => $dir . '/BookManagerv2.hooks.php',
...

is slightly better than using __DIR__ each time. Is that not the case?
Comment 3 Sam Reed (reedy) 2013-07-08 23:37:54 UTC
(In reply to comment #2)
> is slightly better than using __DIR__ each time. Is that not the case?

It would seem very likely. The bug title/initial comment wasn't very clear as to what you were trying to achieve.
Comment 4 Gerrit Notification Bot 2013-07-08 23:50:38 UTC
Change 72660 had a related patch set uploaded by Mollywhite:
Bug 50987: Use a directory variable instead of calling repeatedly.

https://gerrit.wikimedia.org/r/72660
Comment 5 Gerrit Notification Bot 2013-07-08 23:54:37 UTC
Change 72660 merged by Mollywhite:
Bug 50987: Use a directory variable instead of calling repeatedly.

https://gerrit.wikimedia.org/r/72660
Comment 6 Molly White 2013-07-09 19:01:56 UTC
Patched, but then was informed that this is not a good approach. After reading the comments on the patch (https://gerrit.wikimedia.org/r/#/c/72660/), I changed it back.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links