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
Removed log4php

git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@2340 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Fri Dec 16 20:21:44 -0800 2005
commit  b3e3ebcbd7434ebd12c84e99ea0d2968a4628a27
tree    4c0ab986aee3ac0899c05673bbc233fea686b5c6
parent  5d5c489d4a09d6deecbfb35f3b6996f498a76370
  • doc/CHANGELOG.txt
  • fileloc.php
  • include.php
  • index.php
  • lib/classes/class.module.inc.php
  • lib/content.functions.php
  • lib/log4php/Logger.php
  • lib/log4php/LoggerAppender.php
  • lib/log4php/LoggerAppenderSkeleton.php
  • lib/log4php/LoggerBasicConfigurator.php
  • lib/log4php/LoggerCategory.php
  • lib/log4php/LoggerDefaultCategoryFactory.php
  • lib/log4php/LoggerHierarchy.php
  • lib/log4php/LoggerLayout.php
  • lib/log4php/LoggerLevel.php
  • lib/log4php/LoggerLog.php
  • lib/log4php/LoggerMDC.php
  • lib/log4php/LoggerManager.php
  • lib/log4php/LoggerNDC.php
  • lib/log4php/LoggerPropertyConfigurator.php
  • lib/log4php/LoggerRoot.php
  • lib/log4php/appenders/LoggerAppenderDailyFile.php
  • lib/log4php/appenders/LoggerAppenderEcho.php
  • lib/log4php/appenders/LoggerAppenderFile.php
  • lib/log4php/appenders/LoggerAppenderMail.php
  • lib/log4php/appenders/LoggerAppenderMailEvent.php
  • lib/log4php/appenders/LoggerAppenderNull.php
  • lib/log4php/appenders/LoggerAppenderPhp.php
  • lib/log4php/appenders/LoggerAppenderRollingFile.php
  • lib/log4php/config/LoggerPropertyGetter.php
  • lib/log4php/config/LoggerPropertySetter.php
  • lib/log4php/helpers/LoggerFormattingInfo.php
  • lib/log4php/helpers/LoggerOptionConverter.php
  • lib/log4php/helpers/LoggerTransform.php
  • lib/log4php/layouts/LoggerLayoutSimple.php
  • lib/log4php/layouts/LoggerLayoutTTCC.php
  • lib/log4php/log4php.properties
  • lib/log4php/or/LoggerDefaultRenderer.php
  • lib/log4php/or/LoggerObjectRenderer.php
  • lib/log4php/or/LoggerRendererMap.php
  • lib/log4php/spi/LoggerConfigurator.php
  • lib/log4php/spi/LoggerFactory.php
  • lib/log4php/spi/LoggerFilter.php
  • lib/log4php/spi/LoggerLocationInfo.php
  • lib/log4php/spi/LoggerLoggingEvent.php
  • plugins/function.bulletmenu.php
  • plugins/function.cms_module.php
  • plugins/function.content.php
  • plugins/postfilter.postcompilefunc.php
  • plugins/prefilter.precompilefunc.php
  • soap.php
...
1
2
3
 
 
4
5
6
...
1
2
3
4
5
6
7
8
0
@@ -1,6 +1,8 @@
0
 Version 0.11.2 -- Subversion
0
 -----------------
0
 
0
+* Removed log4php, since it wasn't being used to
0
+it's full potential
0
 * Updated smarty to 2.6.10
0
 
0
 Version 0.11.1 "Tobago" -- Dec 05 2005
...
2
3
4
5
6
7
8
...
2
3
4
 
 
 
5
0
@@ -2,7 +2,4 @@
0
 define("CONFIG_FILE_LOCATION", dirname(__FILE__).'/config.php');
0
 define("TMP_CACHE_LOCATION", dirname(__FILE__).'/tmp/cache');
0
 define("TMP_TEMPLATES_C_LOCATION", dirname(__FILE__).'/tmp/templates_c');
0
-define("LOG4PHP_LOGDIR", dirname(__FILE__).'/tmp/cache');
0
-define("LOG4PHP_CONFIGURATION", dirname(__FILE__).'/lib/log4php/log4php.properties');
0
-require_once(dirname(__FILE__).'/lib/log4php/LoggerManager.php');
0
 ?>
...
20
21
22
23
24
25
26
27
28
...
204
205
206
207
208
209
210
...
20
21
22
 
 
 
23
24
25
...
201
202
203
 
 
204
205
0
@@ -20,9 +20,6 @@
0
 
0
 require_once(dirname(__FILE__).'/fileloc.php');
0
 
