public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
yet another dumb mistake


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4433 
3d254a34-79dc-0310-9e5f-be208747d8a0
calguy1000 (author)
Fri Apr 11 16:31:24 -0700 2008
commit  74633589c3802907a274d78cccd8d65c7700072c
tree    b4de20cae3fcb62762e9bf07c7ce98491b773042
parent  75b192760df82f0bba49b68128ae628a069ea94a
...
137
138
139
 
140
141
142
...
137
138
139
140
141
142
143
0
@@ -137,6 +137,7 @@ class CmsApplication extends CmsObject
0
     $this->variables['pluginnum'] = 1;
0
     
0
     #Setup hash for storing all modules and plugins
0
+ $this->coremodules = array('UserAdmin','MenuManager');
0
     $this->cmsmodules = array();
0
     $this->userplugins = array();
0
     $this->userpluginfunctions = array();
...
677
678
679
680
 
 
 
 
 
 
681
682
683
...
782
783
784
785
 
786
787
788
...
677
678
679
 
680
681
682
683
684
685
686
687
688
...
787
788
789
 
790
791
792
793
0
@@ -677,7 +677,12 @@ abstract class CmsModuleBase extends CmsObject
0
   {
0
     return FALSE;
0
   }
0
-
0
+
0
+ final public function is_core()
0
+ {
0
+ return CmsModuleOperations::is_core($this->get_name());
0
+ }
0
+
0
   final public function is_installable()
0
   {
0
     $gCms = cmsms();
0
@@ -782,7 +787,7 @@ abstract class CmsModuleBase extends CmsObject
0
   
0
   final public function is_uninstallable()
0
   {
0
- return !$this->check_for_dependents();
0
+ return !$this->check_for_dependents() && !$this->is_core();
0
   }
0
   
0
   public function drop_table($table)
...
38
39
40
 
 
 
 
41
42
43
...
94
95
96
 
 
 
 
 
 
 
 
 
 
97
98
99
...
38
39
40
41
42
43
44
45
46
47
...
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
0
@@ -38,6 +38,10 @@ class CmsModuleOperations extends CmsObject
0
   var $error;
0
 
0
   /**
0
+ * A member to hold a list of core module names
0
+ */
0
+
0
+ /**
0
   * A member to hold the id of the active tab
0
   */
0
   var $mActiveTab = '';
0
@@ -94,6 +98,16 @@ class CmsModuleOperations extends CmsObject
0
   }
0
   
0
   /**
0
+ * Returns wether or not a module is a 'core' module or not
0
+ *
0
+ * @param string Name of the module
0
+ */
0
+ public static function is_core($module_name)
0
+ {
0
+ return in_array($module_name,cmsms()->coremodules);
0
+ }
0
+
0
+ /**
0
    * Returns the module object if it is installed and active.
0
    *
0
    * @param string Name of the module

Comments

    No one has commented yet.