66 * @copyright Copyright (C) 2009 - 2020 JoomDev.
77 * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
88 */
9+
10+ use Astroid \Helper \Overrides ;
11+
912// no direct access
1013defined ('_JEXEC ' ) or die;
1114jimport ('joomla.filesystem.file ' );
1215
13- class astroidInstallerScript {
16+ class astroidInstallerScript
17+ {
1418
1519 /**
1620 *
1721 * Function to run before installing the component
1822 */
19- public function preflight ($ type , $ parent ) {
23+ public function preflight ($ type , $ parent )
24+ {
2025 $ plugin_dir = JPATH_LIBRARIES . '/ ' . 'astroid ' . '/ ' . 'plugins ' . '/ ' ;
2126 $ plugins = array_filter (glob ($ plugin_dir . '* ' ), 'is_dir ' );
2227 foreach ($ plugins as $ plugin ) {
@@ -30,17 +35,21 @@ public function preflight($type, $parent) {
3035 *
3136 * Function to run after installing the component
3237 */
33- public function postflight ($ type , $ parent ) {
38+ public function postflight ($ type , $ parent )
39+ {
3440 $ plugin_dir = JPATH_LIBRARIES . '/ ' . 'astroid ' . '/ ' . 'plugins ' . '/ ' ;
3541 $ plugins = array_filter (glob ($ plugin_dir . '* ' ), 'is_dir ' );
3642 foreach ($ plugins as $ plugin ) {
3743 if ($ type == "install " || $ type == "update " ) {
3844 $ this ->installPlugin ($ plugin , $ plugin_dir );
3945 }
4046 }
47+
48+ Overrides::fix ();
4149 }
4250
43- public function installPlugin ($ plugin , $ plugin_dir ) {
51+ public function installPlugin ($ plugin , $ plugin_dir )
52+ {
4453 $ db = JFactory::getDbo ();
4554 $ plugin_name = str_replace ($ plugin_dir , '' , $ plugin );
4655
@@ -57,7 +66,8 @@ public function installPlugin($plugin, $plugin_dir) {
5766 return true ;
5867 }
5968
60- public function uninstallPlugin ($ plugin , $ plugin_dir ) {
69+ public function uninstallPlugin ($ plugin , $ plugin_dir )
70+ {
6171 $ db = JFactory::getDbo ();
6272 $ plugin_name = str_replace ($ plugin_dir , '' , $ plugin );
6373 $ query = $ db ->getQuery (true );
@@ -69,5 +79,4 @@ public function uninstallPlugin($plugin, $plugin_dir) {
6979 $ db ->execute ();
7080 return true ;
7181 }
72-
7382}
0 commit comments