0
-$log =& LoggerManager::getLogger('include.php');
0
-$log->debug('Starting include.php');
0
-
0
 /**
0
  * This file is included in every page. It does all seutp functions including
0
  * importing additional functions/classes, setting up sessions and nls, and
0
@@ -204,7 +201,5 @@ else
0
   ModuleOperations::LoadModules(false);
0
 }
0
 
0
-$log->debug('Leaving include.php');
0
-
0
 # vim:ts=4 sw=4 noet
0
 ?>
...
20
21
22
23
24
25
26
27
28
29
...
118
119
120
121
122
123
124
...
127
128
129
130
131
132
133
134
135
136
137
138
...
188
189
190
191
192
193
194
195
...
20
21
22
 
 
 
 
23
24
25
...
114
115
116
 
117
118
119
...
122
123
124
 
125
126
127
128
 
129
130
131
...
181
182
183
 
 
184
185
186
0
@@ -20,10 +20,6 @@
0
 
0
 require_once(dirname(__FILE__).'/fileloc.php');
0
 
0
-$log =& LoggerManager::getLogger('index.php');
0
-$log->info('Serving URL:' . $_SERVER['REQUEST_URI']);
0
-$log->debug('Starting index.php');
0
-
0
 /**
0
  * Entry point for all non-admin pages
0
  *
0
@@ -118,7 +114,6 @@ $html = "";
0
 if (isset($_GET["print"]))
0
 {
0
   ($smarty->is_cached('print:'.$page, '', $pageinfo->template_id)?$cached="":$cached="not ");
0
- $log->debug('Fetching: print:' . $pageinfo->template_id);
0
   $html = $smarty->fetch('print:'.$page, '', $pageinfo->template_id) . "\n";
0
 }
0
 else
0
@@ -127,12 +122,10 @@ else
0
   #If this is a case where a module doesn't want a template to be shown, just disable caching
0
   if (isset($_GET['id']) && isset($_GET[$_GET['id'].'showtemplate']) && $_GET[$_GET['id'].'showtemplate'] == 'false')
0
   {
0
- $log->debug('Fetching: template:notemplate');
0
     $html = $smarty->fetch('template:notemplate') . "\n";
0
   }
0
   else
0
   {
0
- $log->debug('Fetching: template:' . $pageinfo->template_id);
0
     $html = $smarty->fetch('template:'.$pageinfo->template_id) . "\n";
0
   }
0
 }
0
@@ -188,8 +181,6 @@ if (get_site_preference('enablesitedownmessage') == "1")
0
   $smarty->clear_all_cache();
0
 }
0
 
0
-$log->debug('Leaving index.php');
0
-
0
 if ($config["debug"] == true)
0
 {
0
   echo $sql_queries;
...
496
497
498
499
500
501
502
...
496
497
498
 
499
500
501
0
@@ -496,7 +496,6 @@ class CMSModule extends ModuleOperations
0
     $this->langhash = array();
0
     $this->params = array();
0
     $this->error = '';
0
- $this->log =& LoggerManager::getLogger('module.php');
0
     array_push($this->params, array(
0
       'name' => 'lang',
0
       'default' => 'en_US',
...
141
142
143
144
145
146
147
148
149
...
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
...
366
367
368
369
370
371
372
...
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
...
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
...
454
455
456
457
458
459
460
...
468
469
470
471
472
473
474
475
476
...
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
...
533
534
535
536
537
538
539
...
543
544
545
546
547
548
549
550
551
...
586
587
588
589
590
591
592
...
141
142
143
 
 
 
144
145
146
...
344
345
346
 
 
 
347
348
349
350
351
352
 
353
354
355
...
359
360
361
 
362
363
364
...
394
395
396
 
397
398
399
 
400
401
402
403
404
405
 
 
 
406
407
408
409
410
 
411
412
413
414
415
 
416
417
418
...
420
421
422
 
423
424
425
426
427
428
 
 
 
429
430
431
...
435
436
437
 
438
439
440
...
448
449
450
 
451
 
452
453
454
...
478
479
480
 
481
482
483
 
484
485
486
487
488
 
 
 
489
490
491
...
506
507
508
 
509
510
511
...
515
516
517
 
 
 
518
519
520
...
555
556
557
 
558
559
560
0
@@ -141,9 +141,6 @@ class Smarty_CMS extends Smarty {
0
 
0
     function module_db_template($tpl_name, &$tpl_source, &$smarty_obj)
0
     {
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting module_db_template');
0
-
0
         global $gCms;
0
 
0
         $db = &$gCms->db;
0
@@ -347,16 +344,12 @@ class Smarty_CMS extends Smarty {
0
 
0
   function template_get_template($tpl_name, &$tpl_source, &$smarty_obj)
0
   {
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting template_get_template');
0
-
0
     global $gCms;
0
     $config = $gCms->config;
0
 
0
     if (get_site_preference('enablesitedownmessage') == "1")
0
     {
0
       $tpl_source = get_site_preference('sitedownmessage');
0
- $log->debug('Site down. Leaving template_get_template');
0
       return true;
0
     }
0
     else
0
@@ -366,7 +359,6 @@ class Smarty_CMS extends Smarty {
0
       if ($tpl_name == 'notemplate')
0
       {
0
         $tpl_source = '{content}';
0
- $log->debug('No Template. Leaving template_get_template');
0
         return true;
0
       }
0
       else
0
@@ -402,32 +394,25 @@ class Smarty_CMS extends Smarty {
0
             $tpl_source = ereg_replace("\{\/?php\}", "", $tpl_source);
0
           }
0
 
0
- $log->debug('Template Found. Leaving template_get_template');
0
           return true;
0
         }
0
       }
0
- $log->warn('No Template Found. Leaving template_get_template');
0
       return false;
0
     }
0
   }
0
 
0
   function template_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj)
0
   {
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting template_get_timestamp');
0
-
0
     global $gCms;
0
 
0
     if (get_site_preference('enablesitedownmessage') == "1")
0
     {
0
       $tpl_timestamp = time();
0
- $log->debug('Site down. Leaving template_get_timestamp');
0
       return true;
0
     }
0
     else if (isset($_GET['id']) && isset($_GET[$_GET['id'].'showtemplate']) && $_GET[$_GET['id'].'showtemplate'] == 'false')
0
     {
0
       $tpl_timestamp = time();
0
- $log->debug('No template needed. Leaving template_get_timestamp');
0
       return true;
0
     }
0
     else
0
@@ -435,16 +420,12 @@ class Smarty_CMS extends Smarty {
0
       $pageinfo = &$gCms->variables['pageinfo'];
0
 
0
       $tpl_timestamp = $pageinfo->template_modified_date;
0
- $log->debug('Template found. Leaving template_get_timestamp');
0
       return true;
0
     }
0
   }
0
 
0
   function content_get_template($tpl_name, &$tpl_source, &$smarty_obj)
0
   {
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting content_get_template');
0
-
0
     global $gCms;
0
 
0
     $pageinfo = &$gCms->variables['pageinfo'];
0
@@ -454,7 +435,6 @@ class Smarty_CMS extends Smarty {
0
       #We've a custom error message... return it here
0
       header("HTTP/1.0 404 Not Found");
0
       $tpl_source = get_site_preference('custom404');
0
- $log->debug('Custom 404 message. Leaving content_get_template');
0
       return true;
0
     }
0
     else
0
@@ -468,9 +448,7 @@ class Smarty_CMS extends Smarty {
0
           $contentobj->GetAdditionalContentBlocks();
0
         }
0
 
0
- $log->debug('Running Show() now');
0
         $tpl_source = $contentobj->Show($tpl_name);
0
- $log->debug('Done running Show()');
0
 
0
         #Perform the content data callback
0
         #This needs to go...
0
@@ -500,19 +478,14 @@ class Smarty_CMS extends Smarty {
0
           $tpl_source = ereg_replace("\{\/?php\}", "", $tpl_source);
0
         }
0
 
0
- $log->debug('Content found. Leaving content_get_template');
0
         return true;
0
       }
0
     }
0
- $log->warn('Content not found. Leaving content_get_template');
0
     return false;
0
   }
0
 
0
   function content_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj)
0
   {
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting content_get_timestamp');
0
-
0
     global $gCms;
0
 
0
     $pageinfo = $gCms->variables['pageinfo'];
0
@@ -533,7 +506,6 @@ class Smarty_CMS extends Smarty {
0
         $tpl_timestamp = time();
0
       }
0
     }
0
- $log->debug('Leaving content_get_timestamp');
0
     return true;
0
   }
0
   
0
@@ -543,9 +515,6 @@ class Smarty_CMS extends Smarty {
0
     $pageinfo =& $gCms->variables['pageinfo'];
0
     $config = $gCms->config;
0
 
0
- $log =& LoggerManager::getLogger('content.functions.php');
0
- $log->debug('Starting module_get_template');
0
-
0
     #Run the execute_user function and replace {content} with it's output
0
     if (isset($gCms->modules[$tpl_name]))
0
     {
0
@@ -586,7 +555,6 @@ class Smarty_CMS extends Smarty {
0
       }
0
     }
0
     
0
- $log->debug("Encoding: " . (isset($line['encoding']) && $line['encoding'] != ''?$line['encoding']:get_encoding()));
0
     header("Content-Type: ".$gCms->variables['content-type']."; charset=" . (isset($line['encoding']) && $line['encoding'] != ''?$line['encoding']:get_encoding()));
0
     if (isset($gCms->variables['content-filename']) && $gCms->variables['content-filename'] != '')
0
     {
...
18
19
20
21
22
23
24
25
26
...
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
18
19
20
 
 
 
21
22
23
...
178
179
180
 
181
182
183
184
185
 
186
187
 
188
189
 
190
191
192
0
@@ -18,9 +18,6 @@
0
 
0
 function smarty_cms_function_bulletmenu($params, &$smarty) {
0
 
0
- $log =& LoggerManager::getLogger('index.php');
0
- $log->debug('Starting smarty_cms_function_bulletmenu');
0
-
0
   global $gCms;
0
   global $db;
0
   global $config;
0
@@ -181,19 +178,15 @@ function smarty_cms_function_bulletmenu($params, &$smarty) {
0
           # Now for the nasty part... loop through all parents and show them and direct siblings
0
           if ($skipme)
0
           {
0
- $log->debug('skipme is true');
0
             $blah = '';
0
             $count = 1;
0
             foreach (split('\.', $curpos) as $level)
0
             {
0
               $blah .= $level . '.';
0
- #$log->debug('blah is ' . $blah . ' and hierarchy is ' . $onecontent->Hierarchy());
0
               if (strstr($onecontent->Hierarchy(), ContentManager::CreateFriendlyHierarchyPosition($blah)) == $onecontent->Hierarchy())
0
               {
0
- $log->debug('It\'s a match -- ' . $depth . ' -- ' . ($count + 1));
0
                 if ($depth == ($count + 1))
0
                 {
0
- $log->debug('Setting skipme to false');
0
                   $skipme = false;
0
                   continue;
0
                 }
...
18
19
20
21
22
23
24
25
26
...
70
71
72
73
74
75
76
...
18
19
20
 
 
 
21
22
23
...
67
68
69
 
70
71
72
0
@@ -18,9 +18,6 @@
0
 
0
 function smarty_cms_function_cms_module($params, &$smarty)
0
 {
0
- $log =& LoggerManager::getLogger('function.cms_module.php');
0
- $log->debug('Starting smarty_cms_function_cms_module');
0
-
0
   global $gCms;
0
   $cmsmodules = &$gCms->modules;
0
 
0
@@ -70,7 +67,6 @@ function smarty_cms_function_cms_module($params, &$smarty)
0
         }
0
         else
0
         {
0
- $log->debug('Leaving smarty_cms_function_cms_module');
0
           return "<!-- Not a tag module -->\n";
0
         }
0
       }
...
18
19
20
21
22
23
24
25
26
...
80
81
82
83
84
85
86
...
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
18
19
20
 
 
 
21
22
23
...
77
78
79
 
80
81
82
...
86
87
88
 
89
90
91
92
93
 
94
95
96
 
97
98
99
0
@@ -18,9 +18,6 @@
0
 
0
 function smarty_cms_function_content($params, &$smarty)
0
 {
0
- $log =& LoggerManager::getLogger('function.content.php');
0
- $log->debug('Starting smarty_cms_function_content');
0
-
0
   global $gCms;
0
   $pageinfo = $gCms->variables['pageinfo'];
0
   if (isset($pageinfo) && $pageinfo !== FALSE)
0
@@ -80,7 +77,6 @@ function smarty_cms_function_content($params, &$smarty)
0
               }
0
               else
0
               {
0
- $log->debug('Leaving smarty_cms_function_cms_module');
0
                 return "<!-- Not a tag module -->\n";
0
               }
0
             }
0
@@ -90,17 +86,14 @@ function smarty_cms_function_content($params, &$smarty)
0
     }
0
     else
0
     {
0
- $log->debug('Content cachable: ' . $pageinfo->content_cachable);
0
       $result = '';
0
       $oldvalue = $smarty->caching;
0
       $smarty->caching = $pageinfo->content_cachable;
0
       $result = $smarty->fetch(str_replace(' ', '_', 'content:' . (isset($params['block'])?$params['block']:'content_en')), '', $pageinfo->content_id);
0
       $smarty->caching = $oldvalue;
0
- $log->debug('Leaving smarty_cms_function_content');
0
       return $result;
0
     }
0
   }
0
- $log->debug('Leaving smarty_cms_function_content');
0
   return '';
0
 }
0
 
...
18
19
20
21
22
23
24
25
26
...
35
36
37
38
39
40
41
...
47
48
49
50
51
52
53
...
18
19
20
 
 
 
21
22
23
...
32
33
34
 
35
36
37
...
43
44
45
 
46
47
48
0
@@ -18,9 +18,6 @@
0
 
0
 function smarty_cms_postfilter_postcompilefunc($tpl_output, &$smarty)
0
 {
0
- $log =& LoggerManager::getLogger('postfilter.postcompile.php');
0
- $log->debug('Starting smarty_cms_postfilter_postcompilefunc');
0
-
0
   $result = explode(':', $smarty->_current_file);
0
   if (count($result) > 1)
0
   {
0
@@ -35,7 +32,6 @@ function smarty_cms_postfilter_postcompilefunc($tpl_output, &$smarty)
0
           if ($gCms->modules[$key]['installed'] == true &&
0
             $gCms->modules[$key]['active'] == true)
0
           {
0
- $log->debug('Calling ContentPostCompile');
0
             $gCms->modules[$key]['object']->ContentPostCompile($tpl_output);
0
           }
0
         }
0
@@ -47,7 +43,6 @@ function smarty_cms_postfilter_postcompilefunc($tpl_output, &$smarty)
0
           if ($gCms->modules[$key]['installed'] == true &&
0
             $gCms->modules[$key]['active'] == true)
0
           {
0
- $log->debug('Calling TemplatePostCompile');
0
             $gCms->modules[$key]['object']->TemplatePostCompile($tpl_output);
0
           }
0
         }
...
18
19
20
21
22
23
24
25
...
35
36
37
38
39
40
41
42
43
44
45
...
51
52
53
54
55
56
57
...
18
19
20
 
 
21
22
23
...
33
34
35
 
36
37
38
 
39
40
41
...
47
48
49
 
50
51
52
0
@@ -18,8 +18,6 @@
0
 
0
 function smarty_cms_prefilter_precompilefunc($tpl_output, &$smarty)
0
 {
0
- $log =& LoggerManager::getLogger('prefilter.precompilefunc.php');
0
- $log->debug('Starting smarty_cms_prefilter_precompilefunc');
0
 
0
   $result = explode(':', $smarty->_current_file);
0
   if (count($result) > 1)
0
@@ -35,11 +33,9 @@ function smarty_cms_prefilter_precompilefunc($tpl_output, &$smarty)
0
           if ($gCms->modules[$key]['installed'] == true &&
0
             $gCms->modules[$key]['active'] == true)
0
           {
0
- $log->debug('Calling ContentPreCompile');
0
             $gCms->modules[$key]['object']->ContentPreCompile($tpl_output);
0
             
0
             #For backwards compatibility, though I think PreCompile makes more sense
0
- $log->debug('Calling ContentPreRender');
0
             $gCms->modules[$key]['object']->ContentPreRender($tpl_output);
0
           }
0
         }
0
@@ -51,7 +47,6 @@ function smarty_cms_prefilter_precompilefunc($tpl_output, &$smarty)
0
           if ($gCms->modules[$key]['installed'] == true &&
0
             $gCms->modules[$key]['active'] == true)
0
           {
0
- $log->debug('Calling TemplatePreCompile');
0
             $gCms->modules[$key]['object']->TemplatePreCompile($tpl_output);
0
           }
0
         }
...
20
21
22
23
24
25
26
27
28
29
...
115
116
117
118
119
120
121
...
130
131
132
133
134
135
136
137
...
20
21
22
 
 
 
 
23
24
25
...
111
112
113
 
114
115
116
...
125
126
127
 
 
128
129
130
0
@@ -20,10 +20,6 @@
0
 
0
 require_once(dirname(__FILE__).'/fileloc.php');
0
 
0
-$log =& LoggerManager::getLogger('soap.php');
0
-$log->info('Serving URL:' . $_SERVER['REQUEST_URI']);
0
-$log->debug('Starting soap.php');
0
-
0
 /**
0
  * Entry point for all non-admin pages
0
  *
0
@@ -115,7 +111,6 @@ if (isset($cmsmodules))
0
    }
0
    else
0
    {
0
- $log->debug('Leaving smarty_cms_function_cms_module');
0
     return "<!-- Not a tag module -->\n";
0
    }
0
    }
0
@@ -130,8 +125,6 @@ echo $modresult;
0
 
0
 $endtime = microtime();
0
 
0
-$log->debug('Leaving soap.php');
0
-
0
 if ($config["debug"] == true)
0
 {
0
   echo $sql_queries;

Comments

    No one has commented yet.