diff --git a/administrator/components/com_j2migrationchecker/controllers/cpanel.php b/administrator/components/com_j2migrationchecker/controllers/cpanel.php index 0529145..8d5405a 100644 --- a/administrator/components/com_j2migrationchecker/controllers/cpanel.php +++ b/administrator/components/com_j2migrationchecker/controllers/cpanel.php @@ -31,7 +31,7 @@ public function browse() //JToolBarHelper::publish('testpublish'); JToolBarHelper::unpublish('customunpublish'); F0FModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_j2migrationchecker/models'); - $model = FOFModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); + $model = F0FModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); $list_components = $model->getListComponents(); $list_plugins = $model->getListPlugins(); $list_modules = $model->getListModules(); @@ -66,7 +66,7 @@ public function browse() public function getRenamedTemaplateOverride(){ F0FModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_j2migrationchecker/models'); - $model = FOFModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); + $model = F0FModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); $template_override = $model->getTemplate(); $template_overridePath = []; foreach ($template_override as $key => $value){ @@ -86,7 +86,7 @@ public function getRenamedTemaplateOverride(){ public function installStatus() { F0FModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_j2migrationchecker/models'); - $model = FOFModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); + $model = F0FModel::getTmpInstance('J2MigrationCheckers', 'J2MigrationCheckerModel'); $components_status = $model->componentsStatus(); $modules_status = $model->modulesStatus(); $plugins_status = $model->pluginsStatus(); diff --git a/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php b/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php index 37a626f..9c822e6 100644 --- a/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php +++ b/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php @@ -15,7 +15,7 @@ * * @since 0.0.1 */ -class J2MigrationCheckerModelJ2MigrationCheckers extends FOFModel +class J2MigrationCheckerModelJ2MigrationCheckers extends F0FModel { /** * Method to get a table object, load it if necessary. @@ -62,7 +62,7 @@ public function getListModules(){ $query->where("type='module'"); $db->setQuery($query); $data = $db->loadObjectList(); - $j2store_module = array('mod_j2store_related_products','mod_j2store_search','mod_j2store_categories','mod_j2products','mod_j2store_cart'); + $j2store_module = array('mod_j2store_related_products','mod_j2store_search','mod_j2store_categories','mod_j2products','mod_j2store_cart','mod_j2store_menu'); // in_array() $result = []; foreach($data as $key => $value) { @@ -167,9 +167,9 @@ public function saveData(){ $plugins_status = $this->pluginsStatus(); $components_status = $this->componentsStatus(); $template_status = $this->templateStatus(); - $installation_status = false; + $installation_status = 0; if($components_status !== 'Not Ready' && $modules_status !== 'Not Ready' && $plugins_status !== 'Not Ready' && $template_status !== 'Not Ready' ) { - $installation_status = true; + $installation_status = 1; } $db = JFactory::getDbo(); $query = $db->getQuery(true); @@ -178,6 +178,8 @@ public function saveData(){ $result = $db->loadObjectList();; if( is_array($result) && count($result)> 0 ){ foreach ($result as $key => $value ) { + $query = $db->getQuery(true); // Create a new query object + $query->update($db->qn('#__extension_check')); $query->set($db->qn('component_status') . ' = ' . $db->q($components_status)); $query->set($db->qn('plugins_status') . ' = ' . $db->q($plugins_status)); @@ -189,6 +191,7 @@ public function saveData(){ $db->execute(); } }else { + $query = $db->getQuery(true); // Create a new query object $query->insert($db->qn('#__extension_check')) ->columns($columns) ->values($db->q($components_status) . ', ' . $db->q($plugins_status) . ',' . $db->q($modules_status). ',' . $db->q($template_status). ',' . $db->q($installation_status)); diff --git a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/components.php b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/components.php index 699dc36..90732c3 100644 --- a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/components.php +++ b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/components.php @@ -1,12 +1,20 @@ + list_components)) : ?> -
-
+
+

-
+

Status :

-
+
components_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>

components_status; ?>

@@ -60,7 +68,7 @@ enabled) && !empty($row->enabled ) ? '' : 'pointer-events: none'; ?>
- extension_id",false) ?>" > + extension_id",false) ?>" > diff --git a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/modules.php b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/modules.php index 09372a7..7bb3841 100644 --- a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/modules.php +++ b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/modules.php @@ -1,12 +1,20 @@ + list_modules)) : ?> -
-
+
+

-
+

Status :

-
+
modules_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>

modules_status; ?>

@@ -59,7 +67,7 @@ enabled) && !empty($row->enabled ) ? '' : 'pointer-events: none'; ?>
- extension_id",false) ?>" > + extension_id",false) ?>" > diff --git a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/plugins.php b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/plugins.php index b99255c..23c3556 100644 --- a/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/plugins.php +++ b/administrator/components/com_j2migrationchecker/views/cpanel/tmpl/plugins.php @@ -1,12 +1,20 @@ + list_plugins)) : ?> -