remove all newline characters from AirtimeInstall.php
This commit is contained in:
parent
56eb2dff92
commit
d367c0f55c
1 changed files with 14 additions and 14 deletions
|
@ -107,16 +107,16 @@ class AirtimeInstall
|
||||||
echo "done.\n";
|
echo "done.\n";
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo "Error!\n".$e->getMessage()."\n";
|
echo "Error!\n".$e->getMessage()."\n";
|
||||||
echo " SQL statement was:\n";
|
echo " SQL statement was:\n";
|
||||||
echo " ".$sql."\n\n";
|
echo " ".$sql."\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function DropSequence($p_sequenceName)
|
public static function DropSequence($p_sequenceName)
|
||||||
{
|
{
|
||||||
AirtimeInstall::InstallQuery("DROP SEQUENCE IF EXISTS $p_sequenceName");
|
AirtimeInstall::InstallQuery("DROP SEQUENCE IF EXISTS $p_sequenceName");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to connect to the database. Return true on success, false on failure.
|
* Try to connect to the database. Return true on success, false on failure.
|
||||||
|
@ -130,12 +130,12 @@ class AirtimeInstall
|
||||||
try {
|
try {
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage().PHP_EOL;
|
echo $e->getMessage().PHP_EOL;
|
||||||
echo "Database connection problem.".PHP_EOL;
|
echo "Database connection problem.".PHP_EOL;
|
||||||
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
||||||
" with corresponding permissions.".PHP_EOL;
|
" with corresponding permissions.".PHP_EOL;
|
||||||
if ($p_exitOnError) {
|
if ($p_exitOnError) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ class AirtimeInstall
|
||||||
|
|
||||||
public static function SetUniqueId()
|
public static function SetUniqueId()
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
$uniqueId = md5(uniqid("", true));
|
$uniqueId = md5(uniqid("", true));
|
||||||
|
|
||||||
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('uniqueId', '$uniqueId')";
|
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('uniqueId', '$uniqueId')";
|
||||||
|
@ -328,7 +328,7 @@ class AirtimeInstall
|
||||||
public static function SetDefaultTimezone()
|
public static function SetDefaultTimezone()
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
// we need to run php as commandline because we want to get the timezone in cli php.ini file
|
// we need to run php as commandline because we want to get the timezone in cli php.ini file
|
||||||
//$defaultTimezone = exec("php -r 'echo date_default_timezone_get().PHP_EOL;'");
|
//$defaultTimezone = exec("php -r 'echo date_default_timezone_get().PHP_EOL;'");
|
||||||
$defaultTimezone = exec("cat /etc/timezone");
|
$defaultTimezone = exec("cat /etc/timezone");
|
||||||
$defaultTimezone = trim($defaultTimezone);
|
$defaultTimezone = trim($defaultTimezone);
|
||||||
|
@ -345,7 +345,7 @@ class AirtimeInstall
|
||||||
|
|
||||||
public static function SetImportTimestamp()
|
public static function SetImportTimestamp()
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('import_timestamp', '0')";
|
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('import_timestamp', '0')";
|
||||||
$result = $con->exec($sql);
|
$result = $con->exec($sql);
|
||||||
if ($result < 1) {
|
if ($result < 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue