From 95905cbe48caa3de7d6d809a8f0d0cffc9df4720 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 12:18:38 +0200 Subject: make extension manager the default plugin This moves the old plugin manager down to the "other" plugins. It should probably be removed when when we decide the new one is good to go. --- inc/html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 96c4eaa1a..00b929c75 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1710,12 +1710,12 @@ function html_admin(){ } unset($menu['acl']); - if($menu['plugin']){ + if($menu['extension']){ ptln('
  • '); + ''. + $menu['extension']['prompt'].''); } - unset($menu['plugin']); + unset($menu['extension']); if($menu['config']){ ptln('
  • '. -- cgit v1.2.3 From a04f2bd5a2eae55dbbdbbcffbe7b500b689138e7 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 15 Oct 2013 16:08:45 +0200 Subject: not assign object from plugin_load by reference --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 03e9dc751..68ca364f1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1669,7 +1669,7 @@ function html_admin(){ $menu = array(); foreach ($pluginlist as $p) { /** @var DokuWiki_Admin_Plugin $obj */ - if($obj =& plugin_load('admin',$p) === null) continue; + if($obj = plugin_load('admin',$p) === null) continue; // check permissions if($obj->forAdminOnly() && !$INFO['isadmin']) continue; -- cgit v1.2.3 From 5da403f17a007f1b202f1c5ea2dbc80ab19d26e8 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 15 Oct 2013 16:26:25 +0200 Subject: fix signatures and old by references --- inc/html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 68ca364f1..2d7216a45 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1661,7 +1661,7 @@ function html_admin(){ global $ID; global $INFO; global $conf; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; // build menu of admin functions from the plugins that handle them @@ -1669,7 +1669,7 @@ function html_admin(){ $menu = array(); foreach ($pluginlist as $p) { /** @var DokuWiki_Admin_Plugin $obj */ - if($obj = plugin_load('admin',$p) === null) continue; + if(($obj = plugin_load('admin',$p)) === null) continue; // check permissions if($obj->forAdminOnly() && !$INFO['isadmin']) continue; -- cgit v1.2.3 From 61e0b2f8bbbac3ec582aa287e110b304a3986229 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 18 Oct 2013 12:47:55 +0100 Subject: comment improvements --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 03e9dc751..a13c9e58c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -428,7 +428,7 @@ function html_revisions($first=0, $media_id = false){ global $conf; global $lang; $id = $ID; - /* we need to get one additionally log entry to be able to + /* we need to get one additional log entry to be able to * decide if this is the last page or is there another one. * see html_recent() */ -- cgit v1.2.3 From b1f535eb5e822dc2e16f687bb0a69c8643224d87 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 4 Nov 2013 01:24:22 +0000 Subject: removed deprecated html_attbuild() --- inc/html.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index bbe29e371..7f473cdb6 100644 --- a/inc/html.php +++ b/inc/html.php @@ -27,20 +27,6 @@ function html_wikilink($id,$name=null,$search=''){ return $xhtml_renderer->internallink($id,$name,$search,true,'navigation'); } -/** - * Helps building long attribute lists - * - * @deprecated Use buildAttributes instead - * @author Andreas Gohr - */ -function html_attbuild($attributes){ - $ret = ''; - foreach ( $attributes as $key => $value ) { - $ret .= $key.'="'.formText($value).'" '; - } - return trim($ret); -} - /** * The loginform * -- cgit v1.2.3 From e89b7c1e9d73d3a7ae9916d048a7ea43f56d279a Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 14 Feb 2014 17:37:42 +0000 Subject: Add Apache module list to ?do=debug information This should make it possible to see if mod_security is involved, at least on servers running mod_php. --- inc/html.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 5941a9af2..928991ae2 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1634,6 +1634,17 @@ function html_debug(){ print_r($inis); print ''; + if (function_exists('apache_get_version')) { + $apache['version'] = apache_get_version(); + + if (function_exists('apache_get_modules')) { + $apache['modules'] = apache_get_modules(); + } + print 'Apache
    ';
    +        print_r($apache);
    +        print '
    '; + } + print ''; } -- cgit v1.2.3 From 04032c735ec3e60ef6a82418ad3b35560e41c194 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 15:48:06 +0100 Subject: when creating a diff link always link to exact rev FS#2835 --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 928991ae2..0434f3b45 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){ $diffurl = wl($ID, array( 'do' => 'diff', 'rev2[0]' => $l_rev, - 'rev2[1]' => $r_rev, + 'rev2[1]' => $r_rev ? $r_rev : $INFO['lastmod'], // link to exactly this view FS#2835 'difftype' => $type, )); ptln('

    '.$lang['difflink'].'

    '); -- cgit v1.2.3 From 01c9a118dacc1e2c07f2b0ddee84c514022e5927 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 09:54:47 +0100 Subject: have most current revision always available in $INFO fixes fix for FS#2853 --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 0434f3b45..fcec29670 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){ $diffurl = wl($ID, array( 'do' => 'diff', 'rev2[0]' => $l_rev, - 'rev2[1]' => $r_rev ? $r_rev : $INFO['lastmod'], // link to exactly this view FS#2835 + 'rev2[1]' => $r_rev ? $r_rev : $INFO['currentrev'], // link to exactly this view FS#2835 'difftype' => $type, )); ptln('

    '.$lang['difflink'].'

    '); -- cgit v1.2.3 From 0e80bb5e347ff00c6f81627d8e39dafaaa923bc5 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 5 Mar 2014 21:58:46 +0000 Subject: use empty() where array values might not be set --- inc/html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index fcec29670..41f26e5cd 100644 --- a/inc/html.php +++ b/inc/html.php @@ -691,7 +691,7 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(form_makeOpenTag('div', array('class' => 'li'))); - if ($recent['media']) { + if (!empty($recent['media'])) { $form->addElement(media_printicon($recent['id'])); } else { $icon = DOKU_BASE.'lib/images/fileicons/file.png'; @@ -705,7 +705,7 @@ function html_recent($first=0, $show_changes='both'){ $diff = false; $href = ''; - if ($recent['media']) { + if (!empty($recent['media'])) { $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id']))); if ($diff) { $href = media_managerURL(array('tab_details' => 'history', @@ -715,7 +715,7 @@ function html_recent($first=0, $show_changes='both'){ $href = wl($recent['id'],"do=diff", false, '&'); } - if ($recent['media'] && !$diff) { + if (!empty($recent['media']) && !$diff) { $form->addElement(''); } else { $form->addElement(form_makeOpenTag('a', array('class' => 'diff_link', 'href' => $href))); @@ -729,7 +729,7 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(form_makeCloseTag('a')); } - if ($recent['media']) { + if (!empty($recent['media'])) { $href = media_managerURL(array('tab_details' => 'history', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&'); } else { @@ -745,7 +745,7 @@ function html_recent($first=0, $show_changes='both'){ ))); $form->addElement(form_makeCloseTag('a')); - if ($recent['media']) { + if (!empty($recent['media'])) { $href = media_managerURL(array('tab_details' => 'view', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&'); $class = (file_exists(mediaFN($recent['id']))) ? 'wikilink1' : $class = 'wikilink2'; $form->addElement(form_makeOpenTag('a', array('class' => $class, 'href' => $href))); -- cgit v1.2.3