1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: 19: 20: 21: 22: 23: 24:
25: class cUpgradeJob_0013 extends cUpgradeJobAbstract {
26:
27: public $maxVersion = "4.9.0";
28:
29: public function _execute() {
30: global $db, $cfg;
31:
32: $needsUpdate = true;
33:
34: $actionColl = new cApiActionCollection();
35: $actionArray = $actionColl->getAvailableActions();
36:
37: $needsUpdate = !isset($actionArray[330]);
38:
39: foreach ($actionArray as $action) {
40: if ($action["name"] == "login") {
41: $needsUpdate = false;
42: }
43: }
44:
45: if ($needsUpdate) {
46: $db->query("INSERT INTO " . $cfg['tab']['actions'] . " VALUES('330', '0', '0', 'login', '', '', '1');");
47: $db->query("INSERT INTO " . $cfg['tab']['actions'] . " VALUES('359', '6', '', 'front_allow', '', '', '1');");
48: }
49: }
50:
51: }
52: