[pLog-svn] r4523 - in plugins/trunk/unported/templateeditor:
class/action locale
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Jan 9 21:59:29 GMT 2007
Author: oscar
Date: 2007-01-09 21:59:28 +0000 (Tue, 09 Jan 2007)
New Revision: 4523
Modified:
plugins/trunk/unported/templateeditor/class/action/pluginblogarchivetemplatesetaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatefilesaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogedittemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginblogupdatetemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitearchivetemplatesetaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatefilesaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatesetsaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitetemplatesetslistaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsitetemplateslistaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsiteupdatetemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/pluginsiteuploadtemplatefileaction.class.php
plugins/trunk/unported/templateeditor/class/action/plugintemplateeditorconfigaction.class.php
plugins/trunk/unported/templateeditor/locale/locale_en_UK.php
plugins/trunk/unported/templateeditor/locale/locale_es_ES.php
Log:
Update of the plugin to work both for administrator users and users who have the edit_global_templates and edit_blog_templates permission.
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogarchivetemplatesetaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogarchivetemplatesetaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogarchivetemplatesetaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,19 +1,21 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/archive/archive.php" );
/**
* Removes global templates from disk.
*/
- class PluginBlogArchiveTemplateSetAction extends BlogOwnerAdminAction
+ class PluginBlogArchiveTemplateSetAction extends AdminAction
{
var $_templateIds;
function PluginBlogArchiveTemplateSetAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php" );
@@ -8,7 +8,7 @@
/**
* Removes global templates from disk.
*/
- class PluginBlogCopyTemplateFileAction extends BlogOwnerAdminAction
+ class PluginBlogCopyTemplateFileAction extends AdminAction
{
var $_templateId;
@@ -18,7 +18,9 @@
function PluginBlogCopyTemplateFileAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function validate()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -19,7 +19,7 @@
{
$this->AdminAction( $actionInfo, $request );
- $this->requirePermission( "edit_blog_templates" );
+ $this->requirePermission( "edit_blog_templates" );
}
function validate()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatefilesaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatefilesaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatefilesaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php" );
@@ -9,7 +9,7 @@
/**
* Removes global templates from disk.
*/
- class PluginBlogDeleteTemplateFilesAction extends BlogOwnerAdminAction
+ class PluginBlogDeleteTemplateFilesAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
@@ -18,7 +18,7 @@
function PluginBlogDeleteTemplateFilesAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
$this->_templateId = $this->_request->getValue( "templateId" );
$this->_subFolderId = $this->_request->getValue( "subFolderId" );
@@ -30,13 +30,18 @@
else
$this->registerFieldValidator( "fileIds", new ArrayValidator());
$view = new PluginBlogTemplatesListView( $this->_blogInfo , $this->_templateId);
- if ( empty($this->_subFolderId) ) {
+
+ if ( empty($this->_subFolderId) ) {
$view = new PluginBlogTemplatesListView( $this->_blogInfo , $this->_templateId);
- } else {
+ }
+ else {
$view = new PluginBlogTemplateSubFolderListView( $this->_blogInfo, $this->_templateId, $this->_subFolderId );
}
- $view->setErrorMessage( $this->_locale->tr("error_no_files_selected"));
+
+ $view->setErrorMessage( $this->_locale->tr("error_no_files_selected"));
$this->setValidationErrorView( $view );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplatesetslistview.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
@@ -8,7 +8,7 @@
/**
* Removes global templates from disk.
*/
- class PluginBlogDeleteTemplateSetsAction extends BlogOwnerAdminAction
+ class PluginBlogDeleteTemplateSetsAction extends AdminAction
{
var $_templateIds;
@@ -16,7 +16,7 @@
function PluginBlogDeleteTemplateSetsAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
// data validation stuff
$this->_op = $actionInfo->getActionParamValue();
@@ -27,6 +27,8 @@
$view = new PluginBlogTemplateSetsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_templates_selected"));
$this->setValidationErrorView( $view );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogedittemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogedittemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogedittemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,13 +1,13 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogedittemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginBlogEditTemplateFileAction extends BlogOwnerAdminAction
+ class PluginBlogEditTemplateFileAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
@@ -16,7 +16,9 @@
function PluginBlogEditTemplateFileAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginblogupdatetemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginblogupdatetemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginblogupdatetemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,6 +1,6 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogedittemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginblogtemplateslistview.class.php" );
@@ -12,7 +12,7 @@
/**
* shows a form with the current configuration
*/
- class PluginBlogUpdateTemplateFileAction extends BlogOwnerAdminAction
+ class PluginBlogUpdateTemplateFileAction extends AdminAction
{
var $_fileContent;
var $_templateId;
@@ -21,7 +21,7 @@
function PluginBlogUpdateTemplateFileAction( $actionInfo, $request )
{
- $this->BlogOwnerAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
$this->_templateId = $this->_request->getValue( "templateId" );
$this->_subFolderId = $this->_request->getValue( "subFolderId" );
@@ -36,11 +36,15 @@
if ( empty($this->_subFolderId) ) {
$view = new PluginBlogEditTemplateFileView( $this->_blogInfo, $this->_templateId, $this->_fileId, $this->_backupId );
- } else {
+ }
+ else {
$view = new PluginBlogEditSubFolderTemplateFileView( $this->_blogInfo, $this->_templateId, $this->_subFolderId, $this->_fileId, $this->_backupId );
}
- $view->setErrorMessage( $this->_locale->tr("error_updating_template_file"));
+
+ $view->setErrorMessage( $this->_locale->tr("error_updating_template_file"));
$this->setValidationErrorView( $view );
+
+ $this->requirePermission( "edit_blog_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitearchivetemplatesetaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitearchivetemplatesetaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitearchivetemplatesetaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,19 +1,21 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/archive/archive.php" );
/**
* Removes global templates from disk.
*/
- class PluginSiteArchiveTemplateSetAction extends SiteAdminAction
+ class PluginSiteArchiveTemplateSetAction extends AdminAction
{
var $_templateIds;
function PluginSiteArchiveTemplateSetAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php" );
@@ -8,7 +8,7 @@
/**
* Removes global templates from disk.
*/
- class PluginSiteCopyTemplateFileAction extends SiteAdminAction
+ class PluginSiteCopyTemplateFileAction extends AdminAction
{
var $_templateId;
@@ -18,7 +18,9 @@
function PluginSiteCopyTemplateFileAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function validate()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesets.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesetslistview.class.php" );
@@ -8,7 +8,7 @@
/**
* Removes global templates from disk.
*/
- class PluginSiteCopyTemplateSetAction extends SiteAdminAction
+ class PluginSiteCopyTemplateSetAction extends AdminAction
{
var $_templateId;
@@ -16,7 +16,9 @@
function PluginSiteCopyTemplateSetAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function validate()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatefilesaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatefilesaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatefilesaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php" );
@@ -9,7 +9,7 @@
/**
* Removes global templates from disk.
*/
- class PluginSiteDeleteTemplateFilesAction extends SiteAdminAction
+ class PluginSiteDeleteTemplateFilesAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
@@ -18,7 +18,7 @@
function PluginSiteDeleteTemplateFilesAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
$this->_templateId = $this->_request->getValue( "templateId" );
$this->_subFolderId = $this->_request->getValue( "subFolderId" );
@@ -31,11 +31,14 @@
$this->registerFieldValidator( "fileIds", new ArrayValidator());
if ( empty($this->_subFolderId) ) {
$view = new PluginSiteTemplatesListView( $this->_blogInfo, $this->_templateId );
- } else {
+ }
+ else {
$view = new PluginSiteTemplateSubFolderListView( $this->_blogInfo, $this->_templateId, $this->_subFolderId );
}
$view->setErrorMessage( $this->_locale->tr("error_no_files_selected"));
$this->setValidationErrorView( $view );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatesetsaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatesetsaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitedeletetemplatesetsaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,5 +1,5 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesetslistview.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
@@ -8,7 +8,7 @@
/**
* Removes global templates from disk.
*/
- class PluginSiteDeleteTemplateSetsAction extends SiteAdminAction
+ class PluginSiteDeleteTemplateSetsAction extends AdminAction
{
var $_templateIds;
@@ -16,7 +16,7 @@
function PluginSiteDeleteTemplateSetsAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
// data validation stuff
$this->_op = $actionInfo->getActionParamValue();
@@ -27,6 +27,8 @@
$view = new PluginSiteTemplateSetsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_templates_selected"));
$this->setValidationErrorView( $view );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsiteedittemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,13 +1,13 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsiteedittemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginSiteEditTemplateFileAction extends SiteAdminAction
+ class PluginSiteEditTemplateFileAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
@@ -16,7 +16,9 @@
function PluginSiteEditTemplateFileAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitetemplatesetslistaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitetemplatesetslistaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitetemplatesetslistaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,17 +1,19 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesetslistview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginSiteTemplateSetsListAction extends SiteAdminAction
+ class PluginSiteTemplateSetsListAction extends AdminAction
{
function PluginSiteTemplateSetsListAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsitetemplateslistaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsitetemplateslistaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsitetemplateslistaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,20 +1,22 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginSiteTemplatesListAction extends SiteAdminAction
+ class PluginSiteTemplatesListAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
function PluginSiteTemplatesListAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
@@ -24,7 +26,8 @@
if ( empty($this->_subFolderId) ) {
$this->_view = new PluginSiteTemplatesListView( $this->_blogInfo, $this->_templateId );
- } else {
+ }
+ else {
$this->_view = new PluginSiteTemplateSubFolderListView( $this->_blogInfo, $this->_templateId, $this->_subFolderId );
}
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsiteupdatetemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsiteupdatetemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsiteupdatetemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,6 +1,6 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsiteedittemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplateslistview.class.php" );
@@ -12,7 +12,7 @@
/**
* shows a form with the current configuration
*/
- class PluginSiteUpdateTemplateFileAction extends SiteAdminAction
+ class PluginSiteUpdateTemplateFileAction extends AdminAction
{
var $_fileContent;
var $_templateId;
@@ -21,7 +21,7 @@
function PluginSiteUpdateTemplateFileAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
$this->_templateId = $this->_request->getValue( "templateId" );
$this->_subFolderId = $this->_request->getValue( "subFolderId" );
@@ -41,6 +41,8 @@
}
$view->setErrorMessage( $this->_locale->tr("error_updating_template_file"));
$this->setValidationErrorView( $view );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/class/action/pluginsiteuploadtemplatefileaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/pluginsiteuploadtemplatefileaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/pluginsiteuploadtemplatefileaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,6 +1,6 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplateslistview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php" );
@@ -8,7 +8,7 @@
/**
* shows a form with the current configuration
*/
- class PluginSiteUploadTemplateFileAction extends SiteAdminAction
+ class PluginSiteUploadTemplateFileAction extends AdminAction
{
var $_templateId;
var $_subFolderId;
@@ -16,7 +16,9 @@
function PluginSiteUploadTemplateFileAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function validate()
Modified: plugins/trunk/unported/templateeditor/class/action/plugintemplateeditorconfigaction.class.php
===================================================================
--- plugins/trunk/unported/templateeditor/class/action/plugintemplateeditorconfigaction.class.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/class/action/plugintemplateeditorconfigaction.class.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -1,17 +1,19 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
include_once( PLOG_CLASS_PATH."plugins/templateeditor/class/view/plugintemplateeditorconfigview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginTemplateEditorConfigAction extends SiteAdminAction
+ class PluginTemplateEditorConfigAction extends AdminAction
{
function PluginTemplateEditorConfigAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requireAdminPermission( "edit_global_templates" );
}
function perform()
Modified: plugins/trunk/unported/templateeditor/locale/locale_en_UK.php
===================================================================
--- plugins/trunk/unported/templateeditor/locale/locale_en_UK.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/locale/locale_en_UK.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -48,4 +48,5 @@
$messages["edit_blog_templates_desc"] = "User can edit blog templates (templateeditor plugin)";
$messages["edit_global_templates_desc"] = "User can edit global templates (templateeditor plugin)";
+$messages['template_file_added_ok'] = 'File successfully uploaded';
?>
\ No newline at end of file
Modified: plugins/trunk/unported/templateeditor/locale/locale_es_ES.php
===================================================================
--- plugins/trunk/unported/templateeditor/locale/locale_es_ES.php 2007-01-08 19:12:17 UTC (rev 4522)
+++ plugins/trunk/unported/templateeditor/locale/locale_es_ES.php 2007-01-09 21:59:28 UTC (rev 4523)
@@ -53,4 +53,6 @@
$messages["edit_blog_templates_desc"] = "Permiso para editar las plantillas del blog (plugin templateeditor)";
$messages["edit_global_templates_desc"] = "Permiso para editar las plantillas globales (plugin templateeditor)";
+
+$messages['template_file_added_ok'] = 'Fichero añadido correctamente';
?>
\ No newline at end of file
More information about the pLog-svn
mailing list