Some fixes to avoid status error 500 when it should return 404

- Another thing to consider, the right enabling/disabling feature must be placed as following:

    -----

    class erikPlugin extends PMPlugin
    {

      ...

      public function enable()
      {
          $this->enableRestService(true);
      }

      public function disable()
      {
          $this->enableRestService(false);
      }

    }
This commit is contained in:
Erik
2015-04-28 08:12:04 -05:00
parent 2534325405
commit 2a4b59f71f

View File

@@ -1415,12 +1415,12 @@ class PMPluginRegistry
"filepath" => $classFile,
"namespace" => $ns
);
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
}
}
}
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
return true;
}
@@ -1432,6 +1432,7 @@ class PMPluginRegistry
public function unregisterRestService ($sNamespace)
{
unset($this->_restServices[$sNamespace]);
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
}
public function getRegisteredRestServices()