summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-14 12:15:13 -0700
committerBrion Vibber <brion@pobox.com>2010-05-14 12:15:13 -0700
commit91367dbc2145d0ad0eebd12cd6197d54c3d3b930 (patch)
treecff3d3f6bdf8d5567220ea666ffefdd0156d7c6c /lib
parentda18701394ef717cd68dad11f5a830719ad675e6 (diff)
parent065ecc5573607d21ae005ff2649d04558256fc7e (diff)
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'lib')
-rw-r--r--lib/installer.php5
-rw-r--r--lib/util.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/installer.php b/lib/installer.php
index 589a19a66..58ffbfef7 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -128,6 +128,7 @@ abstract class Installer
$pass = false;
}
+ // @fixme this check seems to be insufficient with Windows ACLs
if (!is_writable(INSTALLDIR)) {
$this->warning(sprintf('Cannot write config file to: <code>%s</code></p>', INSTALLDIR),
sprintf('On your server, try this command: <code>chmod a+w %s</code>', INSTALLDIR));
@@ -409,6 +410,10 @@ abstract class Installer
"\$config['db']['database'] = '{$this->db['database']}';\n\n".
($this->db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
"\$config['db']['type'] = '{$this->db['type']}';\n\n";
+
+ // Normalize line endings for Windows servers
+ $cfg = str_replace("\n", PHP_EOL, $cfg);
+
// write configuration file out to install directory
$res = file_put_contents(INSTALLDIR.'/config.php', $cfg);
diff --git a/lib/util.php b/lib/util.php
index e15c69f95..b2717e96d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1397,7 +1397,7 @@ function common_log_line($priority, $msg)
{
static $syslog_priorities = array('LOG_EMERG', 'LOG_ALERT', 'LOG_CRIT', 'LOG_ERR',
'LOG_WARNING', 'LOG_NOTICE', 'LOG_INFO', 'LOG_DEBUG');
- return date('Y-m-d H:i:s') . ' ' . $syslog_priorities[$priority] . ': ' . $msg . "\n";
+ return date('Y-m-d H:i:s') . ' ' . $syslog_priorities[$priority] . ': ' . $msg . PHP_EOL;
}
function common_request_id()