[pLog-svn] r7129 - in plugins/branches/lifetype-1.2/templateeditor: class/action locale

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Sep 1 09:42:13 EDT 2011


Author: jondaley
Date: 2011-09-01 09:42:13 -0400 (Thu, 01 Sep 2011)
New Revision: 7129

Modified:
   plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php
   plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogedittemplatefileaction.class.php
   plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php
   plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php
   plugins/branches/lifetype-1.2/templateeditor/locale/locale_en_UK.php
Log:
added missing locale message.  made template file check for blank filename

Modified: plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php	2011-09-01 13:29:44 UTC (rev 7128)
+++ plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php	2011-09-01 13:42:13 UTC (rev 7129)
@@ -111,7 +111,7 @@
 
         function isValidTemplateFileName( $name )
         {
-		    $pattern = '/^[a-zA-Z0-9\._-]*$/';
+		    $pattern = '/^[a-zA-Z0-9\._-]+$/';
             if (preg_match($pattern, $name) ) {
                return true;
             } else {

Modified: plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogedittemplatefileaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogedittemplatefileaction.class.php	2011-09-01 13:29:44 UTC (rev 7128)
+++ plugins/branches/lifetype-1.2/templateeditor/class/action/pluginblogedittemplatefileaction.class.php	2011-09-01 13:42:13 UTC (rev 7129)
@@ -29,7 +29,7 @@
 			$this->registerFieldValidator( "subFolderId", $val, true );
 			$this->registerFieldValidator( "fileId", new TemplateNameValidator());
             $view = new PluginBlogTemplateSetsListView( $this->_blogInfo );
-			$view->setErrorMessage( "error_loading_template_file" );
+			$view->setErrorMessage( $this->_locale->tr("error_loading_template_file") );
 			$this->setValidationErrorView( $view );			
 			
 			$this->requirePermission( "edit_blog_templates" );

Modified: plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php	2011-09-01 13:29:44 UTC (rev 7128)
+++ plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php	2011-09-01 13:42:13 UTC (rev 7129)
@@ -111,7 +111,7 @@
 
         function isValidTemplateFileName( $name )
         {
-		    $pattern = '/^[a-zA-Z0-9\._-]*$/';
+		    $pattern = '/^[a-zA-Z0-9\._-]+$/';
             if (preg_match($pattern, $name) ) {
                return true;
             } else {

Modified: plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php	2011-09-01 13:29:44 UTC (rev 7128)
+++ plugins/branches/lifetype-1.2/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php	2011-09-01 13:42:13 UTC (rev 7129)
@@ -29,7 +29,7 @@
 			$this->registerFieldValidator( "subFolderId", $val, true );
 			$this->registerFieldValidator( "fileId", new TemplateNameValidator());
             $view = new PluginSiteTemplateSetsListView( $this->_blogInfo );
-			$view->setErrorMessage( "error_loading_template_file" );
+			$view->setErrorMessage( $this->_locale->tr("error_loading_template_file") );
 			$this->setValidationErrorView( $view );
 			
 			$this->requireAdminPermission( "edit_global_templates" );			

Modified: plugins/branches/lifetype-1.2/templateeditor/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.2/templateeditor/locale/locale_en_UK.php	2011-09-01 13:29:44 UTC (rev 7128)
+++ plugins/branches/lifetype-1.2/templateeditor/locale/locale_en_UK.php	2011-09-01 13:42:13 UTC (rev 7129)
@@ -20,14 +20,15 @@
 $messages["error_backup_template_file"] = "There was an error backing up template file.";
 $messages["templateeditor_error_maxbackupfiles"] = "Maximum Backup Files Should > 0!";
 $messages["templateeditor_error_allowedextension"] = "Allowed extension can not be empty.";
-$messages["templateeditor_error_templatefile_name"] = 'Wrong template file name. The file name is limited to a-z, A-Z, "_", "-" and ".", space in file name is not allowed.';
+$messages["templateeditor_error_templatefile_name"] = 'Wrong template file name. The file name is limited to a-z, A-Z, "_", "-" and ".". A space in the file name is not allowed.';
 $messages["templateeditor_error_templateset_type"] = 'Wrong template set type.';
 $messages["templateeditor_error_templatefile_extension"] = "Wrong template extension.";
 $messages["error_duplicate_templatefile_name"] = "Duplicate template file name.";
 $messages["error_copying_templatefile"] = "There was an error copying template file.";
-$messages["templateeditor_error_templateset_name"] = 'Wrong template set name. The set name is limited to a-z, A-Z, "_" and "-", space in set name is not allowed.';
+$messages["templateeditor_error_templateset_name"] = 'Wrong template set name. The set name is limited to a-z, A-Z, "_" and "-". A space in the template name is not allowed.';
 $messages["error_duplicate_templateset_name"] = "Duplicate template set name.";
 $messages["error_copying_templateset"] = "There was an error copying template set.";
+$messages["error_loading_template_file"] = "Couldn't find that template file.";
 
 $messages["template_file_removed_ok"] = "Template file %s deleted successfully.";
 $messages["template_files_removed_ok"] = "%s templates files deleted successfully";



More information about the pLog-svn mailing list