summaryrefslogtreecommitdiff
path: root/inc/confutils.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
committerGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
commit0f8ac4e8c5872a6b68b350f96a9ecde0291edefa (patch)
treead7938bb4143d5e5a38fd7a8d131e4171aec657d /inc/confutils.php
parent58ec8fa9128e4581749955de87530f432e387588 (diff)
parentb31fcef02fd24b3e746c9618e77152c7b84c2f2a (diff)
downloadrpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.gz
rpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.bz2
Merge branch 'master' into stable
Diffstat (limited to 'inc/confutils.php')
-rw-r--r--inc/confutils.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/inc/confutils.php b/inc/confutils.php
index 29ead1e9f..404cc6050 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 ) {
@@ -139,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('/(?<![&\\\\])#.*$/','',$line);
@@ -182,7 +189,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 +243,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 +280,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;