Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task #173069 feat: Update infra extensions code used to make Joomla 4 compatible #220

Merged
merged 18 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5629259
Task #172430 feat: Update JGive code to make Joomla 4 compatible
ankush-maherwal Jun 24, 2021
b546e43
Task #172430 feat: Update JGive code to make Joomla 4 compatible
ankush-maherwal Jun 24, 2021
e3671e6
Task #172430 feat: Update JGive code to make Joomla 4 compatible
ankush-maherwal Jun 24, 2021
7a0700d
Task #172430 feat: Update JGive code to make Joomla 4 compatible
ankush-maherwal Jul 6, 2021
5613fb4
Merge branch 'j4x' of github.com:techjoomla/com_tjreports into joomla-4
ankush-maherwal Oct 11, 2021
e8a5282
Task #175539 fix: Make extension compatible with Joomla 4
deepa-g Oct 12, 2021
8897201
Merge pull request #1 from deepgawade89/joomla-4
ankush-maherwal Oct 13, 2021
8a34962
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 10, 2021
af40800
Merge branch 'joomla-4' of github.com:ankush-maherwal/com_tjreports i…
ankush-maherwal Dec 10, 2021
7f2d852
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 10, 2021
3f32645
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 10, 2021
e9e0b30
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 11, 2021
cc36294
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 11, 2021
4c88d01
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Dec 11, 2021
c4280e9
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Jan 25, 2022
14184af
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Jan 25, 2022
0b56815
Task #173069 feat: Update infra extensions code used in JGive to make…
ankush-maherwal Jan 25, 2022
dd18db0
Merge branch 'j4x' into joomla-4
ankush-maherwal Jan 25, 2022
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
1 change: 0 additions & 1 deletion tjreports/administrator/controllers/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controlleradmin');

// Load frontend venues model
JLoader::import('com_tjreports.controllers.reports', JPATH_SITE . '/components');
2 changes: 1 addition & 1 deletion tjreports/administrator/controllers/tjreport.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Factory;
use Joomla\CMS\Response\JsonResponse;

jimport('joomla.application.component.controllerform');
/**
* tjreport Controller
*
Expand Down
2 changes: 1 addition & 1 deletion tjreports/administrator/controllers/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Factory;

jimport('joomla.application.component.controllerform');
/**
* tjreport Controller
*
Expand Down
2 changes: 2 additions & 0 deletions tjreports/administrator/controllers/tjreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Language\Text;

/**
* com tjreports Controller
*
Expand Down
5 changes: 3 additions & 2 deletions tjreports/administrator/helpers/tjreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
// No direct access
defined('_JEXEC') or die;

use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Path;
Expand Down Expand Up @@ -109,15 +110,15 @@ public function getViewpath($component, $viewname, $layout = 'default', $searchT

$layoutname = $layout . '.php';

$override = $searchTmpPath . '/' . 'templates' . '/' . $app->getTemplate() . '/' . 'html' . '/' . $component . '/' . $viewname . '/' . $layoutname;
$override = $searchTmpPath . '/templates/' . $app->getTemplate() . '/html/' . $component . '/' . $viewname . '/' . $layoutname;

if (File::exists($override))
{
return $view = $override;
}
else
{
return $view = $useViewpath . '/' . 'components' . '/' . $component . '/' . 'views' . '/' . $viewname . '/' . 'tmpl' . '/' . $layoutname;
return $view = $useViewpath . '/components/' . $component . '/views/' . $viewname . '/tmpl/' . $layoutname;
}
}
}
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/createdby.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
*/

defined('JPATH_BASE') or die;

use Joomla\CMS\Form\FormField;
use Joomla\CMS\Factory;

jimport('joomla.form.formfield');

/**
* Supports an HTML select list of categories
*
Expand Down
4 changes: 1 addition & 3 deletions tjreports/administrator/models/fields/custom_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
*/

defined('JPATH_BASE') or die;
use Joomla\CMS\Form\FormField;

jimport('joomla.html.html');
jimport('joomla.form.formfield');
use Joomla\CMS\Form\FormField;

/**
* Supports an HTML select list of categories
Expand Down
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/filemultiple.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
*/

defined('JPATH_BASE') or die;
use Joomla\CMS\Form\FormField;

jimport('joomla.form.formfield');
use Joomla\CMS\Form\FormField;

/**
* Supports an HTML select list of categories
Expand Down
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/foreignkey.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;

use Joomla\CMS\Form\FormField;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;

jimport('joomla.form.formfield');

/**
* Supports a value from an external table
*
Expand Down
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/modifiedby.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
*/

defined('JPATH_BASE') or die;

use Joomla\CMS\Form\FormField;
use Joomla\CMS\Factory;

jimport('joomla.form.formfield');

/**
* Supports an HTML select list of categories
*
Expand Down
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/timecreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
*/

defined('JPATH_BASE') or die;

use Joomla\CMS\Form\FormField;
use Joomla\CMS\Factory;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Language\Text;

jimport('joomla.form.formfield');

/**
* Supports an HTML select list of categories
*
Expand Down
3 changes: 1 addition & 2 deletions tjreports/administrator/models/fields/timeupdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
*/

defined('JPATH_BASE') or die;

use Joomla\CMS\Form\FormField;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;

jimport('joomla.form.formfield');

