Author: ornicar2
Date: 2010-01-20 18:38:24 +0100 (Wed, 20 Jan 2010)
New Revision: 26952
Modified:
plugins/diemPlugin/trunk/dmCorePlugin/lib/task/dmUpgradeTask.class.php
Log:
[Diem]
- added upgrade method to dmUpgradeTask to add missing ga_token setting
Modified: plugins/diemPlugin/trunk/dmCorePlugin/lib/task/dmUpgradeTask.class.php
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/lib/task/dmUpgradeTask.class.php
2010-01-20 17:19:32 UTC (rev 26951)
+++ plugins/diemPlugin/trunk/dmCorePlugin/lib/task/dmUpgradeTask.class.php
2010-01-20 17:38:24 UTC (rev 26952)
@@ -9,7 +9,8 @@
$diemVersions = array(
'500ALPHA4',
'500ALPHA6',
- 'deprecateMediaWidgets'
+ 'deprecateMediaWidgets',
+ 'addGaToken'
);
/**
@@ -110,4 +111,23 @@
->andWhere('action = ?', 'media')
->execute();
}
+
+ /*
+ * Add ga_token setting if missing
+ */
+ protected function upgradeToAddGaToken()
+ {
+ if(!dmConfig::has('ga_token'))
+ {
+ $setting = new DmSetting;
+ $setting->set('name', 'ga_token');
+ $setting->fromArray(array(
+ 'description' => 'Auth token gor Google Analytics, computed from
password',
+ 'group_name' => 'internal',
+ 'credentials' => 'google_analytics'
+ ));
+
+ $setting->save();
+ }
+ }
}
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.