From 382f637c57464ce22b710f4451db7a31e3942e6f Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 23 Aug 2023 19:12:33 +0530 Subject: [PATCH 1/2] check 'mod_j2store_menu' is disabled. --- .../com_j2migrationchecker/models/j2migrationcheckers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php b/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php index 37a626f..b0ad11d 100644 --- a/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php +++ b/administrator/components/com_j2migrationchecker/models/j2migrationcheckers.php @@ -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) { From 34a1834fb42520f9451856f9c4125dae9d89da8b Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 7 Sep 2023 11:17:55 +0530 Subject: [PATCH 2/2] migrate the migration checker plugin for joomla4 --- .../controllers/cpanel.php | 6 ++--- .../models/j2migrationcheckers.php | 9 ++++--- .../views/cpanel/tmpl/components.php | 18 ++++++++++---- .../views/cpanel/tmpl/modules.php | 18 ++++++++++---- .../views/cpanel/tmpl/plugins.php | 24 +++++++++++++------ .../views/cpanel/tmpl/templateoverride.php | 19 ++++++++++----- 6 files changed, 65 insertions(+), 29 deletions(-) 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 b0ad11d..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. @@ -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)) : ?> -