Removing deprecated references and files
This commit is contained in:
@@ -216,7 +216,6 @@ class PMPluginRegistry
|
||||
*/
|
||||
public function disablePlugin($sNamespace, $eventPlugin = 1)
|
||||
{
|
||||
//require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
$sw = false;
|
||||
//G::pr($this->_aPluginDetails);die;
|
||||
foreach ($this->_aPluginDetails as $namespace => $detail) {
|
||||
@@ -898,7 +897,7 @@ class PMPluginRegistry
|
||||
$classFile = '';
|
||||
|
||||
foreach ($this->_aFolders as $row => $folder) {
|
||||
$fname = $folder->sNamespace == 'enterprise' ? PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folder->sFolderName . '.php' : PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
$fname = PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
if ($detail->sNamespace == $folder->sNamespace && file_exists($fname)) {
|
||||
$found = true;
|
||||
$classFile = $fname;
|
||||
@@ -934,7 +933,7 @@ class PMPluginRegistry
|
||||
if ($triggerId == $detail->sTriggerId) {
|
||||
//review all folders registered for this namespace
|
||||
foreach ($this->_aFolders as $row => $folder) {
|
||||
$fname = $folder->sNamespace == 'enterprise' ? PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folder->sFolderName . '.php' : PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
$fname = PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
if ($detail->sNamespace == $folder->sNamespace && file_exists($fname)) {
|
||||
$found = true;
|
||||
}
|
||||
@@ -1068,7 +1067,7 @@ class PMPluginRegistry
|
||||
if (isset($detail->enabled) && $detail->enabled) {
|
||||
if (!empty($detail->sFilename) && file_exists($detail->sFilename)) {
|
||||
$arrayFileInfo = pathinfo($detail->sFilename);
|
||||
$sFilename = (($detail->sNamespace == "enterprise") ? PATH_CORE . "methods" . PATH_SEP . "enterprise" . PATH_SEP : PATH_PLUGINS) . $arrayFileInfo["basename"];
|
||||
$sFilename = PATH_PLUGINS . $arrayFileInfo["basename"];
|
||||
if (!file_exists($sFilename)) {
|
||||
continue;
|
||||
}
|
||||
@@ -1082,7 +1081,6 @@ class PMPluginRegistry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->eevalidate();
|
||||
return $iPlugins;
|
||||
} catch (Exception $e) {
|
||||
global $G_PUBLISH;
|
||||
@@ -1161,22 +1159,6 @@ class PMPluginRegistry
|
||||
return $this->executeMethod($sNamespace, 'updateFieldsForPageSetup', $oData);
|
||||
}
|
||||
|
||||
public function eevalidate()
|
||||
{
|
||||
$fileL = PATH_DATA_SITE . 'license.dat';
|
||||
$fileS = PATH_DATA . 'license.dat';
|
||||
if ((file_exists($fileL)) || (file_exists($fileS))) {
|
||||
//Found a License
|
||||
if (class_exists('pmLicenseManager')) {
|
||||
$sSerializedFile = PATH_DATA_SITE . 'lmn.singleton';
|
||||
$pmLicenseManagerO = PmLicenseManager::getSingleton();
|
||||
if (file_exists($sSerializedFile)) {
|
||||
$pmLicenseManagerO->unSerializeInstance(file_get_contents($sSerializedFile));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a toolbar for dynaform editor in the singleton
|
||||
*
|
||||
@@ -1740,26 +1722,6 @@ class PMPluginRegistry
|
||||
return $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the plugin name is Enterprise Plugin
|
||||
*
|
||||
* @param string $pluginName Plugin name
|
||||
* @param string $path Path to plugin
|
||||
*
|
||||
* @return bool Returns TRUE when plugin name is Enterprise Plugin, FALSE otherwise
|
||||
*/
|
||||
public function isEnterprisePlugin($pluginName, $path = null)
|
||||
{
|
||||
$path = (!is_null($path) && $path != '') ? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$pluginFile = $pluginName . '.php';
|
||||
|
||||
//Return
|
||||
return preg_match(
|
||||
'/^.*class\s+' . $pluginName . 'Plugin\s+extends\s+(?:enterprisePlugin)\s*\{.*$/i',
|
||||
str_replace(["\n", "\r", "\t"], ' ', file_get_contents($path . $pluginFile))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registry in an array routes for js or css files.
|
||||
* @param type $pluginName
|
||||
|
||||
Reference in New Issue
Block a user