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
Search Repo:
Moved CallUserTags and ListUserTags to UserTags class and make module API 
wrappers

git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@2921 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Wed Jun 14 16:05:37 -0700 2006
commit  14b64294b19b3c35ab48785f74418673fe22c5e6
tree    a748b0e90bf3c63e826d9272df150f66dbcfd760
parent  340868bdd271411d2a668bf77c5e2db39df9caea
...
121
122
123
124
 
125
126
127
...
121
122
123
 
124
125
126
127
0
@@ -121,7 +121,7 @@ class Events
0
       {
0
         if( isset( $row['tag_name'] ) && $row['tag_name'] != '' )
0
         {
0
- $this->CallUserTag( $row['tag_name'], $params );
0
+ UserTags::CallUserTag( $row['tag_name'], $params );
0
         }
0
         else if( isset( $row['module_name'] ) && $row['module_name'] != '' )
0
         {
...
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
 
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
 
2935
2936
2937
...
2900
2901
2902
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2903
2904
2905
2906
2907
 
 
 
 
 
 
 
 
 
 
 
 
 
2908
2909
2910
2911
0
@@ -2900,38 +2900,12 @@ class CMSModule
0
   
0
   function ListUserTags()
0
   {
0
- global $gCms;
0
- $db =& $this->GetDb();
0
-
0
- $plugins = array();
0
-
0
- $query = 'SELECT userplugin_name FROM '.cms_db_prefix().'userplugins ORDER BY userplugin_name';
0
- $result = &$db->Execute($query);
0
-
0
- while ($result && !$result->EOF)
0
- {
0
- $plugins[$result->fields['userplugin_name']] =& $result->fields['userplugin_name'];
0
- $result->MoveNext();
0
- }
0
-
0
- return $plugins;
0
+ return UserTags::ListUserTags();
0
   }
0
   
0
   function CallUserTag($name, $params = array())
0
   {
0
- global $gCms;
0
- $smarty =& $this->smarty;
0
- $userpluginfunctions =& $gCms->userpluginfunctions;
0
-
0
- $result = '';
0
-
0
- if ($userpluginfunctions[$name] && function_exists($userpluginfunctions[$name]))
0
- {
0
- $functionname = $userpluginfunctions[$name];
0
- $result = call_user_func_array($functionname, array($params, &$smarty));
0
- }
0
-
0
- return $result;
0
+ return UserTags::CallUserTag($name, $params);
0
   }
0
 
0
   /**
...
142
143
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
146
147
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
0
@@ -142,6 +142,23 @@ class UserTags
0
 
0
     return $plugins;
0
   }
0
+
0
+ function CallUserTag($name, $params = array())
0
+ {
0
+ global $gCms;
0
+ $smarty =& $gCms->GetSmarty();
0
+ $userpluginfunctions =& $gCms->userpluginfunctions;
0
+
0
+ $result = '';
0
+
0
+ if ($userpluginfunctions[$name] && function_exists($userpluginfunctions[$name]))
0
+ {
0
+ $functionname = $userpluginfunctions[$name];
0
+ $result = call_user_func_array($functionname, array($params, &$smarty));
0
+ }
0
+
0
+ return $result;
0
+ }
0
 
0
 } // class
0
 # vim:ts=4 sw=4 noet

Comments

    No one has commented yet.