diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-03-08 15:51:47 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-03-08 15:51:47 +0100 |
commit | d27c0c1701c342ed9d6553163a71ac5cd7314a9f (patch) | |
tree | f565a5dd36cceba6abd63a74941caa719e749c5d /lib | |
parent | 9b50ec5c405ff215dd0d67491752f3c56ce7749e (diff) | |
parent | 49f299d6a332f8755f3b7a20c414702cca9c5ab8 (diff) | |
download | rpg-d27c0c1701c342ed9d6553163a71ac5cd7314a9f.tar.gz rpg-d27c0c1701c342ed9d6553163a71ac5cd7314a9f.tar.bz2 |
Merge pull request #588 from splitbrain/purge_E_ALL
Purge error log messages to support use of E_ALL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/mediamanager.php | 4 | ||||
-rw-r--r-- | lib/plugins/acl/admin.php | 12 | ||||
-rw-r--r-- | lib/plugins/info/syntax.php | 4 | ||||
-rw-r--r-- | lib/plugins/syntax.php | 8 | ||||
-rw-r--r-- | lib/plugins/usermanager/admin.php | 2 |
5 files changed, 18 insertions, 12 deletions
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index d94a24c74..7044232ce 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -57,7 +57,7 @@ } // give info on PHP caught upload errors - if($_FILES['upload']['error']){ + if(!empty($_FILES['upload']['error'])){ switch($_FILES['upload']['error']){ case 1: case 2: @@ -71,7 +71,7 @@ } // handle upload - if($_FILES['upload']['tmp_name']){ + if(!empty($_FILES['upload']['tmp_name'])){ $JUMPTO = media_upload($NS,$AUTH); if($JUMPTO) $NS = getNS($JUMPTO); } diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 6c7c28ff6..de38aedd5 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -268,7 +268,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { usort($data,array($this,'_tree_sort')); $count = count($data); if($count>0) for($i=1; $i<$count; $i++){ - if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) unset($data[$i]); + if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) { + unset($data[$i]); + $i++; // duplicate found, next $i can't be a duplicate, so skip forward one + } } return $data; } @@ -488,7 +491,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { function _html_list_acl($item){ $ret = ''; // what to display - if($item['label']){ + if(!empty($item['label'])){ $base = $item['label']; }else{ $base = ':'.$item['id']; @@ -496,8 +499,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // highlight? - if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) + if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) { $cl = ' cur'; + } else { + $cl = ''; + } // namespace or page? if($item['type']=='d'){ diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index f8c6eb484..9265f44d5 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -48,7 +48,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Handle the match */ - function handle($match, $state, $pos, Doku_Handler &$handler){ + function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end return array(strtolower($match)); } @@ -56,7 +56,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Create output */ - function render($format, Doku_Renderer &$renderer, $data) { + function render($format, Doku_Renderer $renderer, $data) { if($format == 'xhtml'){ /** @var Doku_Renderer_xhtml $renderer */ //handle various info stuff diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 7ab9c30e1..42a4903ec 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -63,10 +63,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * @param string $match The text matched by the patterns * @param int $state The lexer state for the match * @param int $pos The character position of the matched text - * @param Doku_Handler $handler Reference to the Doku_Handler object + * @param Doku_Handler $handler The Doku_Handler object * @return array Return an array with all data you want to use in render */ - function handle($match, $state, $pos, Doku_Handler &$handler){ + function handle($match, $state, $pos, Doku_Handler $handler){ trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); } @@ -89,11 +89,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * created * * @param $format string output format being rendered - * @param $renderer Doku_Renderer reference to the current renderer object + * @param $renderer Doku_Renderer the current renderer object * @param $data array data created by handler() * @return boolean rendered correctly? */ - function render($format, Doku_Renderer &$renderer, $data) { + function render($format, Doku_Renderer $renderer, $data) { trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); } diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index eadfb76ad..b67d91b36 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -53,7 +53,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } // attempt to retrieve any import failures from the session - if ($_SESSION['import_failures']){ + if (!empty($_SESSION['import_failures'])){ $this->_import_failures = $_SESSION['import_failures']; } } |