rename check_access to check_view_access, first param of html_url is no longer optional

This commit is contained in:
Uwe Steinmann 2021-07-07 08:25:26 +02:00
parent bf45f09381
commit 132cbf336a

View File

@ -263,7 +263,7 @@ class SeedDMS_View_Common {
* @param string|array $name name of view or list of view names * @param string|array $name name of view or list of view names
* @return boolean true if access is allowed otherwise false * @return boolean true if access is allowed otherwise false
*/ */
protected function check_access($name='') { /* {{{ */ protected function check_view_access($name='') { /* {{{ */
if(!$name) if(!$name)
$name = $this; $name = $this;
if(!isset($this->params['accessobject'])) if(!isset($this->params['accessobject']))
@ -288,7 +288,7 @@ class SeedDMS_View_Common {
* @param array $urlparams list of url parameters * @param array $urlparams list of url parameters
* @return string $url * @return string $url
*/ */
protected function html_url($view='', $urlparams) { /* {{{ */ protected function html_url($view, $urlparams=array()) { /* {{{ */
$url = $this->params['settings']->_httpRoot."out/out.".$view.".php"; $url = $this->params['settings']->_httpRoot."out/out.".$view.".php";
if($urlparams) if($urlparams)
$url .= "?".http_build_query($urlparams); $url .= "?".http_build_query($urlparams);
@ -309,7 +309,7 @@ class SeedDMS_View_Common {
*/ */
protected function html_link($view='', $urlparams=array(), $linkparams=array(), $link, $hsc=true, $nocheck=false, $wrap=array()) { /* {{{ */ protected function html_link($view='', $urlparams=array(), $linkparams=array(), $link, $hsc=true, $nocheck=false, $wrap=array()) { /* {{{ */
if(!$nocheck) if(!$nocheck)
if(!$this->check_access($view)) if(!$this->check_view_access($view))
return ''; return '';
$url = $this->html_url($view, $urlparams); $url = $this->html_url($view, $urlparams);
$tag = "<a href=\"".$url."\""; $tag = "<a href=\"".$url."\"";