/**
* Supports an HTML select list of categories
*
Expand Down
1 change: 1 addition & 0 deletions tjreports/administrator/models/fields/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// No direct access.
defined('_JEXEC') or die();

use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Form\Field\UserField;
use Joomla\CMS\Factory;
Expand Down
2 changes: 1 addition & 1 deletion tjreports/administrator/models/indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

// No direct access.
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Response\JsonResponse;

use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;

Expand Down
3 changes: 2 additions & 1 deletion tjreports/administrator/models/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;

/**
* jticketing Model
*
Expand Down Expand Up @@ -227,7 +229,6 @@ public function getReportPluginData($pluginId, $pluginName = null)
*/
protected function prepareTable($table)
{
jimport('joomla.filter.output');
$db = Factory::getDbo();
$query = $db->getQuery(true);

Expand Down
2 changes: 2 additions & 0 deletions tjreports/administrator/models/tjreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Factory;

/**
* Tjreportslist Model
*
Expand Down
2 changes: 1 addition & 1 deletion tjreports/administrator/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ CREATE TABLE IF NOT EXISTS `#__tj_reports` (
`default` tinyint(4) NOT NULL DEFAULT 0,
`userid` int(11) NOT NULL DEFAULT 0,
`datadenyset` int(11) DEFAULT 0,
`param` text NOT NULL DEFAULT '',
`param` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
2 changes: 1 addition & 1 deletion tjreports/administrator/sql/updates/mysql/1.1.8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ALTER TABLE `#__tj_reports` CHANGE `parent` `parent` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `default` `default` tinyint(4) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `userid` `userid` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `datadenyset` `datadenyset` int(11) DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `param` `param` text NOT NULL DEFAULT '';
ALTER TABLE `#__tj_reports` CHANGE `param` `param` text NOT NULL;
13 changes: 13 additions & 0 deletions tjreports/administrator/sql/updates/mysql/2.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Adding default values to the column of existing table

ALTER TABLE `#__tj_reports` CHANGE `asset_id` `asset_id` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `ordering` `ordering` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `title` `title` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__tj_reports` CHANGE `alias` `alias` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__tj_reports` CHANGE `plugin` `plugin` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__tj_reports` CHANGE `client` `client` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__tj_reports` CHANGE `parent` `parent` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `default` `default` tinyint(4) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `userid` `userid` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `datadenyset` `datadenyset` int(11) DEFAULT 0;
ALTER TABLE `#__tj_reports` CHANGE `param` `param` text DEFAULT NULL;
4 changes: 3 additions & 1 deletion tjreports/administrator/tables/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
*/
// No direct access
defined('_JEXEC') or die;

use Joomla\CMS\Table\Table;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\Language\Text;

/**
* Hello Table class
* Report Table class
*
* @since 0.0.1
*/
Expand Down
2 changes: 1 addition & 1 deletion tjreports/administrator/tjreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// No direct access
defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
Expand Down Expand Up @@ -41,7 +42,6 @@
$document->addStyleSheet(Uri::root(true) . '/media/com_tjreports/css/font-awesome/css/font-awesome.min.css');

// Include dependancies
jimport('joomla.application.component.controller');

JLoader::registerPrefix('Tjreports', JPATH_COMPONENT_ADMINISTRATOR);

Expand Down
9 changes: 4 additions & 5 deletions tjreports/administrator/views/reports/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
// no direct access
defined('_JEXEC') or die;

// No direct access
defined('_JEXEC') or die;

// Load the layout & push variables
$bs = (JVERSION < '4.0.0') ? 'bs3' : 'bs5';

$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default_' . $bs, 'SITE', 'SITE');

$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default', 'SITE', 'SITE');
ob_start();
include($path);
include $path;
$html = ob_get_contents();
ob_end_clean();
echo $html;
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
// no direct access
defined('_JEXEC') or die;

// No direct access
defined('_JEXEC') or die;

// Load the layout & push variables

$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default_filters', 'SITE', 'SITE');
ob_start();
include($path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
defined('_JEXEC') or die;

// Load the layout & push variables

$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default_summary', 'SITE', 'SITE');
ob_start();
include $path;
Expand Down
2 changes: 2 additions & 0 deletions tjreports/administrator/views/reports/view.base.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@

// No direct access
defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_tjreports/views/reports/view.base.php';
JLoader::register('ReportsViewBase', JPATH_SITE . '/components/com_tjreports/views/reports/view.base.php');
2 changes: 2 additions & 0 deletions tjreports/administrator/views/reports/view.csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@

// No direct access
defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_tjreports/views/reports/view.csv.php';
JLoader::register('TjreportsViewReports', JPATH_SITE . '/components/com_tjreports/views/reports/view.csv.php');
2 changes: 2 additions & 0 deletions tjreports/administrator/views/reports/view.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@

// No direct access
defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_tjreports/views/reports/view.json.php';
JLoader::register('TjreportsViewReports', JPATH_SITE . '/components/com_tjreports/views/reports/view.json.php');
13 changes: 8 additions & 5 deletions tjreports/administrator/views/tjreport/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,30 @@
*/
// No direct access
defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

HTMLHelper::_('behavior.formvalidator');
$input = Factory::getApplication()->input;

$showParent = true;
if($this->form->getValue('id'))

if ($this->form->getValue('id'))
{
if(!$this->form->getValue('parent'))
if (!$this->form->getValue('parent'))
{
$showParent = false;
}

$this->form->setFieldAttribute('client','readonly','readonly');
$this->form->setFieldAttribute('parent','readonly','readonly');
$this->form->setFieldAttribute('client', 'readonly', 'readonly');
$this->form->setFieldAttribute('parent', 'readonly', 'readonly');
}
else
{
$this->form->setFieldAttribute('parent','required','required');
$this->form->setFieldAttribute('parent', 'required', 'required');
}

JFactory::getDocument()->addScriptDeclaration('
Expand Down
2 changes: 2 additions & 0 deletions tjreports/administrator/views/tjreports/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

HTMLHelper::_('formbehavior.chosen', 'select');
$user = Factory::getUser();
$listOrder = $this->escape($this->state->get('list.ordering'));
Expand Down
Loading