[pLog-svn] r1252 - plugins/trunk/templateeditor/class/view

mark at devel.plogworld.net mark at devel.plogworld.net
Mon Feb 28 19:19:03 GMT 2005


Author: mark
Date: 2005-02-28 19:19:03 +0000 (Mon, 28 Feb 2005)
New Revision: 1252

Modified:
   plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php
   plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php
Log:
oops. Forgot to update these two files. Now, maxBackupFiles should work. Okay ... time to sleep.

Modified: plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php	2005-02-28 19:08:19 UTC (rev 1251)
+++ plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php	2005-02-28 19:19:03 UTC (rev 1252)
@@ -4,8 +4,6 @@
 	include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );		
     include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/file/myfile.class.php" );
     
-    define( "MAX_BACKUP_FILES", 5 );
-
 	/**
 	 * implements the main view of the feed reader plugin
 	 */
@@ -26,6 +24,9 @@
 		
 		function render()
 		{
+            $config =& Config::getConfig();
+            $maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
+            		    
 			// get a list with all the specific template files 
         	$ts = new TemplateSetStorage();
             
@@ -49,7 +50,7 @@
             $backupFileCount = 0;
             for ($i = count($bakFiles) - 1; $i >= 0; $i--) {
                 $bakFile = $bakFiles[$i];
-                if ( $backupFileCount < MAX_BACKUP_FILES ) {
+                if ( $backupFileCount < $maxBackupFiles ) {
                     $bakElements = explode ( "_" ,$bakFile);
                     $bakId = $bakElements[count($bakElements)-1];
                     $bakTime = strftime ( "%Y/%m/%d - %H:%M:%S", $bakId );

Modified: plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php	2005-02-28 19:08:19 UTC (rev 1251)
+++ plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php	2005-02-28 19:19:03 UTC (rev 1252)
@@ -4,8 +4,6 @@
 	include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );		
     include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/file/myfile.class.php" );
     
-    define( "MAX_BACKUP_FILES", 5 );
-
 	/**
 	 * implements the main view of the feed reader plugin
 	 */
@@ -26,6 +24,9 @@
 		
 		function render()
 		{
+            $config =& Config::getConfig();
+            $maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
+
 			// get a list with all the specific template files 
         	$ts = new TemplateSetStorage();
             
@@ -49,7 +50,7 @@
             $backupFileCount = 0;
             for ($i = count($bakFiles) - 1; $i >= 0; $i--) {
                 $bakFile = $bakFiles[$i];
-                if ( $backupFileCount < MAX_BACKUP_FILES ) {
+                if ( $backupFileCount < $maxBackupFiles ) {
                     $bakElements = explode ( "_" ,$bakFile);
                     $bakId = $bakElements[count($bakElements)-1];
                     $bakTime = strftime ( "%Y/%m/%d - %H:%M:%S", $bakId );




More information about the pLog-svn mailing list