Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make blocked modules a globally accessible variable

as suggested by review
  • Loading branch information...
commit 82eec8f725ff0911cc3500e5ea5fe2fc3608674b 1 parent 6a0c857
@exi exi authored
View
5 phprojekt/application/Default/Controllers/JsController.php
@@ -338,8 +338,9 @@ private function _processModuleDirectory($path)
$output = "";
$files = scandir($path);
foreach ($files as $file) {
- if ($file != '.' && $file != '..' && $file != 'Default' && $file != 'Calendar'
- && is_dir($path . '/' . $file . '/Views')) {
+ if ($file != '.' && $file != '..' && $file != 'Default' &&
+ !in_array($file, Phprojekt::getInstance()->getBlockedModuleNames()) &&
+ is_dir($path . '/' . $file . '/Views')) {
if (is_dir($path . $file . '/Views/dojo/scripts/')) {
$scripts = scandir($path . $file . '/Views/dojo/scripts/');
} else {
View
17 phprojekt/library/Phprojekt.php
@@ -120,6 +120,13 @@ class Phprojekt
protected $_view;
/**
+ * Array of blocked Modules.
+ *
+ * @var Array
+ */
+ protected $_blockedModules = array("Calendar");
+
+ /**
* Returns the current version of PHProjekt.
*
* @return string The current version.
@@ -1017,6 +1024,16 @@ public static function checkExtensionsAndSettings()
'recommendations' => $recommendations);
}
+ /**
+ * Returns a list of modules that should be blocked explicitely.
+ *
+ * @return array Array of bocked module names
+ */
+ public function getBlockedModuleNames()
+ {
+ return $this->_blockedModules;
+ }
+
private function _dieWithInternalServerError()
{
$response = new Zend_Controller_Response_Http();
Please sign in to comment.
Something went wrong with that request. Please try again.