summaryrefslogtreecommitdiff
path: root/inc/confutils.php
diff options
context:
space:
mode:
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;