Ejemplo n.º 1
0
 public static function onRegistration()
 {
     global $wgExtensionFunctions, $wgAPIModules;
     // Register our API Ajax handler
     $wgAPIModules['jqu'] = 'ApijQueryUpload';
     // Create a singleton instance
     self::$instance = new self();
     $wgExtensionFunctions[] = array(self::$instance, 'setup');
     // If the query-string arg mwaction is supplied, rename action and change mwaction to action
     // - this hack was required because the jQueryUpload module uses the name "action" too
     if (array_key_exists('mwaction', $_REQUEST)) {
         self::$action = array_key_exists('action', $_REQUEST) ? $_REQUEST['action'] : false;
         $_REQUEST['action'] = $_GET['action'] = $_POST['action'] = 'jqu';
     }
 }