Skip to content

Commit 5f027cd

Browse files
author
jwarnier
committed
replace double-quotes with single-quotes whenever appropriate
1 parent 458767f commit 5f027cd

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

server/lib/app.inc.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@ function app() {
3737

3838
global $conf;
3939

40-
if($conf["start_db"] == true) {
41-
$this->load('db_'.$conf["db_type"]);
40+
if($conf['start_db'] == true) {
41+
$this->load('db_'.$conf['db_type']);
4242
$this->db = new db;
4343
if($this->db->linkId) $this->db->closeConn();
44-
$this->db->dbHost = $conf["db_host"];
45-
$this->db->dbName = $conf["db_database"];
46-
$this->db->dbUser = $conf["db_user"];
47-
$this->db->dbPass = $conf["db_password"];
44+
$this->db->dbHost = $conf['db_host'];
45+
$this->db->dbName = $conf['db_database'];
46+
$this->db->dbUser = $conf['db_user'];
47+
$this->db->dbPass = $conf['db_password'];
4848

4949
/*
5050
Initialize the connection to the master DB,
5151
if we are in a multiserver setup
5252
*/
5353

54-
if($conf["dbmaster_host"] != '' && $conf["dbmaster_host"] != $conf["db_host"]) {
54+
if($conf['dbmaster_host'] != '' && $conf['dbmaster_host'] != $conf['db_host']) {
5555
$this->dbmaster = new db;
5656
if($this->dbmaster->linkId) $this->dbmaster->closeConn();
57-
$this->dbmaster->dbHost = $conf["dbmaster_host"];
58-
$this->dbmaster->dbName = $conf["dbmaster_database"];
59-
$this->dbmaster->dbUser = $conf["dbmaster_user"];
60-
$this->dbmaster->dbPass = $conf["dbmaster_password"];
57+
$this->dbmaster->dbHost = $conf['dbmaster_host'];
58+
$this->dbmaster->dbName = $conf['dbmaster_database'];
59+
$this->dbmaster->dbUser = $conf['dbmaster_user'];
60+
$this->dbmaster->dbPass = $conf['dbmaster_password'];
6161
} else {
6262
$this->dbmaster = $this->db;
6363
}
@@ -74,8 +74,8 @@ function uses($classes) {
7474
if(is_array($cl)) {
7575
foreach($cl as $classname) {
7676
if(!@is_object($this->$classname)) {
77-
if(is_file($conf['classpath'] . "/".$classname.".inc.php") && !is_link($conf['classpath'] . "/".$classname.".inc.php")) {
78-
include_once($conf['classpath'] . "/".$classname.".inc.php");
77+
if(is_file($conf['classpath'] . '/'.$classname.'.inc.php') && !is_link($conf['classpath'] . '/'.$classname.'.inc.php')) {
78+
include_once($conf['classpath'] . '/'.$classname.'.inc.php');
7979
$this->$classname = new $classname;
8080
}
8181
}
@@ -89,10 +89,10 @@ function load($classes) {
8989
$cl = explode(',',$classes);
9090
if(is_array($cl)) {
9191
foreach($cl as $classname) {
92-
if(is_file($conf['classpath'] . "/".$classname.".inc.php") && !is_link($conf['classpath'] . "/".$classname.".inc.php")) {
93-
include_once($conf['classpath'] . "/".$classname.".inc.php");
92+
if(is_file($conf['classpath'] . '/'.$classname.'.inc.php') && !is_link($conf['classpath'] . '/'.$classname.'.inc.php')) {
93+
include_once($conf['classpath'] . '/'.$classname.'.inc.php');
9494
} else {
95-
die('Unable to load: '.$conf['classpath'] . "/".$classname.".inc.php");
95+
die('Unable to load: '.$conf['classpath'] . '/'.$classname.'.inc.php');
9696
}
9797
}
9898
}
@@ -108,27 +108,27 @@ function log($msg, $priority = 0) {
108108

109109
global $conf;
110110

111-
if($priority >= $conf["log_priority"]) {
111+
if($priority >= $conf['log_priority']) {
112112
//if (is_writable($conf["log_file"])) {
113-
if (!$fp = fopen ($conf["log_file"], "a")) {
114-
die("Unable to open logfile.");
113+
if (!$fp = fopen ($conf['log_file'], 'a')) {
114+
die('Unable to open logfile.');
115115
}
116116
switch ($priority) {
117117
case 0:
118-
$priority_txt = "DEBUG";
118+
$priority_txt = 'DEBUG';
119119
break;
120120
case 1:
121-
$priority_txt = "WARNING";
121+
$priority_txt = 'WARNING';
122122
break;
123123
case 2:
124-
$priority_txt = "ERROR";
124+
$priority_txt = 'ERROR';
125125
break;
126126
}
127127

128-
if (!fwrite($fp, date("d.m.Y-H:i")." - ".$priority_txt." - ". $msg."\r\n")) {
129-
die("Unable to write to logfile.");
128+
if (!fwrite($fp, date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\r\n")) {
129+
die('Unable to write to logfile.');
130130
}
131-
echo date("d.m.Y-H:i")." - ".$priority_txt." - ". $msg."\n";
131+
echo date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\n";
132132
fclose($fp);
133133

134134
// Log to database
@@ -178,4 +178,4 @@ function error($msg) {
178178

179179
$app = new app;
180180

181-
?>
181+
?>

0 commit comments

Comments
 (0)