BUG 10459 I added validate to plugin disabled IMPROVEMENT
This commit is contained in:
@@ -347,16 +347,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
}
|
||||
}
|
||||
|
||||
private static function setIncludePath ()
|
||||
{
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginsDashlets = $oPluginRegistry->getDashlets();
|
||||
foreach ($pluginsDashlets as $pluginDashlet) {
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . PATH_PLUGINS . $pluginDashlet . PATH_SEP );
|
||||
}
|
||||
}
|
||||
|
||||
private static function verifyPluginDashlet ($className)
|
||||
public static function verifyPluginDashlet ($className)
|
||||
{
|
||||
// 1-- if name class is in core
|
||||
$fileExist = PATH_CORE . 'classes' . PATH_SEP . 'class.' . $className . '.php';
|
||||
@@ -372,7 +363,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
$pluginsDashlets = $oPluginRegistry->getDashlets();
|
||||
|
||||
foreach ($pluginsDashlets as $pluginDashlet) {
|
||||
$fileExist = PATH_PLUGINS . $pluginDashlet . PATH_SEP . $pluginDashlet . PATH_SEP . 'classes' . PATH_SEP . 'class.' . $className . '.php';
|
||||
$fileExist = PATH_PLUGINS . $pluginDashlet . PATH_SEP . 'classes' . PATH_SEP . 'class.' . $className . '.php';
|
||||
if (file_exists($fileExist)) {
|
||||
$pluginName = $pluginDashlet;
|
||||
break;
|
||||
@@ -402,4 +393,13 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static function setIncludePath ()
|
||||
{
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginsDashlets = $oPluginRegistry->getDashlets();
|
||||
foreach ($pluginsDashlets as $pluginDashlet) {
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . PATH_PLUGINS . $pluginDashlet . PATH_SEP );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,6 +425,7 @@ class Dashboard extends Controller
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria->addSelectColumn( DashletPeer::DAS_UID );
|
||||
$criteria->addSelectColumn( DashletPeer::DAS_TITLE );
|
||||
$criteria->addSelectColumn( DashletPeer::DAS_CLASS );
|
||||
//ORDER BY
|
||||
$criteria->addAscendingOrderByColumn( DashletPeer::DAS_TITLE );
|
||||
|
||||
@@ -432,8 +433,9 @@ class Dashboard extends Controller
|
||||
$dataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$dataset->next();
|
||||
while ($row = $dataset->getRow()) {
|
||||
$dashlets[] = array ($row['DAS_UID'],$row['DAS_TITLE']
|
||||
);
|
||||
if ($this->pmDashlet->verifyPluginDashlet($row['DAS_CLASS'])) {
|
||||
$dashlets[] = array ($row['DAS_UID'],$row['DAS_TITLE']);
|
||||
}
|
||||
$dataset->next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user