diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/SafeFN.class.php | 12 | ||||
-rw-r--r-- | inc/TarLib.class.php | 420 | ||||
-rw-r--r-- | inc/events.php | 2 | ||||
-rw-r--r-- | inc/lang/ko/install.html | 2 | ||||
-rw-r--r-- | inc/lang/ko/lang.php | 16 | ||||
-rw-r--r-- | inc/lang/ko/mailtext.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/preview.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/showrev.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/updateprofile.txt | 2 | ||||
-rw-r--r-- | inc/lang/lv/lang.php | 11 | ||||
-rw-r--r-- | inc/lang/lv/mailwrap.html | 13 | ||||
-rw-r--r-- | inc/lang/lv/resetpwd.txt | 3 | ||||
-rw-r--r-- | inc/lang/sk/lang.php | 3 | ||||
-rw-r--r-- | inc/parser/metadata.php | 41 | ||||
-rw-r--r-- | inc/parser/renderer.php | 2 | ||||
-rw-r--r-- | inc/parserutils.php | 2 | ||||
-rw-r--r-- | inc/plugin.php | 2 |
17 files changed, 324 insertions, 213 deletions
diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php index ab05b9eae..b9e4a2b2a 100644 --- a/inc/SafeFN.class.php +++ b/inc/SafeFN.class.php @@ -44,7 +44,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - public function encode($filename) { + public static function encode($filename) { return self::unicode_to_safe(utf8_to_unicode($filename)); } @@ -73,15 +73,15 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - public function decode($filename) { + public static function decode($filename) { return unicode_to_utf8(self::safe_to_unicode(strtolower($filename))); } - public function validate_printable_utf8($printable_utf8) { + public static function validate_printable_utf8($printable_utf8) { return !preg_match('#[\x01-\x1f]#',$printable_utf8); } - public function validate_safe($safe) { + public static function validate_safe($safe) { return !preg_match('#[^'.self::$plain.self::$post_indicator.self::$pre_indicator.']#',$safe); } @@ -93,7 +93,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - private function unicode_to_safe($unicode) { + private static function unicode_to_safe($unicode) { $safe = ''; $converted = false; @@ -126,7 +126,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - private function safe_to_unicode($safe) { + private static function safe_to_unicode($safe) { $unicode = array(); $split = preg_split('#(?=['.self::$post_indicator.self::$pre_indicator.'])#',$safe,-1,PREG_SPLIT_NO_EMPTY); diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php index 126604cd1..e04c47cb8 100644 --- a/inc/TarLib.class.php +++ b/inc/TarLib.class.php @@ -13,7 +13,6 @@ * @author Christopher Smith <chris@jalakai.co.uk> */ - /** * Those constants represent the compression method to use. * COMPRESS_GZIP is used for the GZIP compression; COMPRESS_BZIP for @@ -68,15 +67,15 @@ class TarLib { var $_result; var $_initerror; - const COMPRESS_GZIP = 1; - const COMPRESS_BZIP = 2; - const COMPRESS_AUTO = 3; - const COMPRESS_NONE = 0; - const TARLIB_VERSION = '1.2'; - const FULL_ARCHIVE = -1; - const ARCHIVE_DYNAMIC = 0; + const COMPRESS_GZIP = 1; + const COMPRESS_BZIP = 2; + const COMPRESS_AUTO = 3; + const COMPRESS_NONE = 0; + const TARLIB_VERSION = '1.2'; + const FULL_ARCHIVE = -1; + const ARCHIVE_DYNAMIC = 0; const ARCHIVE_RENAMECOMP = 5; - const COMPRESS_DETECT = -1; + const COMPRESS_DETECT = -1; /** * constructor, initialize the class @@ -108,21 +107,21 @@ class TarLib { * represent the GZIP or BZIP compression level. 1 produce fast compression, * and 9 produce smaller files. See the RFC 1952 for more infos. */ - function __construct($p_filen = TarLib::ARCHIVE_DYNAMIC , $p_comptype = TarLib::COMPRESS_AUTO, $p_complevel = 9) { + function __construct($p_filen = TarLib::ARCHIVE_DYNAMIC, $p_comptype = TarLib::COMPRESS_AUTO, $p_complevel = 9) { $this->_initerror = 0; - $this->_nomf = $p_filen; - $flag=0; - if($p_comptype && $p_comptype % 5 == 0){ + $this->_nomf = $p_filen; + $flag = 0; + if($p_comptype && $p_comptype % 5 == 0) { $p_comptype /= TarLib::ARCHIVE_RENAMECOMP; - $flag=1; + $flag = 1; } if($p_complevel > 0 && $p_complevel <= 9) $this->_compzlevel = $p_complevel; - else $p_complevel = 9; + else $this->_compzlevel = 9; if($p_comptype == TarLib::COMPRESS_DETECT) { - if(strtolower(substr($p_filen,-3)) == '.gz') $p_comptype = TarLib::COMPRESS_GZIP; - elseif(strtolower(substr($p_filen,-4)) == '.bz2') $p_comptype = TarLib::COMPRESS_BZIP; + if(strtolower(substr($p_filen, -3)) == '.gz') $p_comptype = TarLib::COMPRESS_GZIP; + elseif(strtolower(substr($p_filen, -4)) == '.bz2') $p_comptype = TarLib::COMPRESS_BZIP; else $p_comptype = TarLib::COMPRESS_NONE; } @@ -152,7 +151,7 @@ class TarLib { if($this->_initerror < 0) $this->_comptype = TarLib::COMPRESS_NONE; - if($flag) $this->_nomf.= '.'.$this->getCompression(1); + if($flag) $this->_nomf .= '.'.$this->getCompression(1); $this->_result = true; } @@ -162,9 +161,9 @@ class TarLib { * This function does exactly the same as TarLib (constructor), except it * returns a status code. */ - function setArchive($p_name='', $p_comp = TarLib::COMPRESS_AUTO, $p_level=9) { + function setArchive($p_name = '', $p_comp = TarLib::COMPRESS_AUTO, $p_level = 9) { $this->_CompTar(); - $this->TarLib($p_name, $p_comp, $p_level); + $this->__construct($p_name, $p_comp, $p_level); return $this->_result; } @@ -186,7 +185,7 @@ class TarLib { * MaxgTar Constants */ function getCompression($ext = false) { - $exts = Array('tar','tar.gz','tar.bz2'); + $exts = Array('tar', 'tar.gz', 'tar.bz2'); if($ext) return $exts[$this->_comptype]; return $this->_comptype; } @@ -263,8 +262,10 @@ class TarLib { if(!$archive && !$this->_memdat) return -10; if(!$name) $name = utf8_basename($this->_nomf); - if($archive){ if(!file_exists($archive)) return -11; } - else $decoded = $this->getDynamicArchive(); + if($archive) { + if(!file_exists($archive)) return -11; + } + $decoded = $this->getDynamicArchive(); if($headers) { header('Content-Type: application/x-gtar'); @@ -274,10 +275,10 @@ class TarLib { } if($archive) { - $fp = @fopen($archive,'rb'); + $fp = @fopen($archive, 'rb'); if(!$fp) return -4; - while(!feof($fp)) echo fread($fp,2048); + while(!feof($fp)) echo fread($fp, 2048); } else { echo $decoded; } @@ -311,10 +312,10 @@ class TarLib { * permission in octal mode (prefixed with a 0) that will be given on each * extracted file. */ - function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir='', $p_mode = 0755) { + function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir = '', $p_mode = 0755) { if(!$this->_OpenRead()) return -4; // if(!@is_dir($p_to)) if(!@mkdir($p_to, 0777)) return -8; --CS - if(!@is_dir($p_to)) if(!$this->_dirApp($p_to)) return -8; //--CS (route through correct dir fn) + if(!@is_dir($p_to)) if(!$this->_dirApp($p_to)) return -8; //--CS (route through correct dir fn) $ok = $this->_extractList($p_to, $p_what, $p_remdir, $p_mode); $this->_CompTar(); @@ -327,21 +328,20 @@ class TarLib { * * This function will attempt to create a new archive with global headers * then add the given files into. If the archive is a real file, the - * contents are written directly into the file, if it is a dynamic archive + * contents are written directly into the file. If it is a dynamic archive, * contents are only stored in memory. This function should not be used to * add files to an existing archive, you should use Add() instead. * - * The FileList actually supports three different modes : + * The FileList actually supports three different modes: * * - You can pass a string containing filenames separated by pipes '|'. - * In this case the file are read from the webserver filesystem and the - * root folder is the folder where the script using the MaxgTar is called. + * In this case thes file are read from the filesystem and the root folder + * is the folder running script located. NOT RECOMMENDED * - * - You can also give a unidimensional indexed array containing the - * filenames. The behaviour for the content reading is the same that a - * '|'ed string. + * - You can also give an indexed array containing the filenames. The + * behaviour for the content reading is the same as above. * - * - The more useful usage is to pass bidimensional arrays, where the + * - You can pass an array of arrays. For each file use an array where the * first element contains the filename and the second contains the file * contents. You can even add empty folders to the package if the filename * has a leading '/'. Once again, have a look at the exemples to understand @@ -357,15 +357,15 @@ class TarLib { * to the file you store. Note also that the RemovePath is applied before the * AddPath is added, so it HAS a sense to use both parameters together. */ - function Create($p_filelist,$p_add='',$p_rem='') { + function Create($p_filelist, $p_add = '', $p_rem = '') { if(!$fl = $this->_fetchFilelist($p_filelist)) return -5; if(!$this->_OpenWrite()) return -6; - $ok = $this->_addFileList($fl,$p_add,$p_rem); + $ok = $this->_addFileList($fl, $p_add, $p_rem); - if($ok){ + if($ok) { $this->_writeFooter(); - }else{ + } else { $this->_CompTar(); @unlink($this->_nomf); } @@ -376,18 +376,26 @@ class TarLib { /** * Add files to an existing package. * - * This function does exactly the same than Create() exept it - * will append the given files at the end of the archive. Please not the is - * safe to call Add() on a newly created archive whereas the - * contrary will fail ! + * This function does exactly the same as Create() exept it + * will append the given files at the end of the archive. + * + * Note: This is only supported for dynamic in memory files and uncompressed + * tar files * * This function returns a status code, you can use TarErrorStr() on * it to get the human-readable description of the error. */ function Add($p_filelist, $p_add = '', $p_rem = '') { - if (($this->_nomf != TarLib::ARCHIVE_DYNAMIC && @is_file($this->_nomf)) || - ($this->_nomf == TarLib::ARCHIVE_DYNAMIC && !$this->_memdat)){ - return $this->Create($p_filelist, $p_add, $p_rem); + if($this->_nomf !== TarLib::ARCHIVE_DYNAMIC && + $this->_comptype !== TarLib::COMPRESS_NONE + ) { + return -12; + } + + if(($this->_nomf !== TarLib::ARCHIVE_DYNAMIC && !$this->_fp) || + ($this->_nomf === TarLib::ARCHIVE_DYNAMIC && !$this->_memdat) + ) { + return $this->Create($p_filelist, $p_add, $p_rem); } if(!$fl = $this->_fetchFilelist($p_filelist)) return -5; @@ -419,15 +427,15 @@ class TarLib { $result = Array(); - while ($dat = $this->_read(512)) { + while($dat = $this->_read(512)) { $dat = $this->_readHeader($dat); if(!is_array($dat)) continue; - $this->_seek(ceil($dat['size']/512)*512,1); + $this->_seek(ceil($dat['size'] / 512) * 512, 1); $result[] = $dat; } - return $result; + return $result; } /** @@ -439,35 +447,48 @@ class TarLib { */ function TarErrorStr($i) { $ecodes = Array( - 1 => true, - 0 => "Undocumented error", - -1 => "Can't use COMPRESS_GZIP compression : ZLIB extensions are not loaded !", - -2 => "Can't use COMPRESS_BZIP compression : BZ2 extensions are not loaded !", - -3 => "You must set a archive file to read the contents !", - -4 => "Can't open the archive file for read !", - -5 => "Invalide file list !", - -6 => "Can't open the archive in write mode !", - -7 => "There is no ARCHIVE_DYNAMIC to write !", - -8 => "Can't create the directory to extract files !", - -9 => "Please pass a archive name to send if you made created an ARCHIVE_DYNAMIC !", - -10 => "You didn't pass an archive filename and there is no stored ARCHIVE_DYNAMIC !", - -11 => "Given archive doesn't exist !" - ); + 1 => true, + 0 => "Undocumented error", + -1 => "Can't use COMPRESS_GZIP compression : ZLIB extensions are not loaded !", + -2 => "Can't use COMPRESS_BZIP compression : BZ2 extensions are not loaded !", + -3 => "You must set a archive file to read the contents !", + -4 => "Can't open the archive file for read !", + -5 => "Invalide file list !", + -6 => "Can't open the archive in write mode !", + -7 => "There is no ARCHIVE_DYNAMIC to write !", + -8 => "Can't create the directory to extract files !", + -9 => "Please pass a archive name to send if you made created an ARCHIVE_DYNAMIC !", + -10 => "You didn't pass an archive filename and there is no stored ARCHIVE_DYNAMIC !", + -11 => "Given archive doesn't exist !", + -12 => "Appending not supported for compressed files" + ); return isset($ecodes[$i]) ? $ecodes[$i] : $ecodes[0]; } - function _seek($p_flen, $tell=0) { + /** + * Seek in the data stream + * + * @todo probably broken for bzip tars + * @param int $p_flen seek to this position + * @param bool $tell seek from current position? + */ + function _seek($p_flen, $tell = false) { if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) - $this->_memdat=substr($this->_memdat,0,($tell ? strlen($this->_memdat) : 0) + $p_flen); + $this->_memdat = substr($this->_memdat, 0, ($tell ? strlen($this->_memdat) : 0) + $p_flen); elseif($this->_comptype == TarLib::COMPRESS_GZIP) - @gzseek($this->_fp, ($tell ? @gztell($this->_fp) : 0)+$p_flen); + @gzseek($this->_fp, ($tell ? @gztell($this->_fp) : 0) + $p_flen); elseif($this->_comptype == TarLib::COMPRESS_BZIP) - @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0)+$p_flen); + @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0) + $p_flen); else - @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0)+$p_flen); + @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0) + $p_flen); } + /** + * Open the archive for reading + * + * @return bool true if succesfull + */ function _OpenRead() { if($this->_comptype == TarLib::COMPRESS_GZIP) $this->_fp = @gzopen($this->_nomf, 'rb'); @@ -479,6 +500,12 @@ class TarLib { return ($this->_fp ? true : false); } + /** + * Open the archive for writing + * + * @param string $add filemode + * @return bool true on success + */ function _OpenWrite($add = 'w') { if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) return true; @@ -492,6 +519,9 @@ class TarLib { return ($this->_fp ? true : false); } + /** + * Closes the open file pointer + */ function _CompTar() { if($this->_nomf === TarLib::ARCHIVE_DYNAMIC || !$this->_fp) return; @@ -500,27 +530,46 @@ class TarLib { else @fclose($this->_fp); } + /** + * Read from the open file pointer + * + * @param int $p_len bytes to read + * @return string + */ function _read($p_len) { if($this->_comptype == TarLib::COMPRESS_GZIP) - return @gzread($this->_fp,$p_len); + return @gzread($this->_fp, $p_len); elseif($this->_comptype == TarLib::COMPRESS_BZIP) - return @bzread($this->_fp,$p_len); + return @bzread($this->_fp, $p_len); else - return @fread($this->_fp,$p_len); + return @fread($this->_fp, $p_len); } + /** + * Write to the open filepointer or memory + * + * @param string $p_data + * @return int + */ function _write($p_data) { - if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) $this->_memdat .= $p_data; - elseif($this->_comptype == TarLib::COMPRESS_GZIP) - return @gzwrite($this->_fp,$p_data); - - elseif($this->_comptype == TarLib::COMPRESS_BZIP) - return @bzwrite($this->_fp,$p_data); - - else - return @fwrite($this->_fp,$p_data); + if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) { + $this->_memdat .= $p_data; + return strlen($p_data); + } elseif($this->_comptype == TarLib::COMPRESS_GZIP) { + return @gzwrite($this->_fp, $p_data); + } elseif($this->_comptype == TarLib::COMPRESS_BZIP) { + return @bzwrite($this->_fp, $p_data); + } else { + return @fwrite($this->_fp, $p_data); + } } + /** + * Compress given data according to the set compression method + * + * @param $p_dat + * @return string + */ function _encode($p_dat) { if($this->_comptype == TarLib::COMPRESS_GZIP) return gzencode($p_dat, $this->_compzlevel); @@ -529,55 +578,77 @@ class TarLib { else return $p_dat; } + /** + * Decode the given tar file header + * + * @param $p_dat + * @return array|bool + */ function _readHeader($p_dat) { - if (!$p_dat || strlen($p_dat) != 512) return false; + if(!$p_dat || strlen($p_dat) != 512) return false; - for ($i=0, $chks=0; $i<148; $i++) + for($i = 0, $chks = 0; $i < 148; $i++) $chks += ord($p_dat[$i]); - for ($i=156,$chks+=256; $i<512; $i++) + for($i = 156, $chks += 256; $i < 512; $i++) $chks += ord($p_dat[$i]); $headers = @unpack("a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor", $p_dat); if(!$headers) return false; $return['checksum'] = OctDec(trim($headers['checksum'])); - if ($return['checksum'] != $chks) return false; + if($return['checksum'] != $chks) return false; $return['filename'] = trim($headers['filename']); - $return['mode'] = OctDec(trim($headers['mode'])); - $return['uid'] = OctDec(trim($headers['uid'])); - $return['gid'] = OctDec(trim($headers['gid'])); - $return['size'] = OctDec(trim($headers['size'])); - $return['mtime'] = OctDec(trim($headers['mtime'])); + $return['mode'] = OctDec(trim($headers['mode'])); + $return['uid'] = OctDec(trim($headers['uid'])); + $return['gid'] = OctDec(trim($headers['gid'])); + $return['size'] = OctDec(trim($headers['size'])); + $return['mtime'] = OctDec(trim($headers['mtime'])); $return['typeflag'] = $headers['typeflag']; - $return['link'] = trim($headers['link']); - $return['uname'] = trim($headers['uname']); - $return['gname'] = trim($headers['gname']); + $return['link'] = trim($headers['link']); + $return['uname'] = trim($headers['uname']); + $return['gname'] = trim($headers['gname']); return $return; } + /** + * Builds a normalized file list + * + * @todo remove string support, use saner format + * + * @param $p_filelist + * @return array|bool + */ function _fetchFilelist($p_filelist) { if(!$p_filelist || (is_array($p_filelist) && !@count($p_filelist))) return false; if(is_string($p_filelist)) { - $p_filelist = explode('|',$p_filelist); + $p_filelist = explode('|', $p_filelist); if(!is_array($p_filelist)) $p_filelist = Array($p_filelist); } return $p_filelist; } + /** + * Adds files given as file list + * + * @param array $p_fl + * @param string $p_addir + * @param string $p_remdir + * @return bool + */ function _addFileList($p_fl, $p_addir, $p_remdir) { foreach($p_fl as $file) { - if(($file == $this->_nomf && $this->_nomf != TarLib::ARCHIVE_DYNAMIC) || !$file || (!file_exists($file) && !is_array($file))) + if(($file == $this->_nomf && $this->_nomf !== TarLib::ARCHIVE_DYNAMIC) || !$file || (!is_array($file) && !file_exists($file))) continue; - if (!$this->_addFile($file, $p_addir, $p_remdir)) + if(!$this->_addFile($file, $p_addir, $p_remdir)) continue; - if (@is_dir($file)) { + if(@is_dir($file)) { $d = @opendir($file); if(!$d) continue; @@ -592,26 +663,36 @@ class TarLib { } closedir($d); - unset($tmplist,$f); + unset($tmplist, $f); } } return true; } + /** + * Adds a single file + * + * @param array|string $p_fn + * @param string $p_addir + * @param string $p_remdir + * @return bool + */ function _addFile($p_fn, $p_addir = '', $p_remdir = '') { + $data = false; if(is_array($p_fn)) list($p_fn, $data) = $p_fn; $sname = $p_fn; if($p_remdir) { - if(substr($p_remdir,-1) != '/') $p_remdir .= "/"; + if(substr($p_remdir, -1) != '/') $p_remdir .= "/"; if(substr($sname, 0, strlen($p_remdir)) == $p_remdir) $sname = substr($sname, strlen($p_remdir)); } - if($p_addir) $sname = $p_addir.(substr($p_addir,-1) == '/' ? '' : "/").$sname; + if($p_addir) $sname = $p_addir.(substr($p_addir, -1) == '/' ? '' : "/").$sname; - if(strlen($sname) > 99) return; + // FIXME ustar should support up 256 chars + if(strlen($sname) > 99) return false; if(@is_dir($p_fn)) { if(!$this->_writeFileHeader($p_fn, $sname)) return false; @@ -625,14 +706,14 @@ class TarLib { if(!$data) { while(!feof($fp)) { - $packed = pack("a512", fread($fp,512)); + $packed = pack("a512", fread($fp, 512)); $this->_write($packed); } fclose($fp); } else { $len = strlen($data); - for($s = 0; $s < $len; $s += 512){ - $this->_write(pack("a512",substr($data,$s,512))); + for($s = 0; $s < $len; $s += 512) { + $this->_write(pack("a512", substr($data, $s, 512))); } } } @@ -640,53 +721,70 @@ class TarLib { return true; } - function _writeFileHeader($p_file, $p_sname, $p_data=false) { + /** + * Write the header for a file in the TAR archive + * + * @param string $p_file + * @param string $p_sname + * @param bool $p_data + * @return bool + */ + function _writeFileHeader($p_file, $p_sname, $p_data = false) { if(!$p_data) { - if (!$p_sname) $p_sname = $p_file; + if(!$p_sname) $p_sname = $p_file; $p_sname = $this->_pathTrans($p_sname); $h_info = stat($p_file); - $h[0] = sprintf("%6s ", DecOct($h_info[4])); - $h[] = sprintf("%6s ", DecOct($h_info[5])); - $h[] = sprintf("%6s ", DecOct(fileperms($p_file))); + $h[0] = sprintf("%6s ", DecOct($h_info[4])); + $h[] = sprintf("%6s ", DecOct($h_info[5])); + $h[] = sprintf("%6s ", DecOct(fileperms($p_file))); clearstatcache(); $h[] = sprintf("%11s ", DecOct(filesize($p_file))); $h[] = sprintf("%11s", DecOct(filemtime($p_file))); $dir = @is_dir($p_file) ? '5' : ''; } else { - $dir = ''; + $dir = ''; $p_data = sprintf("%11s ", DecOct($p_data)); - $time = sprintf("%11s ", DecOct(time())); - $h = Array(" 0 "," 0 "," 40777 ",$p_data,$time); + $time = sprintf("%11s ", DecOct(time())); + $h = Array(" 0 ", " 0 ", " 40777 ", $p_data, $time); } $data_first = pack("a100a8a8a8a12A12", $p_sname, $h[2], $h[0], $h[1], $h[3], $h[4]); - $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $dir, '', '', '', '', '', '', '', '', ""); + $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $dir, '', '', '', '', '', '', '', '', ""); - for ($i=0,$chks=0; $i<148; $i++) + for($i = 0, $chks = 0; $i < 148; $i++) $chks += ord($data_first[$i]); - for ($i=156, $chks+=256, $j=0; $i<512; $i++, $j++) + for($i = 156, $chks += 256, $j = 0; $i < 512; $i++, $j++) $chks += ord($data_last[$j]); $this->_write($data_first); - $chks = pack("a8",sprintf("%6s ", DecOct($chks))); + $chks = pack("a8", sprintf("%6s ", DecOct($chks))); $this->_write($chks.$data_last); return true; } - function _append($p_filelist, $p_addir="", $p_remdir="") { + /** + * Append the given files to the already open archive + * + * @param array $p_filelist + * @param string $p_addir + * @param string $p_remdir + * @return bool|int + */ + function _append($p_filelist, $p_addir = "", $p_remdir = "") { if(!$this->_fp) if(!$this->_OpenWrite('a')) return -6; - if($this->_nomf == TarLib::ARCHIVE_DYNAMIC) { - $s = strlen($this->_memdat); - $this->_memdat = substr($this->_memdat,0,-512); + if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) { + $this->_memdat = substr($this->_memdat, 0, -512 * 2); // remove footer } else { + clearstatcache(); $s = filesize($this->_nomf); - $this->_seek($s-512); + + $this->_seek($s - (512 * 2)); // remove footer } $ok = $this->_addFileList($p_filelist, $p_addir, $p_remdir); @@ -695,48 +793,70 @@ class TarLib { return $ok; } + /** + * Cleans up a path and removes relative parts + * + * @param string $p_dir + * @return string + */ function _pathTrans($p_dir) { - if ($p_dir) { + $r = ''; + if($p_dir) { $subf = explode("/", $p_dir); - $r=''; - for ($i=count($subf)-1; $i>=0; $i--) { - if ($subf[$i] == ".") { + for($i = count($subf) - 1; $i >= 0; $i--) { + if($subf[$i] == ".") { # do nothing - } elseif ($subf[$i] == "..") { + } elseif($subf[$i] == "..") { $i--; - } elseif (!$subf[$i] && $i!=count($subf)-1 && $i) { + } elseif(!$subf[$i] && $i != count($subf) - 1 && $i) { # do nothing } else { - $r = $subf[$i].($i!=(count($subf)-1) ? "/".$r : ""); + $r = $subf[$i].($i != (count($subf) - 1) ? "/".$r : ""); } } } return $r; } + /** + * Add the closing footer to the archive + * + * Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which + * consists of two 512 blocks of zero bytes + * + * @link http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC134 + */ function _writeFooter() { $this->_write(pack("a512", "")); + $this->_write(pack("a512", "")); } + /** + * @param $p_to + * @param $p_files + * @param $p_remdir + * @param int $p_mode + * @return array|bool|int|string + */ function _extractList($p_to, $p_files, $p_remdir, $p_mode = 0755) { - if (!$p_to || ($p_to[0]!="/"&&substr($p_to,0,3)!="../"&&substr($p_to,1,3)!=":\\"&&substr($p_to,1,2)!=":/")) /*" // <- PHP Coder bug */ + if(!$p_to || ($p_to[0] != "/" && substr($p_to, 0, 3) != "../" && substr($p_to, 1, 3) != ":\\" && substr($p_to, 1, 2) != ":/")) /*" // <- PHP Coder bug */ $p_to = "./$p_to"; - if ($p_remdir && substr($p_remdir,-1)!='/') $p_remdir .= '/'; + if($p_remdir && substr($p_remdir, -1) != '/') $p_remdir .= '/'; $p_remdirs = strlen($p_remdir); while($dat = $this->_read(512)) { $headers = $this->_readHeader($dat); if(!$headers['filename']) continue; - if($p_files == -1 || $p_files[0] == -1){ + if($p_files == -1 || $p_files[0] == -1) { $extract = true; } else { $extract = false; foreach($p_files as $f) { - if(substr($f,-1) == "/") { - if((strlen($headers['filename']) > strlen($f)) && (substr($headers['filename'],0,strlen($f))==$f)) { + if(substr($f, -1) == "/") { + if((strlen($headers['filename']) > strlen($f)) && (substr($headers['filename'], 0, strlen($f)) == $f)) { $extract = true; break; } @@ -747,15 +867,15 @@ class TarLib { } } - if ($extract) { + if($extract) { $det[] = $headers; - if ($p_remdir && substr($headers['filename'],0,$p_remdirs)==$p_remdir) - $headers['filename'] = substr($headers['filename'],$p_remdirs); + if($p_remdir && substr($headers['filename'], 0, $p_remdirs) == $p_remdir) + $headers['filename'] = substr($headers['filename'], $p_remdirs); - if($headers['filename'].'/' == $p_remdir && $headers['typeflag']=='5') continue; + if($headers['filename'].'/' == $p_remdir && $headers['typeflag'] == '5') continue; - if ($p_to != "./" && $p_to != "/") { - while($p_to{-1}=="/") $p_to = substr($p_to,0,-1); + if($p_to != "./" && $p_to != "/") { + while($p_to{-1} == "/") $p_to = substr($p_to, 0, -1); if($headers['filename']{0} == "/") $headers['filename'] = $p_to.$headers['filename']; @@ -763,29 +883,35 @@ class TarLib { $headers['filename'] = $p_to."/".$headers['filename']; } - $ok = $this->_dirApp($headers['typeflag']=="5" ? $headers['filename'] : dirname($headers['filename'])); + $ok = $this->_dirApp($headers['typeflag'] == "5" ? $headers['filename'] : dirname($headers['filename'])); if($ok < 0) return $ok; - if (!$headers['typeflag']) { - if (!$fp = @fopen($headers['filename'], "wb")) return -6; - $n = floor($headers['size']/512); + if(!$headers['typeflag']) { + if(!$fp = @fopen($headers['filename'], "wb")) return -6; + $n = floor($headers['size'] / 512); - for ($i=0; $i<$n; $i++){ - fwrite($fp, $this->_read(512),512); + for($i = 0; $i < $n; $i++) { + fwrite($fp, $this->_read(512), 512); } - if (($headers['size'] % 512) != 0) fwrite($fp, $this->_read(512), $headers['size'] % 512); + if(($headers['size'] % 512) != 0) fwrite($fp, $this->_read(512), $headers['size'] % 512); fclose($fp); touch($headers['filename'], $headers['mtime']); chmod($headers['filename'], $p_mode); } else { - $this->_seek(ceil($headers['size']/512)*512,1); + $this->_seek(ceil($headers['size'] / 512) * 512, 1); } - }else $this->_seek(ceil($headers['size']/512)*512,1); + } else $this->_seek(ceil($headers['size'] / 512) * 512, 1); } return $det; } + /** + * Create a directory hierarchy in filesystem + * + * @param string $d + * @return bool + */ function _dirApp($d) { // map to dokuwiki function (its more robust) return io_mkdir_p($d); diff --git a/inc/events.php b/inc/events.php index 4e81f85c8..f7b1a7a16 100644 --- a/inc/events.php +++ b/inc/events.php @@ -132,7 +132,7 @@ class Doku_Event_Handler { $pluginlist = plugin_list('action'); foreach ($pluginlist as $plugin_name) { - $plugin =& plugin_load('action',$plugin_name); + $plugin = plugin_load('action',$plugin_name); if ($plugin !== null) $plugin->register($this); } diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index f73b91294..aeeac870f 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -6,7 +6,7 @@ 현재 설치 과정 중에는 디렉토리 권한 설정이 불가능합니다. 보통 직접 쉘 명령어를 사용하거나, 호스팅을 사용한다면 FTP나 호스팅 제어판(예를 들어 CPanel)을 사용해서 설정해야 합니다.</p> <p>현재 설치 과정중에 관리자로 로그인 후 DokuWiki의 관리 메뉴(플러그인 설치, 사용자 관리, 위키 문서 접근 권한 관리, 옵션 설정)를 가능하게 <acronym title="접근 제어 목록">ACL</acronym>에 대한 환경 설정을 수행합니다. -이 것은 DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.</p> +DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.</p> <p>숙련된 사용자나 특별한 설치 과정이 필요한 경우에 다음 링크를 참고하기 바랍니다: <a href="http://dokuwiki.org/ko:install">설치 과정 (한국어)</a> diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 64507fa81..89d045503 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -7,7 +7,7 @@ * @author jk Lee * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> - * @author Seung-Chul Yoo <dryoo@live.com> + * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com * @author Myeongjin <aranet100@gmail.com> */ @@ -37,13 +37,13 @@ $lang['btn_secedit'] = '편집'; $lang['btn_login'] = '로그인'; $lang['btn_logout'] = '로그아웃'; $lang['btn_admin'] = '관리'; -$lang['btn_update'] = '변경'; +$lang['btn_update'] = '바꾸기'; $lang['btn_delete'] = '삭제'; $lang['btn_back'] = '뒤로'; $lang['btn_backlink'] = '가리키는 링크'; $lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기'; $lang['btn_subscribe'] = '구독 관리'; -$lang['btn_profile'] = '개인 정보 변경'; +$lang['btn_profile'] = '개인 정보 바꾸기'; $lang['btn_reset'] = '초기화'; $lang['btn_resendpwd'] = '새 비밀번호 설정'; $lang['btn_draft'] = '문서 초안 편집'; @@ -66,7 +66,7 @@ $lang['profile'] = '개인 정보'; $lang['badlogin'] = '잘못된 사용자 이름이거나 비밀번호입니다.'; $lang['minoredit'] = '사소한 바뀜'; $lang['draftdate'] = '문서 초안 자동 저장 시간'; -$lang['nosecedit'] = '문서가 수정되어 세션 정보의 유효 시간이 지나 문서 전부를 다시 읽습니다.'; +$lang['nosecedit'] = '한동안 문서가 바뀌어 세션 정보의 유효 시간이 지나 문서 전부를 다시 읽습니다.'; $lang['regmissing'] = '모든 항목을 입력해야 합니다.'; $lang['reguexists'] = '같은 이름을 사용하는 사용자가 있습니다.'; $lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.'; @@ -219,7 +219,7 @@ $lang['qb_hplus'] = '상위 문단 제목'; $lang['qb_hminus'] = '하위 문단 제목'; $lang['qb_hequal'] = '동급 문단 제목'; $lang['qb_link'] = '내부 링크'; -$lang['qb_extlink'] = '외부 링크'; +$lang['qb_extlink'] = '바깥 링크'; $lang['qb_hr'] = '가로줄'; $lang['qb_ol'] = '순서 있는 목록'; $lang['qb_ul'] = '순서 없는 목록'; @@ -296,7 +296,7 @@ $lang['days'] = '%d일 전'; $lang['hours'] = '%d시간 전'; $lang['minutes'] = '%d분 전'; $lang['seconds'] = '%d초 전'; -$lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장되지 않았습니다.'; +$lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장하지 않았습니다.'; $lang['media_uploadtab'] = '올리기'; $lang['media_searchtab'] = '찾기'; $lang['media_file'] = '파일'; @@ -313,8 +313,8 @@ $lang['media_upload'] = '%s에 올리기'; $lang['media_search'] = '%s 찾기'; $lang['media_view'] = '%s'; $lang['media_viewold'] = '%s의 %s'; -$lang['media_edit'] = '%s 수정'; -$lang['media_history'] = '%s 변경 내력'; +$lang['media_edit'] = '%s 편집'; +$lang['media_history'] = '%s 바뀜 내역'; $lang['media_meta_edited'] = '메타데이터가 수정됨'; $lang['media_perm_read'] = '이 파일을 읽을 권한이 없습니다.'; $lang['media_perm_upload'] = '파일을 올릴 권한이 없습니다.'; diff --git a/inc/lang/ko/mailtext.txt b/inc/lang/ko/mailtext.txt index 219fe6e0b..01bada9ba 100644 --- a/inc/lang/ko/mailtext.txt +++ b/inc/lang/ko/mailtext.txt @@ -1,4 +1,4 @@ -DokuWiki 문서가 추가 또는 변경되었습니다. 자세한 정보는 다음과 같습니다: +DokuWiki 문서가 추가 또는 바뀌었습니다. 자세한 정보는 다음과 같습니다: 날짜 : @DATE@ 브라우저 : @BROWSER@ diff --git a/inc/lang/ko/preview.txt b/inc/lang/ko/preview.txt index 6563874ee..1b7710e2f 100644 --- a/inc/lang/ko/preview.txt +++ b/inc/lang/ko/preview.txt @@ -1,3 +1,3 @@ ====== 미리 보기 ====== -이것은 입력한 내용이 어떻게 보일지 미리 보여줍니다. 아직 **저장되지 않았다**는 점을 기억해두십시오!
\ No newline at end of file +입력한 내용이 어떻게 보일지 미리 보여줍니다. 아직 **저장되지 않았다**는 점을 기억해두십시오!
\ No newline at end of file diff --git a/inc/lang/ko/showrev.txt b/inc/lang/ko/showrev.txt index 084d82737..f6930044b 100644 --- a/inc/lang/ko/showrev.txt +++ b/inc/lang/ko/showrev.txt @@ -1,2 +1,2 @@ -**이것은 문서의 이전 버전입니다!** +**문서의 이전 버전입니다!** ---- diff --git a/inc/lang/ko/updateprofile.txt b/inc/lang/ko/updateprofile.txt index ebf19d8ab..379981cb3 100644 --- a/inc/lang/ko/updateprofile.txt +++ b/inc/lang/ko/updateprofile.txt @@ -1,3 +1,3 @@ -====== 개인 정보 수정 ====== +====== 개인 정보 바꾸기 ====== 바꾸고 싶은 항목을 입력하기 바랍니다. 사용자 이름은 바꿀 수 없습니다.
\ No newline at end of file diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index cc17b17fe..19a7b7cce 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -39,6 +39,7 @@ $lang['btn_backtomedia'] = 'Atpakaļ uz mēdiju failu izvēli'; $lang['btn_subscribe'] = 'Abonēt izmaiņu paziņojumus'; $lang['btn_profile'] = 'Labot savu profilu'; $lang['btn_reset'] = 'Atsaukt izmaiņas'; +$lang['btn_resendpwd'] = 'Uzstādīt jaunu paroli'; $lang['btn_draft'] = 'Labot melnrakstu'; $lang['btn_recover'] = 'Atjaunot melnrakstu'; $lang['btn_draftdel'] = 'Dzēst melnrakstu'; @@ -75,6 +76,7 @@ $lang['profnoempty'] = 'Bez vārda vai e-pasta adreses nevar.'; $lang['profchanged'] = 'Profils veiksmīgi izlabots.'; $lang['pwdforget'] = 'Aizmirsi paroli? Saņem jaunu'; $lang['resendna'] = 'Paroļu izsūtīšanu nepiedāvāju.'; +$lang['resendpwd'] = 'Uzstādīt jaunu paroli lietotājam'; $lang['resendpwdmissing'] = 'Atvaino, jāizpilda visas ailes.'; $lang['resendpwdnouser'] = 'Atvaino, tāda lietotāja nav.'; $lang['resendpwdbadauth'] = 'Atvaino, šis autorizācijas kods nav derīgs. Pārliecinies, ka lietoji pilnu apstiprināšanas adresi.'; @@ -87,6 +89,7 @@ $lang['searchmedia_in'] = 'Meklēt iekš %s'; $lang['txt_upload'] = 'Norādi augšupielādējamo failu'; $lang['txt_filename'] = 'Ievadi vikivārdu (nav obligāts)'; $lang['txt_overwrt'] = 'Aizstāt esošo failu'; +$lang['maxuploadsize'] = 'Augšuplādējamā faila ierobežojums: %s.'; $lang['lockedby'] = 'Patlaban bloķējis '; $lang['lockexpire'] = 'Bloķējums beigsies '; $lang['js']['willexpire'] = 'Tavs bloķējums uz šo lapu pēc minūtes beigsies.\nLai izvairītos no konflikta, nospied Iepriekšapskata pogu\n un bloķējuma laiku sāks skaitīt no jauna.'; @@ -129,6 +132,7 @@ $lang['js']['media_select'] = 'Norādīt failus...'; $lang['js']['media_upload_btn'] = 'Augšuplādēt'; $lang['js']['media_done_btn'] = 'Gatavs'; $lang['js']['media_drop'] = 'Nomet te augšuplādējamos failus'; +$lang['js']['media_cancel'] = 'atlikt'; $lang['js']['media_overwrt'] = 'Rakstīt pāri esošajiem failiem'; $lang['rssfailed'] = 'Kļūda saņemot saturu no '; $lang['nothingfound'] = 'Nekas nav atrasts.'; @@ -179,6 +183,12 @@ $lang['external_edit'] = 'ārpussistēmas labojums'; $lang['summary'] = 'Anotācija'; $lang['noflash'] = 'Lai attēlotu lapas saturu, vajag <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.'; $lang['download'] = 'Lejuplādēt «kodiņu»((snippet))'; +$lang['tools'] = 'Rīki'; +$lang['user_tools'] = 'Lietotāja rīki'; +$lang['site_tools'] = 'Vietnes rīki'; +$lang['page_tools'] = 'Lapas rīki'; +$lang['skip_to_content'] = 'uz rakstu'; +$lang['sidebar'] = 'Izvēlne'; $lang['mail_newpage'] = 'lapa pievienota:'; $lang['mail_changed'] = 'lapa mainīta:'; $lang['mail_subscribe_list'] = 'Nodaļā mainītās lapas:'; @@ -249,6 +259,7 @@ $lang['subscr_style_digest'] = 'kopsavilkumu par katru lapu (reizi %.2f dienā $lang['subscr_style_list'] = 'kopš pēdējās vēstules notikušo labojumu sarakstu (reizi %.2f dienās)'; $lang['authmodfailed'] = 'Aplami konfigurēta lietotāju autentifikācija. Lūdzu ziņo Wiki administratoram.'; $lang['authtempfail'] = 'Lietotāju autentifikācija pašlaik nedarbojas. Ja tas turpinās ilgstoši, lūduz ziņo Wiki administratoram.'; +$lang['authpwdexpire'] = 'Tavai parolei pēc %d dienām biegsies termiņš, tā drīzumā jānomaina.'; $lang['i_chooselang'] = 'Izvēlies valodu'; $lang['i_installer'] = 'DokuWiki instalētājs'; $lang['i_wikiname'] = 'Wiki vārds'; diff --git a/inc/lang/lv/mailwrap.html b/inc/lang/lv/mailwrap.html new file mode 100644 index 000000000..34b723901 --- /dev/null +++ b/inc/lang/lv/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> +<title>@TITLE@</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Šo vēstuli nosūtījusi programma DokuWiki no vietnes @DOKUWIKIURL@.</small> +</body> +</html>
\ No newline at end of file diff --git a/inc/lang/lv/resetpwd.txt b/inc/lang/lv/resetpwd.txt new file mode 100644 index 000000000..757f34cff --- /dev/null +++ b/inc/lang/lv/resetpwd.txt @@ -0,0 +1,3 @@ +====== Uzstādīt jaunu paroli ====== + +Lūdzu izvēlies savam kontam jaunu paroli.
\ No newline at end of file diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index 1407474ec..b8a947dc3 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -182,7 +182,7 @@ $lang['lastmod'] = 'Posledná úprava'; $lang['by'] = 'od'; $lang['deleted'] = 'odstránené'; $lang['created'] = 'vytvorené'; -$lang['restored'] = 'stará verzia bola obnovená'; +$lang['restored'] = 'stará verzia bola obnovená (%s)'; $lang['external_edit'] = 'externá úprava'; $lang['summary'] = 'Komentár k úpravám'; $lang['noflash'] = 'Pre zobrazenie tohto obsahu potrebujete <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.'; @@ -318,4 +318,3 @@ $lang['media_perm_read'] = 'Prepáčte, ale nemáte dostatočné oprávnen $lang['media_perm_upload'] = 'Prepáčte, ale nemáte dostatočné oprávnenie na nahrávanie súborov.'; $lang['media_update'] = 'Nahrať novú verziu'; $lang['media_restore'] = 'Obnoviť túto verziu'; -$lang['plugin_install_err'] = 'Plugin nebol nainštalovaný úspešne. Premenujte adresár s pluginom \'%s\' na \'%s\'.'; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 8bfdc3b9c..8638ffa6a 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -133,27 +133,6 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function strong_open(){} - function strong_close(){} - - function emphasis_open(){} - function emphasis_close(){} - - function underline_open(){} - function underline_close(){} - - function monospace_open(){} - function monospace_close(){} - - function subscript_open(){} - function subscript_close(){} - - function superscript_open(){} - function superscript_close(){} - - function deleted_open(){} - function deleted_close(){} - /** * Callback for footnote start syntax * @@ -218,14 +197,6 @@ class Doku_Renderer_metadata extends Doku_Renderer { if ($this->capture) $this->doc .= $text; } - function php($text){} - - function phpblock($text){} - - function html($text){} - - function htmlblock($text){} - function preformatted($text){ if ($this->capture) $this->doc .= $text; } @@ -393,18 +364,6 @@ class Doku_Renderer_metadata extends Doku_Renderer { $params['refresh']; } - function table_open($maxcols = NULL, $numrows = NULL){} - function table_close(){} - - function tablerow_open(){} - function tablerow_close(){} - - function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){} - function tableheader_close(){} - - function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){} - function tablecell_close(){} - //---------------------------------------------------------- // Utils diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 0923e6896..2c78f220a 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -62,7 +62,7 @@ class Doku_Renderer extends DokuWiki_Plugin { //handle plugin rendering function plugin($name,$data){ - $plugin =& plugin_load('syntax',$name); + $plugin = plugin_load('syntax',$name); if($plugin != null){ $plugin->render($this->getFormat(),$this,$data); } diff --git a/inc/parserutils.php b/inc/parserutils.php index 3dbfc726f..1733fcf09 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -579,7 +579,7 @@ function p_get_parsermodes(){ $obj = null; foreach($pluginlist as $p){ /** @var DokuWiki_Syntax_Plugin $obj */ - if(!$obj =& plugin_load('syntax',$p)) continue; //attempt to load plugin into $obj + if(!$obj = plugin_load('syntax',$p)) continue; //attempt to load plugin into $obj $PARSER_MODES[$obj->getType()][] = "plugin_$p"; //register mode type //add to modes $modes[] = array( diff --git a/inc/plugin.php b/inc/plugin.php index d2fe3818d..b0518346d 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -191,7 +191,7 @@ class DokuWiki_Plugin { */ function loadHelper($name, $msg){ if (!plugin_isdisabled($name)){ - $obj =& plugin_load('helper',$name); + $obj = plugin_load('helper',$name); }else{ $obj = null; } |