From cd2f903b3e35c080dc9c1aa0c9f7383573dcae31 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 7 Sep 2012 21:10:44 +0200 Subject: Correct and add some PHPDoc comments, initialize some variables --- inc/io.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/io.php b/inc/io.php index 4c6eb97df..b4da7d635 100644 --- a/inc/io.php +++ b/inc/io.php @@ -18,8 +18,8 @@ if(!defined('DOKU_INC')) die('meh.'); * * @todo use safemode hack * @param string $id - a pageid, the namespace of that id will be tried to deleted - * @param string $basadir - the config name of the type to delete (datadir or mediadir usally) - * @returns bool - true if at least one namespace was deleted + * @param string $basedir - the config name of the type to delete (datadir or mediadir usally) + * @return bool - true if at least one namespace was deleted * @author Andreas Gohr * @author Ben Coburn */ @@ -113,6 +113,7 @@ function io_readFile($file,$clean=true){ function bzfile($file){ $bz = bzopen($file,"r"); + $str = ''; while (!feof($bz)){ //8192 seems to be the maximum buffersize? $str = $str . bzread($bz,8192); @@ -477,8 +478,8 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20 $data = $http->get($url); if(!$data) return false; + $name = ''; if ($useAttachment) { - $name = ''; if (isset($http->resp_headers['content-disposition'])) { $content_disposition = $http->resp_headers['content-disposition']; $match=array(); @@ -578,8 +579,8 @@ function io_exec($cmd, $input, &$output){ * @param string $file The file to search * @param string $pattern PCRE pattern * @param int $max How many lines to return (0 for all) - * @param bool $baxkref When true returns array with backreferences instead of lines - * @return matching lines or backref, false on error + * @param bool $backref When true returns array with backreferences instead of lines + * @return array matching lines or backref, false on error */ function io_grep($file,$pattern,$max=0,$backref=false){ $fh = @fopen($file,'r'); -- cgit v1.2.3