Skip to content

Commit

Permalink
sanitations
Browse files Browse the repository at this point in the history
  • Loading branch information
alice committed Aug 22, 2020
1 parent 47559ee commit 3a7cd15
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tpl_functions.php
Expand Up @@ -37,7 +37,7 @@

/**
* Prints the sidebars
*
*
* @author Michael Klier <chi@chimeric.de>
*/
function arctic_tpl_sidebar($pos) {
Expand Down Expand Up @@ -77,7 +77,7 @@ function arctic_tpl_sidebar_dispatch($sb,$pos) {
global $TOC;

$svID = $ID; // save current ID
$svREV = $REV; // save current REV
$svREV = $REV; // save current REV
$svTOC = $TOC; // save current TOC

$pname = tpl_getConf('pagename');
Expand Down Expand Up @@ -135,7 +135,7 @@ function arctic_tpl_sidebar_dispatch($sb,$pos) {
}
// check for namespace sidebars in user namespace too
if(preg_match('/'.$user_ns.':'.$user.':.*/', $svID)) {
$ns_sb = _getNsSb($svID);
$ns_sb = _getNsSb($svID);
if($ns_sb && $ns_sb != $user_sb && auth_quickaclcheck($ns_sb) >= AUTH_READ) {
print '<aside class="namespace_sidebar sidebar_box">' . DOKU_LF;
print p_sidebar_xhtml($ns_sb,$pos) . DOKU_LF;
Expand Down Expand Up @@ -182,7 +182,7 @@ function arctic_tpl_sidebar_dispatch($sb,$pos) {
}
}
break;

case 'toolbox':

if(tpl_getConf('hideactions') && !isset($_SERVER['REMOTE_USER'])) return;
Expand All @@ -198,16 +198,16 @@ function arctic_tpl_sidebar_dispatch($sb,$pos) {
print ' </div>' . DOKU_LF;
print '</div>' . DOKU_LF;
} else {
$actions = array('admin',
'revert',
'edit',
'history',
'recent',
'backlink',
'media',
$actions = array('admin',
'revert',
'edit',
'history',
'recent',
'backlink',
'media',
'subscribe',
'index',
'login',
'index',
'login',
'profile',
'top');

Expand Down Expand Up @@ -281,11 +281,11 @@ function arctic_tpl_sidebar_dispatch($sb,$pos) {
}

/**
* Removes the TOC of the sidebar pages and
* Removes the TOC of the sidebar pages and
* shows a edit button if the user has enough rights
*
* TODO sidebar caching
*
*
* @author Michael Klier <chi@chimeric.de>
*/
function p_sidebar_xhtml($sb,$pos,$subst=array()) {
Expand Down Expand Up @@ -354,7 +354,7 @@ function _getNsSb($id) {
if(@page_exists($ns_sb)) return $ns_sb;
array_pop($path);
}

// nothing found
return false;
}
Expand Down

0 comments on commit 3a7cd15

Please sign in to comment.