PluginProbe
CSS & JavaScript Toolbox / 7.2
CSS & JavaScript Toolbox v7.2
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | access.points/main.accesspoint.php +18 -12 6.07.2 View file →
@@ -50,11 +50,13 @@
50 50 * put your comment there...
51 51 *
52 52 */
53 53 public function main() {
54 - // Run the coupling!
55 - $this->controllerName = 'blocks-coupling';
56 - $this->route();
54 + // Run the coupling only if installed!
55 + if (CJTPlugin::getInstance()->isInstalled()) {
56 + $this->controllerName = 'blocks-coupling';
57 + $this->route(false);
58 + }
57 59 // Run all the aother access points!
58 60 CJTPlugin::getInstance()->listen();
59 61 }
60 62
@@ -62,17 +64,21 @@
62 64 * put your comment there...
63 65 *
64 66 */
65 67 public static function uninstall() {
66 - // Get the only instance we've for the main access point!
67 - $mainAccessPointObject = self::$instance;
68 - // Load default controller!
69 - $mainAccessPointObject->controllerName = 'default';
70 - $controller = $mainAccessPointObject->route()
71 - // Fire uninstall action!
72 - ->setAction('uninstall')
73 - ->_doAction();
74 - return $controller;
68 + // For the uninstaller to be run eraseData setting must be enabled.
69 + cssJSToolbox::import('models:settings:uninstall.php');
70 + $settings = new CJTSettingsUninstallPage();
71 + if ($settings->eraseData) {
72 + // Get the only instance we've for the main access point!
73 + $mainAccessPointObject = self::$instance;
74 + // Load default controller!
75 + $mainAccessPointObject->controllerName = 'default';
76 + $controller = $mainAccessPointObject->route(false)
77 + // Fire uninstall action!
78 + ->setAction('uninstall')
79 + ->_doAction();
80 + }
75 81 }
76 82
77 83 } // End class.
78 84