[pLog-svn] r6844 - plog/branches/lifetype-1.2/class/action/admin
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Mar 9 01:44:18 EDT 2009
Author: jondaley
Date: 2009-03-09 01:44:18 -0400 (Mon, 09 Mar 2009)
New Revision: 6844
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminpostmanagementcommonaction.class.php
Log:
check posterId to make sure it is a valid user for this blog. fixes http://bugs.lifetype.net/view.php?id=1597
Modified: plog/branches/lifetype-1.2/class/action/admin/adminpostmanagementcommonaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminpostmanagementcommonaction.class.php 2009-03-02 04:12:14 UTC (rev 6843)
+++ plog/branches/lifetype-1.2/class/action/admin/adminpostmanagementcommonaction.class.php 2009-03-09 05:44:18 UTC (rev 6844)
@@ -200,9 +200,21 @@
// information about the poster but only if the user is supposed to be able to change it
if( $this->_userInfo->hasPermissionByName( "update_all_user_articles", $this->_blogInfo->getId()) ||
$this->_userInfo->isSiteAdmin() ||
- $this->_blogInfo->getOwnerId() == $this->_userInfo->getId()) {
- $this->_posterId = $this->_request->getValue( "postUser" );
- }
+ $this->_blogInfo->getOwnerId() == $this->_userInfo->getId())
+ {
+ $this->_posterId = null;
+ $posterId = $this->_request->getValue( "postUser" );
+
+ $validUsers = $this->_blogInfo->getUsersInfo();
+ foreach($validUsers as $validUser){
+ if($validUser->getId() == $posterId){
+ $this->_posterId = $posterId;
+ break;
+ }
+ }
+ if($this->_posterId == null)
+ $this->_posterId = $this->_blogInfo->getOwnerId();
+ }
else {
$this->_posterId = $this->_userInfo->getId();
}
More information about the pLog-svn
mailing list