summaryrefslogtreecommitdiff
path: root/inc/io.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-09-07 21:10:44 +0200
committerMichael Hamann <michael@content-space.de>2012-09-07 21:11:44 +0200
commitcd2f903b3e35c080dc9c1aa0c9f7383573dcae31 (patch)
tree92c699c8d1c3efa454f1c75f8625e17b4cf9a49b /inc/io.php
parent0a78cb463952660f3bb257dd3dd030db725cd4f4 (diff)
downloadrpg-cd2f903b3e35c080dc9c1aa0c9f7383573dcae31.tar.gz
rpg-cd2f903b3e35c080dc9c1aa0c9f7383573dcae31.tar.bz2
Correct and add some PHPDoc comments, initialize some variables
Diffstat (limited to 'inc/io.php')
-rw-r--r--inc/io.php11
1 files changed, 6 insertions, 5 deletions
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 <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
@@ -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');