Adamw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/61480


Change subject: autoloader paths were wonky
......................................................................

autoloader paths were wonky

Change-Id: I853e5e942763c46bcc483c3dd56709e481f5247d
---
M SmashPig/Core/AutoLoader.php
M SmashPig/PublicHttp/smashpig_http_handler.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners 
refs/changes/80/61480/1

diff --git a/SmashPig/Core/AutoLoader.php b/SmashPig/Core/AutoLoader.php
index 4cd6644..b1e8912 100644
--- a/SmashPig/Core/AutoLoader.php
+++ b/SmashPig/Core/AutoLoader.php
@@ -15,6 +15,7 @@
      * Installs the SmashPig AutoLoader into the class loader chain.
      *
      * @param $defaultPath The path to the SmashPig library.
+     * FIXME: this is sensitive to the final "/", requiring it.
      *
      * @return bool True if install was successful. False if the AutoLoader 
was already installed.
      */
diff --git a/SmashPig/PublicHttp/smashpig_http_handler.php 
b/SmashPig/PublicHttp/smashpig_http_handler.php
index 21f010d..346c126 100644
--- a/SmashPig/PublicHttp/smashpig_http_handler.php
+++ b/SmashPig/PublicHttp/smashpig_http_handler.php
@@ -8,8 +8,9 @@
 if ( !defined( "SMASHPIG_ENTRY_POINT" ) ) {
        define( "SMASHPIG_ENTRY_POINT", $file );
 
-       require_once( './Core/AutoLoader.php' );
-       AutoLoader::installSmashPigAutoLoader( './' );
+       $smashPigBaseDir = __DIR__ . '/../';
+       require_once( $smashPigBaseDir . "Core/AutoLoader.php" );
+       AutoLoader::installSmashPigAutoLoader( $smashPigBaseDir );
 
        RequestHandler::process();
 } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/61480
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I853e5e942763c46bcc483c3dd56709e481f5247d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to