CC-2652-adding default import value into db on install
- done - extra fix: add unique id on upgrade to 1.9.0
This commit is contained in:
parent
9ff5bdaf0f
commit
349e26dcee
3 changed files with 21 additions and 0 deletions
|
@ -294,6 +294,21 @@ class AirtimeInstall
|
|||
return true;
|
||||
}
|
||||
|
||||
public static function SetImportTimestamp()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
||||
$now = time();
|
||||
|
||||
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('import_timestamp', '$now')";
|
||||
$result = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static function GetAirtimeVersion()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
|
|
@ -47,7 +47,9 @@ if (isset($argv[1]) && $argv[1] == 'y') {
|
|||
echo "* Setting Airtime version".PHP_EOL;
|
||||
AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
||||
|
||||
// set up some keys in DB
|
||||
AirtimeInstall::SetUniqueId();
|
||||
AirtimeInstall::SetImportTimestamp();
|
||||
|
||||
if (AirtimeInstall::$databaseTablesCreated) {
|
||||
|
||||
|
|
|
@ -783,6 +783,10 @@ AirtimeInstall::MigrateTablesToVersion(__DIR__, '20110713161043');
|
|||
|
||||
AirtimeInstall::InsertCountryDataIntoDatabase();
|
||||
|
||||
// set up some keys in DB
|
||||
AirtimeInstall::SetUniqueId();
|
||||
AirtimeInstall::SetImportTimestamp();
|
||||
|
||||
AirtimeIni::CreateMonitFile();
|
||||
|
||||
AirtimeInstall::CreateSymlinksToUtils();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue