Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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){
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -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));
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?php
$row_class = 'row';
$col_class = 'co-md-';
if (version_compare(JVERSION, '3.99.99', 'lt')) {
$row_class = 'row-fluid';
$col_class = 'span';
}
?>
<?php if (!empty($this->list_components)) : ?>
<div class="row-fluid">
<div class="span8">
<div class="<?php echo $row_class ?>">
<div class="<?php echo $col_class; ?>8">
<h3><?php echo JText::_('COM_EXTENSIONCHECK_J2STORE_COMPONENT');?> </h3>
</div>
<div class="span1">
<div class="<?php echo $col_class; ?>1">
<h3>Status :</h3>
</div>
<div class="span3">
<div class="<?php echo $col_class; ?>3">
<?php $alert_class = ($this->components_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>
<div class="alert <?php echo $alert_class; ?> center">
<h4 class="alert-heading"><?php echo $this->components_status; ?></h4>
Expand Down Expand Up @@ -60,7 +68,7 @@
<?php $disabled_link = isset($row->enabled) && !empty($row->enabled ) ? '' : 'pointer-events: none'; ?>
<div class="btn-toolbar">
<div class="btn-wrapper">
<a class="modal" style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&task=customunpublish&cid=$row->extension_id",false) ?>" >
<a style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&task=customunpublish&cid=$row->extension_id",false) ?>" >
<span class="btn btn-small <?php echo $btn_class; ?>" id="">
<i class="<?php echo $icon_class; ?>"></i>
<?php echo JText::_($unpublish_label); ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?php
$row_class = 'row';
$col_class = 'co-md-';
if (version_compare(JVERSION, '3.99.99', 'lt')) {
$row_class = 'row-fluid';
$col_class = 'span';
}
?>
<?php if (!empty($this->list_modules)) : ?>
<div class="row-fluid">
<div class="span8">
<div class="<?php echo $row_class ?>">
<div class="<?php echo $col_class ?>8">
<h3><?php echo JText::_('COM_EXTENSIONCHECK_J2STORE_MODULES');?></h3>
</div>
<div class="span1">
<div class="<?php echo $col_class ?>1">
<h3>Status :</h3>
</div>
<div class="span3">
<div class="<?php echo $col_class ?>3">
<?php $alert_class = ($this->modules_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>
<div class="alert <?php echo $alert_class; ?> center">
<h4 class="alert-heading"> <?php echo $this->modules_status; ?></h4>
Expand Down Expand Up @@ -59,7 +67,7 @@
<?php $disabled_link = isset($row->enabled) && !empty($row->enabled ) ? '' : 'pointer-events: none'; ?>
<div class="btn-toolbar">
<div class="btn-wrapper">
<a class="modal" style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&task=customunpublish&cid= $row->extension_id",false) ?>" >
<a style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&task=customunpublish&cid= $row->extension_id",false) ?>" >
<span class="btn btn-small <?php echo $btn_class; ?>" id="">
<i class="<?php echo $icon_class; ?>"></i>
<?php echo JText::_($unpublish_label); ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?php
$row_class = 'row';
$col_class = 'co-md-';
if (version_compare(JVERSION, '3.99.99', 'lt')) {
$row_class = 'row-fluid';
$col_class = 'span';
}
?>
<?php if (!empty($this->list_plugins)) : ?>
<div class="row-fluid">
<div class="span8">
<div class="<?php echo $row_class ?>">
<div class="<?php echo $col_class ?>8">
<h3><?php echo JText::_('COM_EXTENSIONCHECK_J2STORE_PLUGINS');?></h3>
</div>
<div class="span1">
<div class="<?php echo $col_class ?>1">
<h3>Status :</h3>
</div>
<div class="span3">
<div class="<?php echo $col_class ?>3">
<?php $alert_class = ($this->plugins_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>
<div class="alert <?php echo $alert_class; ?> center">
<h4 class="alert-heading"><?php echo $this->plugins_status; ?></h4>
Expand Down Expand Up @@ -53,21 +61,23 @@
<?php echo $row->extension_id; ?>
</td>
<td align="center">

<?php $btn_class = isset($row->enabled) && !empty($row->enabled ) ? 'btn-danger ' : 'btn-success '; ?>
<?php $unpublish_label = isset($row->enabled) && !empty($row->enabled ) ? 'DO_UNPUBLISH' : 'UNPUBLISHED'; ?>
<?php $icon_class = isset($row->enabled) && !empty($row->enabled ) ? 'icon-unpublish' : 'fa fa-thumbs-up'; ?>
<?php $disabled_link = isset($row->enabled) && !empty($row->enabled ) ? '' : 'pointer-events: none'; ?>

<div class="btn-toolbar">
<div class="btn-wrapper">
<a class="modal" style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&cid= $row->extension_id&task=customunpublish",false) ?>" >
<span class="btn btn-small <?php echo $btn_class; ?>" id="">
<a style="<?php echo $disabled_link; ?>" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&cid= $row->extension_id&task=customunpublish",false) ?>" >
<span class="btn btn-sm <?php echo $btn_class; ?>" id="">
<i class="<?php echo $icon_class; ?>"></i>
<?php echo JText::_($unpublish_label); ?>
</span>
</a>
</div>
</div>
<?php // echo JHtml::_('jgrid.published', $row->enabled, $i, '',false, 'cb'); ?>
<?php //echo JHtml::_('jgrid.published', $row->enabled, $i, '',false, 'cb'); ?>
</td>

</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@

<div class="row-fluid">
<div class="span8">
<?php
$row_class = 'row';
$col_class = 'co-md-';
if (version_compare(JVERSION, '3.99.99', 'lt')) {
$row_class = 'row-fluid';
$col_class = 'span';
}
?>
<div class="<?php echo $row_class; ?>">
<div class="<?php echo $col_class; ?>8">
<h3><?php echo JText::_('COM_EXTENSIONCHECK_J2STORE_TEMPLATE_OVERRIDES');?></h3>
</div>
<div class="span1">
<div class="<?php echo $col_class; ?>1">
<h3>Status :</h3>
</div>
<div class="span3">
<div class="<?php echo $col_class; ?>3">
<?php $alert_class = ($this->templates_status == 'Ready to install' )? 'alert-success' : 'alert-danger' ; ?>
<div class="alert <?php echo $alert_class; ?> center">
<h4 class="alert-heading"><?php echo $this->templates_status; ?></h4>
Expand All @@ -25,7 +32,7 @@
</div>
<div class="btn-toolbar">
<div class="btn-wrapper">
<a class="modal" href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&folder_Path=$value&task=renameFolder") ?>" >
<a href="<?php echo JRoute::_( "index.php?option=com_j2migrationchecker&view=cpanel&folder_Path=$value&task=renameFolder") ?>" >
<span class="btn btn-small btn-success" id="">
Rename
</span>
Expand Down