From c220da99596c4fbca3a4413dbf880dbfc8fd0121 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 24 Jan 2014 06:20:12 -0500
Subject: [PATCH] changed sql-query and make ure that the backup-sub-dir exists
---
install/lib/install.lib.php | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 30ba04e..501cf3b 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -666,6 +666,23 @@
}
}
+function hasLine($filename, $search_pattern, $strict = 0) {
+ if($lines = @file($filename)) {
+ foreach($lines as $line) {
+ if($strict == 0) {
+ if(stristr($line, $search_pattern)) {
+ return true;
+ }
+ } else {
+ if(trim($line) == $search_pattern) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
function is_installed($appname) {
exec('which '.escapeshellcmd($appname).' 2> /dev/null', $out, $returncode);
if(isset($out[0]) && stristr($out[0], $appname) && $returncode == 0) {
@@ -811,6 +828,8 @@
exec('date +%Z', $tzinfo);
$timezone = $tzinfo[0];
}
+
+ if(substr($timezone, 0, 1) === '/') $timezone = substr($timezone, 1);
return $timezone;
}
--
Gitblit v1.9.1