From e3ab6fc5cbab1aaf365e73abaa3d91c03eebdd47 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 28 Jul 2012 11:06:10 +0200 Subject: Fixed and extended PHPDoc comments and added additional @var comments --- inc/confutils.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'inc/confutils.php') diff --git a/inc/confutils.php b/inc/confutils.php index 29ead1e9f..edea80092 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -115,7 +115,11 @@ function getWordblocks() { return $wordblocks; } - +/** + * Gets the list of configured schemes + * + * @return array the schemes + */ function getSchemes() { static $schemes = null; if ( !$schemes ) { @@ -182,7 +186,7 @@ function confToHash($file,$lower=false) { * * @param string $type the configuration settings to be read, must correspond to a key/array in $config_cascade * @param callback $fn the function used to process the configuration file into an array - * @param array $param optional additional params to pass to the callback + * @param array $params optional additional params to pass to the callback * @return array configuration values */ function retrieveConfig($type,$fn,$params=null) { @@ -236,6 +240,7 @@ function actionOK($action){ static $disabled = null; if(is_null($disabled)){ global $conf; + /** @var auth_basic $auth */ global $auth; // prepare disabled actions array and handle legacy options @@ -272,7 +277,7 @@ function actionOK($action){ * * @param string $linktype 'content'|'navigation', content applies to links in wiki text * navigation applies to all other links - * @returns boolean true if headings should be used for $linktype, false otherwise + * @return boolean true if headings should be used for $linktype, false otherwise */ function useHeading($linktype) { static $useHeading = null; -- cgit v1.2.3 From dd74fecfdfa05c8e95162678c00d3da3ba3dad6d Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 8 Sep 2012 12:53:09 +0200 Subject: Remove BOM in linesToHash, partial fix for FS#2464 The BOM at the beginning of some plugin.info.txt files prevented the plugin manager from correctly reading the base property and thus it installed the plugin in the wrong directory. --- inc/confutils.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/confutils.php') diff --git a/inc/confutils.php b/inc/confutils.php index edea80092..404cc6050 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -143,6 +143,9 @@ function getSchemes() { */ function linesToHash($lines, $lower=false) { $conf = array(); + // remove BOM + if (isset($lines[0]) && substr($lines[0],0,3) == pack('CCC',0xef,0xbb,0xbf)) + $lines[0] = substr($lines[0],3); foreach ( $lines as $line ) { //ignore comments (except escaped ones) $line = preg_replace('/(?