From 4590a14de1fb430acae7b1ee7f894f93288861e4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:01:20 +0200 Subject: [PATCH 1/5] fix html_link(), link attributes can't be added --- inc/inc.ClassViewCommon.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 00ecbe8f3..791586658 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -229,7 +229,8 @@ class SeedDMS_View_Common { $url = $this->html_url($view, $urlparams); $tag = "$v) + $tag .= " ".$k."=\"".$v."\""; $tag .= ">".($hsc ? htmlspecialchars($link) : $link).""; return $tag; } /* }}} */ From 5912354f098a89671220fefd2aac0255ac13b1c0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:01:59 +0200 Subject: [PATCH 2/5] set accessobject in view --- out/out.Settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.Settings.php b/out/out.Settings.php index 271f089ac..7446e6e3f 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -38,6 +38,7 @@ if(!trim($settings->_encryptionKey)) if($view) { $view->setParam('settings', $settings); $view->setParam('currenttab', (isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : '')); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From ae3c5faef5e0f1fc254812c9b2af7141b644d405 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:02:30 +0200 Subject: [PATCH 3/5] use html_link() --- views/bootstrap/class.GroupMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 951e19309..2438f17e7 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -169,7 +169,7 @@ $(document).ready( function() { ?> - + html_link('RemoveGroup', array('groupid'=>$group->getID()), array('class'=>'btn'), ' '.getMLText("rm_group"), false); ?> Date: Wed, 20 Apr 2016 09:02:57 +0200 Subject: [PATCH 4/5] user html_url() and html_link() --- views/bootstrap/class.UserList.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index 931f7e3fc..339829b94 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -56,7 +56,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { echo ""; echo ""; if ($currUser->hasImage()) - print ""; + print "html_url('UserImage', array('userid'=>$currUser->getId()))."\" >"; echo ""; echo ""; echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")
"; @@ -105,11 +105,12 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { } echo ""; echo ""; - echo "
"; - echo "getID()."\"> "; - if ($this->check_access('RemoveUser')) - echo "getID()."\">"; - echo "
"; + if($this->check_access(array('UsrMgr', 'RemoveUser'))) { + echo "
"; + echo $this->html_link('UsrMgr', array('userid'=>$currUser->getID()), array(), '', false); + echo $this->html_link('RemoveUser', array('userid'=>$currUser->getID()), array(), '', false); + echo "
"; + } echo ""; echo ""; } From dccb4c476a32c61d19bf98607347ca0e76f8464f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:03:15 +0200 Subject: [PATCH 5/5] use html_url() for image --- views/bootstrap/class.UsrMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 6b4560857..e241b0a37 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -189,7 +189,7 @@ $(document).ready( function() { ?> - + html_link('RemoveUser', array('userid'=>$currUser->getID()), array('class'=>'btn'), ' '.getMLText("rm_user"), false); ?> hasImage()) - print ""; + print "html_url('UserImage', array('userid'=>$currUser->getId()))."\" >"; else printMLText("no_user_image"); ?>