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:
Fixed a few weird php warnings

Signed-off-by: Ted Kulp <ted@cmsmadesimple.org>
tedkulp (author)
Mon Mar 31 20:53:11 -0700 2008
commit  996445f762f191e7b68d0e7cb78026e17f5571cf
tree    124d35f61fabedc8d9b1d5c4fad0939fa8034a3f
parent  91603255cbf6628d38ed0fe3a986134db1c0b3d1
...
529
530
531
532
 
533
534
535
...
529
530
531
 
532
533
534
535
0
@@ -529,7 +529,7 @@
0
       if (!in_array($result->fields['userplugin_name'], $plugins))
0
       {
0
         $plugins[] =& $result->fields['userplugin_name'];
0
- $userplugins[$result->fields['userplugin_name']] = $result->fields['userplugin_id'];
0
+ $userplugins[$result->fields['userplugin_name']] = $result->fields['id'];
0
         $functionname = "cms_tmp_".$result->fields['userplugin_name']."_userplugin_function";
0
         //Only register valid code
0
         if (!(@eval('function '.$functionname.'($params, &$smarty) {'.$result->fields['code'].'}') === FALSE))
...
418
419
420
421
 
422
423
424
...
418
419
420
 
421
422
423
424
0
@@ -418,7 +418,7 @@
0
 
0
   function create_parameter($param, $defaultval='', $helpstring='', $optional=true)
0
   {
0
- return $this->CreateParameter($param, $defaulval, $helpstring, $optional);
0
+ return $this->CreateParameter($param, $defaultval, $helpstring, $optional);
0
   }
0
 
0
   function CreateParameter($param, $defaultval='', $helpstring='', $optional=true)
...
497
498
499
 
 
 
 
 
 
 
 
 
 
500
501
502
503
 
504
505
506
...
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
 
513
514
515
516
0
@@ -497,10 +497,20 @@
0
   {
0
     return $this->create_parameter_with_filter_options($name, $filter, array(), array(), $defaultval, $helpstring, $optional);
0
   }
0
+
0
+ private function filter_id_list()
0
+ {
0
+ $result = array();
0
+ foreach(filter_list() as $k=>$filter)
0
+ {
0
+ $result[] = filter_id($filter);
0
+ }
0
+ return $result;
0
+ }
0
 
0
   public function create_parameter_with_filter_options($name, $filter = FILTER_NONE, $filter_flags = array(), $filter_params = array(), $defaultval='', $helpstring='', $optional=true)
0
   {
0
- if ($filter == FILTER_NONE && !in_array($type, array_keys(filter_list())))
0
+ if ($filter != FILTER_NONE && !in_array($filter, $this->filter_id_list()))
0
     {
0
       trigger_error('Attempt to set invalid parameter type');
0
     }

Comments

    No one has commented yet.