[pLog-svn] r2153 - plog/branches/plog-1.0.2/class/action/admin
jondaley at devel.plogworld.net
jondaley at devel.plogworld.net
Wed Jun 1 02:16:05 GMT 2005
Author: jondaley
Date: 2005-06-01 02:15:23 +0000 (Wed, 01 Jun 2005)
New Revision: 2153
Modified:
plog/branches/plog-1.0.2/class/action/admin/adminupdateresourceaction.class.php
Log:
regenerate the preview if the regenerate button is pressed. http://bugs.plogworld.net/view.php?id=496
Modified: plog/branches/plog-1.0.2/class/action/admin/adminupdateresourceaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminupdateresourceaction.class.php 2005-06-01 02:00:34 UTC (rev 2152)
+++ plog/branches/plog-1.0.2/class/action/admin/adminupdateresourceaction.class.php 2005-06-01 02:15:23 UTC (rev 2153)
@@ -35,12 +35,13 @@
$view = new AdminEditResourceView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_resource" ));
$this->setValidationErrorView( $view );
+
+
}
function validate()
{
if( !parent::validate()) {
- print("here!!");
$resources = new GalleryResources();
$resource = $resources->getResource( $this->_request->getValue("resourceId"), $this->_blogInfo->getId());
if( !$resource ) {
@@ -80,12 +81,17 @@
$this->_view->setErrorMessage( $this->_locale->tr("error_updating_resource"));
}
else {
- $this->_view = new AdminResourcesListView( $this->_blogInfo );
+ // check which submit button was pressed
+ if($this->_request->getValue("regenerate" ) != ""){
+ return Controller::setForwardAction( "regeneratePreview" );
+ }
+
+ $this->_view = new AdminResourcesListView( $this->_blogInfo );
$this->_view->setSuccessMessage( $this->_locale->pr("resource_updated_ok", $resource->getFileName()));
- $this->notifyEvent( EVENT_POST_RESOURCE_UPDATE, Array( "resource" => &$resource ));
-
- // clear the cache
- CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+ $this->notifyEvent( EVENT_POST_RESOURCE_UPDATE, Array( "resource" => &$resource ));
+
+ // clear the cache
+ CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
}
$this->setCommonData();
More information about the pLog-svn
mailing list