Author: nathangray
New Revision: 36018
URL: http://svn.stylite.de/viewvc/egroupware?rev=36018&view=rev
Log:
Fix Edit & Delete buttons in view
Modified:
trunk/news_admin/inc/class.uinews.inc.php
Modified: trunk/news_admin/inc/class.uinews.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/news_admin/inc/class.uinews.inc.php?rev=36018&r1=36017&r2=36018&view=diff
— trunk/news_admin/inc/class.uinews.inc.php (original)
+++ trunk/news_admin/inc/class.uinews.inc.php Fri Aug 5 22:12:01 2011
@@ -52,11 +52,22 @@
public function view($content = array())
{
$news_id = $content[‘news_id’] ? $content[‘news_id’] : $_GET[‘news_id’];
-
if(!$this->read($_GET['news_id'])) -
{ -
} -
$content = $this->data;
-
if(!$this->read($news_id)) -
{ -
} -
$content = array_merge($this->data, $content); -
if($content['edit']) -
{ -
return $this->edit($content); -
} -
elseif ($content['delete'] && $this->check_acl(EGW_ACL_DELETE)) -
{ -
$this->delete(array('news_id' => $this->data['news_id'])); -
$msg = lang('News deleted.'); -
echo "<html><body><script>var referer = '".($link=$GLOBALS['egw']->link($referer,array('msg' => $msg)))."'; window.close();</script></body></html>\n"; -
$GLOBALS['egw']->common->egw_exit(); -
} $sel_options = array( 'cat_id' => $this->rights2cats($this->data['news_id'] ? EGW_ACL_EDIT : EGW_ACL_ADD), 'visible' => $this->visiblity,
@@ -65,6 +76,7 @@
$readonlys[‘edit’] = !$this->check_acl(EGW_ACL_EDIT);
$readonlys[‘delete’] = !$this->check_acl(EGW_ACL_DELETE);
-
$preserve['news_id'] = $news_id; egw_framework::set_onload('$j(document).ready(popup_resize);'); $this->tpl->read('news_admin.view'); return $this->tpl->exec('news_admin.uinews.view',$content,$sel_options,$readonlys,$preserve,2);
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs