more scrutinizer issue improvements

This commit is contained in:
Gerrit Uitslag 2014-09-29 21:45:27 +02:00
parent e0c26282a6
commit 59bc3b48fd
33 changed files with 110 additions and 71 deletions

View File

@ -15,6 +15,7 @@
class IXR_Value {
/** @var IXR_Value[]|IXR_Date|IXR_Base64|int|bool|double|string */
var $data;
var $type;
function IXR_Value ($data, $type = false) {
@ -177,7 +178,7 @@ class IXR_Message {
return true;
}
function tag_open($parser, $tag, $attr) {
$this->currentTag = $tag;
$this->_currentTag = $tag;
$this->_currentTagContents = '';
switch($tag) {
case 'methodCall':

View File

@ -42,6 +42,7 @@
class JpegMeta {
var $_fileName;
var $_fp = null;
var $_fpout = null;
var $_type = 'unknown';
var $_markers;
@ -527,12 +528,12 @@ class JpegMeta {
/**
* Get the image's title, tries various fields
*
* @param int $max maximum number chars (keeps words)
* @param int $max maximum number chars (keeps words)
* @return bool|mixed|string
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getTitle($max=80){
$cap = '';
// try various fields
$cap = $this->getField(array('Iptc.Headline',
'Iptc.Caption',
@ -560,6 +561,7 @@ class JpegMeta {
$this->_parseAll();
if ($this->_markers == null) {
if (@isset($this->_info['file']['UnixTime'])) {
$dates = array();
$dates['FileModified'] = $this->_info['file']['UnixTime'];
$dates['Time'] = $this->_info['file']['UnixTime'];
$dates['TimeSource'] = 'FileModified';
@ -1334,7 +1336,6 @@ class JpegMeta {
return false;
}
$pos = 0;
$this->_info['jfif'] = array();
$vmaj = $this->_getByte($data, 5);
@ -1420,7 +1421,6 @@ class JpegMeta {
break;
default:
return false;
break;
}
$this->_info['sof']['Format'] = $format;

View File

@ -130,7 +130,7 @@ class Mailer {
* If an empy value is passed, the header is removed
*
* @param string $header the header name (no trailing colon!)
* @param string $value the value of the header
* @param string|string[] $value the value of the header
* @param bool $clean remove all non-ASCII chars and line feeds?
*/
public function setHeader($header, $value, $clean = true) {
@ -177,7 +177,7 @@ class Mailer {
* @param string $text plain text body
* @param array $textrep replacements to apply on the text part
* @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep
* @param array $html the HTML body, leave null to create it from $text
* @param string $html the HTML body, leave null to create it from $text
* @param bool $wrap wrap the HTML in the default header/Footer
*/
public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) {
@ -283,7 +283,7 @@ class Mailer {
* Add the To: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function to($address) {
$this->setHeader('To', $address, false);
@ -293,7 +293,7 @@ class Mailer {
* Add the Cc: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function cc($address) {
$this->setHeader('Cc', $address, false);
@ -303,7 +303,7 @@ class Mailer {
* Add the Bcc: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function bcc($address) {
$this->setHeader('Bcc', $address, false);

View File

@ -681,6 +681,7 @@ class RemoteAPICore {
$pagelog->setChunkSize(1024);
$info = $pagelog->getRevisionInfo($time);
if(!empty($info)) {
$data = array();
$data['user'] = $info['user'];
$data['ip'] = $info['ip'];
$data['type'] = $info['type'];

View File

@ -536,6 +536,7 @@ class Tar {
$header = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix", $block);
if(!$header) return false;
$return = array();
$return['checksum'] = OctDec(trim($header['checksum']));
if($return['checksum'] != $chks) return false;

View File

@ -24,10 +24,12 @@ class ZipLib {
@rewind($zip);
@fseek($zip, $centd['offset']);
$ret = array();
for ($i=0; $i<$centd['entries']; $i++) {
$header = $this->ReadCentralFileHeaders($zip);
$header['index'] = $i;
$info = array();
$info['filename'] = $header['filename'];
$info['stored_filename'] = $header['stored_filename'];
$info['size'] = $header['size'];
@ -48,6 +50,7 @@ class ZipLib {
function Add($files,$compact) {
if(!is_array($files[0])) $files=Array($files);
$ret = array();
for($i=0;$files[$i];$i++){
$fn = $files[$i];
if(!in_Array(dirname($fn[0]),$this->dirs))
@ -189,7 +192,6 @@ class ZipLib {
*/
function Extract ( $zn, $to, $index = Array(-1) ) {
if(!@is_dir($to)) $this->_mkdir($to);
$ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(-1);
$cdir = $this->ReadCentralDir($zip,$zn);
@ -203,6 +205,7 @@ class ZipLib {
return(-1);
}
$stat = array();
for ($i=0; $i<$cdir['entries']; $i++) {
@fseek($zip, $pos_entry);
$header = $this->ReadCentralFileHeaders($zip);
@ -320,6 +323,7 @@ class ZipLib {
$data=unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size',
fread($zip, 18));
$centd = array();
if ($data['comment_size'] != 0){
$centd['comment'] = fread($zip, $data['comment_size']);
} else {
@ -421,7 +425,6 @@ class ZipLib {
function ExtractStr($zn, $name) {
$ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(null);
$cdir = $this->ReadCentralDir($zip,$zn);

View File

@ -600,7 +600,6 @@ function act_export($act){
$pre = '';
$post = '';
$output = '';
$headers = array();
// search engines: never cache exported docs! (Google only currently)

View File

@ -1129,6 +1129,7 @@ function auth_deleteprofile(){
}
}
$deleted = array();
$deleted[] = $INPUT->server->str('REMOTE_USER');
if($auth->triggerUserMod('delete', array($deleted))) {
// force and immediate logout including removing the sticky cookie

View File

@ -120,6 +120,7 @@ function basicinfo($id, $htmlClient=true){
global $INPUT;
// set info about manager/admin status.
$info = array();
$info['isadmin'] = false;
$info['ismanager'] = false;
if($INPUT->server->has('REMOTE_USER')) {
@ -685,6 +686,7 @@ function checkwordblock($text = '') {
}
if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) {
// prepare event data
$data = array();
$data['matches'] = $matches;
$data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
if($INPUT->server->str('REMOTE_USER')) {
@ -1119,6 +1121,7 @@ function rawWikiSlices($range, $id, $rev = '') {
$from = !$from ? 0 : ($from - 1);
$to = !$to ? strlen($text) : ($to - 1);
$slices = array();
$slices[0] = substr($text, 0, $from);
$slices[1] = substr($text, $from, $to - $from);
$slices[2] = substr($text, $to);

View File

@ -23,6 +23,7 @@ if(!defined('FT_SNIPPET_NUMBER')) define('FT_SNIPPET_NUMBER',15);
*/
function ft_pageSearch($query,&$highlight){
$data = array();
$data['query'] = $query;
$data['highlight'] =& $highlight;

View File

@ -1902,6 +1902,7 @@ function html_debug(){
print '</pre>';
if (function_exists('apache_get_version')) {
$apache = array();
$apache['version'] = apache_get_version();
if (function_exists('apache_get_modules')) {

View File

@ -296,6 +296,7 @@ define('MSG_ADMINS_ONLY',4);
*/
function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
global $MSG, $MSG_shown;
$errors = array();
$errors[-1] = 'error';
$errors[0] = 'info';
$errors[1] = 'success';
@ -452,7 +453,7 @@ function dbg_backtrace(){
}elseif(is_array($arg)){
$params[] = '[Array]';
}elseif(is_null($arg)){
$param[] = '[NULL]';
$params[] = '[NULL]';
}else{
$params[] = (string) '"'.$arg.'"';
}

View File

@ -231,6 +231,7 @@ function media_delete($id,$auth){
$file = mediaFN($id);
// trigger an event - MEDIA_DELETE_FILE
$data = array();
$data['id'] = $id;
$data['name'] = utf8_basename($file);
$data['path'] = $file;
@ -439,6 +440,7 @@ function media_save($file, $id, $ow, $auth, $move) {
}
// prepare event data
$data = array();
$data[0] = $file['name'];
$data[1] = $fn;
$data[2] = $id;
@ -910,11 +912,11 @@ function media_tab_history($image, $ns, $auth=null) {
*
* @param string $image media id
* @param int $auth permission level
* @param int|bool $rev
* @param int|string $rev revision timestamp or empty string
* @param JpegMeta|bool $meta
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_preview($image, $auth, $rev=false, $meta=false) {
function media_preview($image, $auth, $rev='', $meta=false) {
$size = media_image_preview_size($image, $rev, $meta);
@ -999,11 +1001,11 @@ function media_preview_buttons($image, $auth, $rev='') {
* Returns image width and height for mediamanager preview panel
*
* @author Kate Arzamastseva <pshns@ukr.net>
* @param string $image
* @param int|string $rev
* @param JpegMeta $meta
* @param int $size
* @return array
* @param string $image
* @param int|string $rev
* @param JpegMeta|bool $meta
* @param int $size
* @return array|bool
*/
function media_image_preview_size($image, $rev, $meta, $size = 500) {
if (!preg_match("/\.(jpe?g|gif|png)$/", $image) || !file_exists(mediaFN($image, $rev))) return false;
@ -1158,6 +1160,7 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
}
// prepare event data
$data = array();
$data[0] = $image;
$data[1] = $l_rev;
$data[2] = $r_rev;
@ -1397,13 +1400,12 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural
global $lang;
$ns = cleanID($ns);
$evdata = array(
'ns' => $ns,
'data' => array(),
'query' => $query
);
if ($query) {
$evdata = array(
'ns' => $ns,
'data' => array(),
'query' => $query
);
$evt = new Doku_Event('MEDIA_SEARCH', $evdata);
if ($evt->advise_before()) {
$dir = utf8_encodeFN(str_replace(':','/',$evdata['ns']));
@ -2169,6 +2171,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
}
// create an image of the given filetype
$image = false;
if ($ext == 'jpg' || $ext == 'jpeg'){
if(!function_exists("imagecreatefromjpeg")) return false;
$image = @imagecreatefromjpeg($from);
@ -2182,6 +2185,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
}
if(!$image) return false;
$newimg = false;
if(($conf['gdlib']>1) && function_exists("imagecreatetruecolor") && $ext != 'gif'){
$newimg = @imagecreatetruecolor ($to_w, $to_h);
}
@ -2266,14 +2270,14 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
function media_alternativefiles($src, $exts){
$files = array();
list($srcExt, $srcMime) = mimetype($src);
list($srcExt, /* $srcMime */) = mimetype($src);
$filebase = substr($src, 0, -1 * (strlen($srcExt)+1));
foreach($exts as $ext) {
$fileid = $filebase.'.'.$ext;
$file = mediaFN($fileid);
if(file_exists($file)) {
list($fileExt, $fileMime) = mimetype($file);
list(/* $fileExt */, $fileMime) = mimetype($file);
$files[$fileMime] = $fileid;
}
}

View File

@ -56,12 +56,12 @@ class Doku_LexerParallelRegex {
/**
* Adds a pattern with an optional label.
*
* @param mixed $pattern Perl style regex. Must be UTF-8
* @param mixed $pattern Perl style regex. Must be UTF-8
* encoded. If its a string, the (, )
* lose their meaning unless they
* form part of a lookahead or
* lookbehind assertation.
* @param string $label Label of regex to be returned
* @param bool|string $label Label of regex to be returned
* on a match. Label must be ASCII
* @access public
*/
@ -151,7 +151,8 @@ class Doku_LexerParallelRegex {
* "or" operator. Caches the regex.
* Will automatically escape (, ) and / tokens.
*
* @param array $patterns List of patterns in order.
* @internal array $_patterns List of patterns in order.
* @return null|string
* @access private
*/
function _getCompoundedRegex() {
@ -297,6 +298,7 @@ class Doku_Lexer {
*/
function Doku_Lexer(&$parser, $start = "accept", $case = false) {
$this->_case = $case;
/** @var Doku_LexerParallelRegex[] _regexes */
$this->_regexes = array();
$this->_parser = &$parser;
$this->_mode = new Doku_LexerStateStack($start);
@ -425,11 +427,13 @@ class Doku_Lexer {
* Sends the matched token and any leading unmatched
* text to the parser changing the lexer to a new
* mode if one is listed.
* @param string $unmatched Unmatched leading portion.
* @param string $matched Actual token match.
* @param string $mode Mode after match. A boolean
* @param string $unmatched Unmatched leading portion.
* @param string $matched Actual token match.
* @param bool|string $mode Mode after match. A boolean
* false mode causes no change.
* @param int $pos Current byte index location in raw doc
* @param int $initialPos
* @param int $matchPos
* Current byte index location in raw doc
* thats being parsed
* @return boolean False if there was any error
* from the parser.
@ -498,11 +502,12 @@ class Doku_Lexer {
* Calls the parser method named after the current
* mode. Empty content will be ignored. The lexer
* has a parser handler for each mode in the lexer.
* @param string $content Text parsed.
* @param boolean $is_match Token is recognised rather
* @param string $content Text parsed.
* @param boolean $is_match Token is recognised rather
* than unparsed data.
* @param int $pos Current byte index location in raw doc
* @param int $pos Current byte index location in raw doc
* thats being parsed
* @return bool
* @access private
*/
function _invokeParser($content, $is_match, $pos) {

View File

@ -421,8 +421,8 @@ class Doku_Renderer_metadata extends Doku_Renderer {
/**
* keep track of internal links in $this->meta['relation']['references']
*
* @param string $id page ID to link to. eg. 'wiki:syntax'
* @param string|array $name name for the link, array for media file
* @param string $id page ID to link to. eg. 'wiki:syntax'
* @param string|array|null $name name for the link, array for media file
*/
function internallink($id, $name = null) {
global $ID;
@ -458,8 +458,8 @@ class Doku_Renderer_metadata extends Doku_Renderer {
/**
* Render an external link
*
* @param string $url full URL with scheme
* @param string|array $name name for the link, array for media file
* @param string $url full URL with scheme
* @param string|array|null $name name for the link, array for media file
*/
function externallink($url, $name = null) {
if(is_array($name)) {
@ -628,9 +628,9 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* Construct a title and handle images in titles
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @param string|array $title either string title or media array
* @param string $default default title if nothing else is found
* @param null|string $id linked page id (used to extract title from first heading)
* @param string|array|null $title either string title or media array
* @param string $default default title if nothing else is found
* @param null|string $id linked page id (used to extract title from first heading)
* @return string title text
*/
function _getLinkTitle($title, $default, $id = null) {

View File

@ -820,6 +820,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// now first resolve and clean up the $id
resolve_pageid(getNS($ID), $id, $exists);
$link = array();
$name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype);
if(!$isImage) {
if($exists) {
@ -904,6 +905,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
//prepare for formating
$link = array();
$link['target'] = $conf['target']['extern'];
$link['style'] = '';
$link['pre'] = '';
@ -981,6 +983,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $conf;
//simple setup
$link = array();
$link['target'] = $conf['target']['windows'];
$link['pre'] = '';
$link['suf'] = '';
@ -1656,7 +1659,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// prepare alternative formats
$extensions = array('webm', 'ogv', 'mp4');
$files = media_alternativefiles($src, $extensions);
$poster = media_alternativefiles($src, array('jpg', 'png'), true);
$poster = media_alternativefiles($src, array('jpg', 'png'));
if(!empty($poster)) {
$posterUrl = ml(reset($poster), '', true, '&');
}
@ -1700,7 +1703,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @param array $atts - additional attributes for the <audio> tag
* @return string
*/
function _audio($src, $atts = null) {
function _audio($src, $atts = array()) {
$files = array();
$isExternal = media_isexternal($src);

View File

@ -73,7 +73,7 @@ class Doku_Plugin_Controller {
//we keep all loaded plugins available in global scope for reuse
global $DOKU_PLUGINS;
list($plugin,$component) = $this->_splitName($name);
list($plugin, /* $component */) = $this->_splitName($name);
// check if disabled
if(!$disabled && $this->isdisabled($plugin)){

View File

@ -85,7 +85,7 @@ class RemoteAPI {
if ($args === null) {
$args = array();
}
list($type, $pluginName, $call) = explode('.', $method, 3);
list($type, $pluginName, /* $call */) = explode('.', $method, 3);
if ($type === 'plugin') {
return $this->callPlugin($pluginName, $method, $args);
}

View File

@ -258,6 +258,7 @@ function search_allpages(&$data,$base,$file,$type,$lvl,$opts){
//only search txt files
if(substr($file,-4) != '.txt') return true;
$item = array();
$item['id'] = pathID($file);
if(!$opts['skipacl'] && auth_quickaclcheck($item['id']) < AUTH_READ){
return false;

View File

@ -454,7 +454,7 @@ class Subscription {
global $conf;
$file = mediaFN($id);
list($mime, $ext) = mimetype($id);
list($mime, /* $ext */) = mimetype($id);
$trep = array(
'MIME' => $mime,

View File

@ -759,7 +759,6 @@ function tpl_get_action($type) {
break;
default:
return '[unknown %s type]';
break;
}
return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement');
}

View File

@ -84,7 +84,7 @@ function runTrimRecentChanges($media_changes = false) {
io_saveFile($fn.'_tmp', ''); // presave tmp as 2nd lock
$trim_time = time() - $conf['recent_days']*86400;
$out_lines = array();
$old_lines = array();
for ($i=0; $i<count($lines); $i++) {
$log = parseChangelogLine($lines[$i]);
if ($log === false) continue; // discard junk

View File

@ -762,6 +762,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
*/
function _html_select(){
$inlist = false;
$usel = '';
$gsel = '';
if($this->who &&
!in_array($this->who,$this->usersgroups) &&
@ -770,11 +772,9 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
if($this->who{0} == '@'){
$gsel = ' selected="selected"';
}else{
$usel = ' selected="selected"';
$usel = ' selected="selected"';
}
}else{
$usel = '';
$gsel = '';
$inlist = true;
}

View File

@ -18,11 +18,13 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin {
}
function addAcl($scope, $user, $level){
/** @var admin_plugin_acl $apa */
$apa = plugin_load('admin', 'acl');
return $apa->_acl_add($scope, $user, $level);
}
function delAcl($scope, $user){
/** @var admin_plugin_acl $apa */
$apa = plugin_load('admin', 'acl');
return $apa->_acl_del($scope, $user);
}

View File

@ -124,8 +124,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
'modify' => 'modifyUser',
'delete' => 'deleteUsers'
);
if(empty($validTypes[$type]))
if(empty($validTypes[$type])) {
return false;
}
$result = false;
$eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null);
$evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata);
if($evt->advise_before(true)) {

View File

@ -947,5 +947,3 @@ class adLDAP {
* }
*/
class adLDAPException extends Exception {}
?>

View File

@ -203,6 +203,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
//general user info
$info = array();
$info['name'] = $result[0]['displayname'][0];
$info['mail'] = $result[0]['mail'][0];
$info['uid'] = $result[0]['samaccountname'][0];

View File

@ -181,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
$info = array();
$info['user'] = $user;
$info['server'] = $this->getConf('server');

View File

@ -366,7 +366,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
*
* @param int $first index of first user to be returned
* @param int $limit max number of users to be returned
* @param array|string $filter array of field/pattern pairs
* @param array $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {

View File

@ -775,6 +775,7 @@ if (!class_exists('setting_email')) {
* update setting with user provided value $input
* if value fails error check, save it
*
* @param mixed $input
* @return boolean true if changed, false otherwise (incl. on error)
*/
function update($input) {
@ -925,6 +926,7 @@ if (!class_exists('setting_onoff')) {
if (!class_exists('setting_multichoice')) {
class setting_multichoice extends setting_string {
var $_choices = array();
var $lang; //some custom language strings are stored in setting
function html(&$plugin, $echo = false) {
$value = '';
@ -1125,7 +1127,7 @@ if (!class_exists('setting_multicheckbox')) {
// handle any remaining values
$other = join(',',$value);
$class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
$class = ((count($default) == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
" selectiondefault" : "";
$input .= '<div class="other'.$class.'">'."\n";

View File

@ -122,7 +122,7 @@ if (!class_exists('setting_disableactions')) {
// make some language adjustments (there must be a better way)
// transfer some DokuWiki language strings to the plugin
if (!$plugin->localised) $this->setupLocale();
if (!$plugin->localised) $plugin->setupLocale();
$plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs'];
foreach ($this->_choices as $choice)
@ -159,7 +159,7 @@ if (!class_exists('setting_license')) {
foreach($license as $key => $data){
$this->_choices[] = $key;
$this->lang[$this->_key.'_o_'.$key] = $data['name'];
$this->lang[$this->_key.'_o_'.$key] = $data['name']; // stored in setting
}
parent::initialize($default,$local,$protected);
@ -171,6 +171,7 @@ if (!class_exists('setting_license')) {
if (!class_exists('setting_renderer')) {
class setting_renderer extends setting_multichoice {
var $_prompts = array();
var $_format = null;
function initialize($default,$local,$protected) {
$format = $this->_format;
@ -192,7 +193,7 @@ if (!class_exists('setting_renderer')) {
// make some language adjustments (there must be a better way)
// transfer some plugin names to the config plugin
if (!$plugin->localised) $this->setupLocale();
if (!$plugin->localised) $plugin->setupLocale();
foreach ($this->_choices as $choice) {
if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) {

View File

@ -104,7 +104,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
*
* uses some of the original renderer methods
*/
function _plugins_xhtml($type, Doku_Renderer &$renderer){
function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){
global $lang;
$renderer->doc .= '<ul>';
@ -142,7 +142,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
*
* uses some of the original renderer methods
*/
function _helpermethods_xhtml(Doku_Renderer &$renderer){
function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){
$plugins = plugin_list('helper');
foreach($plugins as $p){
if (!$po = plugin_load('helper',$p)) continue;
@ -249,12 +249,17 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Adds a TOC item
*
* @param string $text
* @param int $level
* @param Doku_Renderer_xhtml $renderer
* @return string
*/
function _addToTOC($text, $level, Doku_Renderer &$renderer){
protected function _addToTOC($text, $level, Doku_Renderer_xhtml $renderer){
global $conf;
$hid = '';
if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){
/** @var $renderer Doku_Renderer_xhtml */
$hid = $renderer->_headerToLink($text, true);
$renderer->toc[] = array(
'hid' => $hid,

View File

@ -738,6 +738,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
global $auth;
global $INPUT;
$user = array();
$user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid');
$user[1] = $INPUT->str('userpass');
$user[2] = $INPUT->str('username');
@ -764,7 +765,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_filter = array();
if ($op == 'new') {
list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false);
list($user,/* $pass */,$name,$mail,$grps) = $this->_retrieveUser(false);
if (!empty($user)) $this->_filter['user'] = $user;
if (!empty($name)) $this->_filter['name'] = $name;
@ -816,6 +817,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$disabled = 'disabled="disabled"';
$buttons = array();
$buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : '';
if ($this->_user_total == -1) {
@ -951,7 +953,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$INPUT->set('usergroups', $candidate[4]);
$cleaned = $this->_retrieveUser();
list($user,$pass,$name,$mail,$grps) = $cleaned;
list($user,/* $pass */,$name,$mail,/* $grps */) = $cleaned;
if (empty($user)) {
$error = $this->lang['import_error_baduserid'];
return false;