Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
8e3e7d6570 | |||
908fd6a45a | |||
32498659b4 | |||
deec751e77 | |||
85490b1a3d | |||
4f7858e4b0 | |||
dbe9b096c8 | |||
|
71186d6b8d | ||
7be39a27ad | |||
2a0e88d337 |
46
README.md
46
README.md
@ -1,8 +1,6 @@
|
||||
# Track Release Checking (1.0.x)
|
||||
|
||||
![Track Release Checking image](https://raw.githubusercontent.com/joomla-projects/com_release_checking/master/admin/assets/images/vdm-component.jpg "The Track Release Checking")
|
||||
|
||||
Component to keep track of release checking
|
||||
A component to keep track of release checking.
|
||||
|
||||
# Build Details
|
||||
|
||||
@ -10,45 +8,13 @@ Component to keep track of release checking
|
||||
+ *Author*: [Joomla! Project](mailto:admin@joomla.org)
|
||||
+ *Name*: [Track Release Checking](http://www.joomla.org)
|
||||
+ *First Build*: 29th July, 2020
|
||||
+ *Last Build*: 2nd November, 2020
|
||||
+ *Last Build*: 10th August, 2023
|
||||
+ *Version*: 1.0.x
|
||||
+ *Copyright*: (C) 2020 Open Source Matters, Inc.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
## Build Time
|
||||
## Some Fun Numbers
|
||||
|
||||
**57 Hours** or **7 Eight Hour Days** (actual time the author saved -
|
||||
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **20353**
|
||||
+ *File count*: **190**
|
||||
+ *Folder count*: **56**
|
||||
|
||||
**37 Hours** or **5 Eight Hour Days** (the actual time the author spent)
|
||||
|
||||
> (with the following break down:
|
||||
> **debugging @14hours** = codingtime / 4;
|
||||
> **planning @8hours** = codingtime / 7;
|
||||
> **mapping @6hours** = codingtime / 10;
|
||||
> **office @9hours** = codingtime / 6;)
|
||||
|
||||
**94 Hours** or **12 Eight Hour Days**
|
||||
(a total of the realistic time frame for this project)
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
|
||||
|
||||
Project duration: **2.4 weeks** or **0.5 months**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
||||
## Donations
|
||||
|
||||
If you want to support this project, please consider donating:
|
||||
* PayPal: [paypal.me/donationgeek](https://www.paypal.me/donationgeek)
|
||||
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
|
||||
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
|
||||
+ *Line count*: **23297**
|
||||
+ *File count*: **226**
|
||||
+ *Folder count*: **64**
|
@ -1,8 +1,6 @@
|
||||
# Track Release Checking (1.0.x)
|
||||
|
||||
![Track Release Checking image](https://raw.githubusercontent.com/joomla-projects/com_release_checking/master/admin/assets/images/vdm-component.jpg "The Track Release Checking")
|
||||
|
||||
Component to keep track of release checking
|
||||
A component to keep track of release checking.
|
||||
|
||||
# Build Details
|
||||
|
||||
@ -10,45 +8,13 @@ Component to keep track of release checking
|
||||
+ *Author*: [Joomla! Project](mailto:admin@joomla.org)
|
||||
+ *Name*: [Track Release Checking](http://www.joomla.org)
|
||||
+ *First Build*: 29th July, 2020
|
||||
+ *Last Build*: 2nd November, 2020
|
||||
+ *Last Build*: 10th August, 2023
|
||||
+ *Version*: 1.0.x
|
||||
+ *Copyright*: (C) 2020 Open Source Matters, Inc.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
## Build Time
|
||||
## Some Fun Numbers
|
||||
|
||||
**57 Hours** or **7 Eight Hour Days** (actual time the author saved -
|
||||
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **20353**
|
||||
+ *File count*: **190**
|
||||
+ *Folder count*: **56**
|
||||
|
||||
**37 Hours** or **5 Eight Hour Days** (the actual time the author spent)
|
||||
|
||||
> (with the following break down:
|
||||
> **debugging @14hours** = codingtime / 4;
|
||||
> **planning @8hours** = codingtime / 7;
|
||||
> **mapping @6hours** = codingtime / 10;
|
||||
> **office @9hours** = codingtime / 6;)
|
||||
|
||||
**94 Hours** or **12 Eight Hour Days**
|
||||
(a total of the realistic time frame for this project)
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
|
||||
|
||||
Project duration: **2.4 weeks** or **0.5 months**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
||||
## Donations
|
||||
|
||||
If you want to support this project, please consider donating:
|
||||
* PayPal: [paypal.me/donationgeek](https://www.paypal.me/donationgeek)
|
||||
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
|
||||
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
|
||||
+ *Line count*: **23297**
|
||||
+ *File count*: **226**
|
||||
+ *Folder count*: **64**
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* General Controller of Release_checking component
|
||||
*/
|
||||
class Release_checkingController extends JControllerLegacy
|
||||
class Release_checkingController extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\FormController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Action Controller
|
||||
* Action Form Controller
|
||||
*/
|
||||
class Release_checkingControllerAction extends JControllerForm
|
||||
class Release_checkingControllerAction extends FormController
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\AdminController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Actions Controller
|
||||
* Actions Admin Controller
|
||||
*/
|
||||
class Release_checkingControllerActions extends JControllerAdmin
|
||||
class Release_checkingControllerActions extends AdminController
|
||||
{
|
||||
/**
|
||||
* The prefix to use with controller messages.
|
||||
@ -53,7 +55,7 @@ class Release_checkingControllerActions extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Actions');
|
||||
// get the data to export
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,20 +11,23 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Ajax Controller
|
||||
* Release_checking Ajax Base Controller
|
||||
*/
|
||||
class Release_checkingControllerAjax extends JControllerLegacy
|
||||
class Release_checkingControllerAjax extends BaseController
|
||||
{
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
// make sure all json stuff are set
|
||||
JFactory::getDocument()->setMimeEncoding( 'application/json' );
|
||||
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
|
||||
JResponse::setHeader("Access-Control-Allow-Origin", "*");
|
||||
// get the application
|
||||
$app = JFactory::getApplication();
|
||||
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
|
||||
$app->setHeader('Access-Control-Allow-Origin', '*');
|
||||
// load the tasks
|
||||
$this->registerTask('getAction', 'ajax');
|
||||
$this->registerTask('getActionDescription', 'ajax');
|
||||
@ -31,20 +35,26 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
|
||||
public function ajax()
|
||||
{
|
||||
// get the user for later use
|
||||
$user = JFactory::getUser();
|
||||
// get the input values
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// check if we should return raw
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
// return to a callback function
|
||||
$callback = $jinput->get('callback', null, 'CMD');
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
|
||||
{
|
||||
// get the task
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'getAction':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$contextValue = $jinput->get('context', NULL, 'INT');
|
||||
$joomla_versionValue = $jinput->get('joomla_version', NULL, 'INT');
|
||||
$current_idValue = $jinput->get('current_id', NULL, 'INT');
|
||||
@ -56,7 +66,7 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
@ -71,10 +81,14 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
@ -84,7 +98,6 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
case 'getActionDescription':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$actionValue = $jinput->get('action', NULL, 'INT');
|
||||
if($actionValue && $user->id != 0)
|
||||
{
|
||||
@ -94,7 +107,7 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
@ -109,10 +122,14 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
@ -123,10 +140,15 @@ class Release_checkingControllerAjax extends JControllerLegacy
|
||||
}
|
||||
else
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
// return to a callback function
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode(false).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode(false).");";
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\FormController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Context Controller
|
||||
* Context Form Controller
|
||||
*/
|
||||
class Release_checkingControllerContext extends JControllerForm
|
||||
class Release_checkingControllerContext extends FormController
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\AdminController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Contexts Controller
|
||||
* Contexts Admin Controller
|
||||
*/
|
||||
class Release_checkingControllerContexts extends JControllerAdmin
|
||||
class Release_checkingControllerContexts extends AdminController
|
||||
{
|
||||
/**
|
||||
* The prefix to use with controller messages.
|
||||
@ -53,7 +55,7 @@ class Release_checkingControllerContexts extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Contexts');
|
||||
// get the data to export
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Import Controller
|
||||
* Release_checking Import Base Controller
|
||||
*/
|
||||
class Release_checkingControllerImport extends JControllerLegacy
|
||||
class Release_checkingControllerImport extends BaseController
|
||||
{
|
||||
/**
|
||||
* Import an spreadsheet.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\FormController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Joomla_version Controller
|
||||
* Joomla_version Form Controller
|
||||
*/
|
||||
class Release_checkingControllerJoomla_version extends JControllerForm
|
||||
class Release_checkingControllerJoomla_version extends FormController
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\AdminController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Joomla_versions Controller
|
||||
* Joomla_versions Admin Controller
|
||||
*/
|
||||
class Release_checkingControllerJoomla_versions extends JControllerAdmin
|
||||
class Release_checkingControllerJoomla_versions extends AdminController
|
||||
{
|
||||
/**
|
||||
* The prefix to use with controller messages.
|
||||
@ -53,7 +55,7 @@ class Release_checkingControllerJoomla_versions extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Joomla_versions');
|
||||
// get the data to export
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\FormController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_check Controller
|
||||
* Release_check Form Controller
|
||||
*/
|
||||
class Release_checkingControllerRelease_check extends JControllerForm
|
||||
class Release_checkingControllerRelease_check extends FormController
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Controller\AdminController;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checks Controller
|
||||
* Release_checks Admin Controller
|
||||
*/
|
||||
class Release_checkingControllerRelease_checks extends JControllerAdmin
|
||||
class Release_checkingControllerRelease_checks extends AdminController
|
||||
{
|
||||
/**
|
||||
* The prefix to use with controller messages.
|
||||
@ -53,7 +55,7 @@ class Release_checkingControllerRelease_checks extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Release_checks');
|
||||
// get the data to export
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,6 +11,50 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// register this component namespace
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla'
|
||||
];
|
||||
// Start the search and load if found
|
||||
$found = false;
|
||||
$found_base_dir = "";
|
||||
$found_len = 0;
|
||||
foreach ($search as $base_dir => $prefix)
|
||||
{
|
||||
// does the class use the namespace prefix?
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) === 0)
|
||||
{
|
||||
// we have a match so load the values
|
||||
$found = true;
|
||||
$found_base_dir = $base_dir;
|
||||
$found_len = $len;
|
||||
// done here
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if we found a match
|
||||
if (!$found)
|
||||
{
|
||||
// not found so move to the next registered autoloader
|
||||
return;
|
||||
}
|
||||
// get the relative class name
|
||||
$relative_class = substr($class, $found_len);
|
||||
// replace the namespace prefix with the base directory, replace namespace
|
||||
// separators with directory separators in the relative class name, append
|
||||
// with .php
|
||||
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||
// if the file exists, require it
|
||||
if (file_exists($file))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
});
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Language\Language;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
@ -152,7 +197,7 @@ abstract class Release_checkingHelper
|
||||
/**
|
||||
* Prepares the xml document
|
||||
*/
|
||||
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Joomla Component Builder', $description = null, $category = null,$keywords = null, $modified = null)
|
||||
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Open Source Matters', $description = null, $category = null,$keywords = null, $modified = null)
|
||||
{
|
||||
// set the user
|
||||
$user = JFactory::getUser();
|
||||
@ -186,7 +231,7 @@ abstract class Release_checkingHelper
|
||||
// Set document properties
|
||||
$spreadsheet->getProperties()
|
||||
->setCreator($creator)
|
||||
->setCompany('Joomla Component Builder')
|
||||
->setCompany('Open Source Matters')
|
||||
->setLastModifiedBy($modified)
|
||||
->setTitle($title)
|
||||
->setSubject($subjectTab);
|
||||
@ -803,12 +848,12 @@ abstract class Release_checkingHelper
|
||||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
if (File::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
elseif (File::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPathModel;
|
||||
@ -1573,3 +1618,4 @@ abstract class Release_checkingHelper
|
||||
return implode($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,17 +32,14 @@ COM_RELEASE_CHECKING_ACTIONS_N_ITEMS_UNFEATURED="%s Actions unfeatured."
|
||||
COM_RELEASE_CHECKING_ACTIONS_N_ITEMS_UNFEATURED_1="%s Action unfeatured."
|
||||
COM_RELEASE_CHECKING_ACTIONS_N_ITEMS_UNPUBLISHED="%s Actions unpublished."
|
||||
COM_RELEASE_CHECKING_ACTIONS_N_ITEMS_UNPUBLISHED_1="%s Action unpublished."
|
||||
COM_RELEASE_CHECKING_ACTION_ALIAS="Alias"
|
||||
COM_RELEASE_CHECKING_ACTION_ALIAS_HINT="Auto-generated from name"
|
||||
COM_RELEASE_CHECKING_ACTION_ALIAS_LABEL="Alias"
|
||||
COM_RELEASE_CHECKING_ACTION_CONTEXT="Context"
|
||||
COM_RELEASE_CHECKING_ACTION_CONTEXT_DESCRIPTION="Select the context."
|
||||
COM_RELEASE_CHECKING_ACTION_CONTEXT_LABEL="Context"
|
||||
COM_RELEASE_CHECKING_ACTION_CREATED_BY_DESC="The user that created this Action."
|
||||
COM_RELEASE_CHECKING_ACTION_CREATED_BY_LABEL="Created By"
|
||||
COM_RELEASE_CHECKING_ACTION_CREATED_DATE_DESC="The date this Action was created."
|
||||
COM_RELEASE_CHECKING_ACTION_CREATED_DATE_LABEL="Created Date"
|
||||
COM_RELEASE_CHECKING_ACTION_DESCRIPTION="Description"
|
||||
COM_RELEASE_CHECKING_ACTION_DESCRIPTION_DESCRIPTION="Add Description Here"
|
||||
COM_RELEASE_CHECKING_ACTION_DESCRIPTION_HINT="Add Description Here"
|
||||
COM_RELEASE_CHECKING_ACTION_DESCRIPTION_LABEL="Description"
|
||||
@ -54,7 +51,6 @@ COM_RELEASE_CHECKING_ACTION_MODIFIED_BY_DESC="The last user that modified this A
|
||||
COM_RELEASE_CHECKING_ACTION_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_RELEASE_CHECKING_ACTION_MODIFIED_DATE_DESC="The date this Action was modified."
|
||||
COM_RELEASE_CHECKING_ACTION_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_RELEASE_CHECKING_ACTION_NAME="Name"
|
||||
COM_RELEASE_CHECKING_ACTION_NAME_DESCRIPTION="Enter Name Here"
|
||||
COM_RELEASE_CHECKING_ACTION_NAME_HINT="Name Here"
|
||||
COM_RELEASE_CHECKING_ACTION_NAME_LABEL="Name"
|
||||
@ -69,6 +65,7 @@ COM_RELEASE_CHECKING_ACTION_VERSION_DESC="A count of the number of times this Ac
|
||||
COM_RELEASE_CHECKING_ACTION_VERSION_LABEL="Version"
|
||||
COM_RELEASE_CHECKING_ALL_DONE_HERE_SELECT_THE_NEXT_CONTEXT="All done here, select the next context"
|
||||
COM_RELEASE_CHECKING_ARCHIVED="Archived"
|
||||
COM_RELEASE_CHECKING_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
|
||||
COM_RELEASE_CHECKING_AUTHOR="Author"
|
||||
COM_RELEASE_CHECKING_BACK="Back"
|
||||
COM_RELEASE_CHECKING_CHECKED_BY="Checked By"
|
||||
@ -121,7 +118,6 @@ COM_RELEASE_CHECKING_CONTEXTS_N_ITEMS_UNFEATURED="%s Contexts unfeatured."
|
||||
COM_RELEASE_CHECKING_CONTEXTS_N_ITEMS_UNFEATURED_1="%s Context unfeatured."
|
||||
COM_RELEASE_CHECKING_CONTEXTS_N_ITEMS_UNPUBLISHED="%s Contexts unpublished."
|
||||
COM_RELEASE_CHECKING_CONTEXTS_N_ITEMS_UNPUBLISHED_1="%s Context unpublished."
|
||||
COM_RELEASE_CHECKING_CONTEXT_ALIAS="Alias"
|
||||
COM_RELEASE_CHECKING_CONTEXT_ALIAS_HINT="Auto-generated from name"
|
||||
COM_RELEASE_CHECKING_CONTEXT_ALIAS_LABEL="Alias"
|
||||
COM_RELEASE_CHECKING_CONTEXT_CREATED_BY_DESC="The user that created this Context."
|
||||
@ -136,7 +132,6 @@ COM_RELEASE_CHECKING_CONTEXT_MODIFIED_BY_DESC="The last user that modified this
|
||||
COM_RELEASE_CHECKING_CONTEXT_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_RELEASE_CHECKING_CONTEXT_MODIFIED_DATE_DESC="The date this Context was modified."
|
||||
COM_RELEASE_CHECKING_CONTEXT_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_RELEASE_CHECKING_CONTEXT_NAME="Name"
|
||||
COM_RELEASE_CHECKING_CONTEXT_NAME_DESCRIPTION="Enter Name Here"
|
||||
COM_RELEASE_CHECKING_CONTEXT_NAME_HINT="Name Here"
|
||||
COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL="Name"
|
||||
@ -163,9 +158,40 @@ COM_RELEASE_CHECKING_EDIT_CREATED_DATE_DESC="Allows users in this group to edit
|
||||
COM_RELEASE_CHECKING_EDIT_S="Edit %s"
|
||||
COM_RELEASE_CHECKING_EDIT_VERSIONS="Edit Version"
|
||||
COM_RELEASE_CHECKING_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
|
||||
COM_RELEASE_CHECKING_EMPTY_TRASH="Empty trash"
|
||||
COM_RELEASE_CHECKING_EXIT_TRASH="Exit trash"
|
||||
COM_RELEASE_CHECKING_EXPORT_DATA="Export Data"
|
||||
COM_RELEASE_CHECKING_EXPORT_DATA_DESC="Allows users in this group to export data."
|
||||
COM_RELEASE_CHECKING_EXPORT_FAILED="Export Failed"
|
||||
COM_RELEASE_CHECKING_FILTER_ACTION_ASCENDING="Action ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_ACTION_DESCENDING="Action descending"
|
||||
COM_RELEASE_CHECKING_FILTER_CONTEXT_ASCENDING="Context ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_CONTEXT_DESCENDING="Context descending"
|
||||
COM_RELEASE_CHECKING_FILTER_CREATED_BY_ASCENDING="Created By ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_CREATED_BY_DESCENDING="Created By descending"
|
||||
COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_ASCENDING="Joomla Version ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_DESCENDING="Joomla Version descending"
|
||||
COM_RELEASE_CHECKING_FILTER_NAME_ASCENDING="Name ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_NAME_DESCENDING="Name descending"
|
||||
COM_RELEASE_CHECKING_FILTER_OUTCOME_ASCENDING="Outcome ascending"
|
||||
COM_RELEASE_CHECKING_FILTER_OUTCOME_DESCENDING="Outcome descending"
|
||||
COM_RELEASE_CHECKING_FILTER_PUBLISHED="Status"
|
||||
COM_RELEASE_CHECKING_FILTER_PUBLISHED_ACTIONS="Status options for actions"
|
||||
COM_RELEASE_CHECKING_FILTER_PUBLISHED_CONTEXTS="Status options for contexts"
|
||||
COM_RELEASE_CHECKING_FILTER_PUBLISHED_JOOMLA_VERSIONS="Status options for joomla versions"
|
||||
COM_RELEASE_CHECKING_FILTER_PUBLISHED_RELEASE_CHECKS="Status options for release checks"
|
||||
COM_RELEASE_CHECKING_FILTER_SEARCH="Searchrelease checks"
|
||||
COM_RELEASE_CHECKING_FILTER_SEARCH_ACTIONS="Search the action items. Prefix with ID: to search for an item by ID."
|
||||
COM_RELEASE_CHECKING_FILTER_SEARCH_CONTEXTS="Search the context items. Prefix with ID: to search for an item by ID."
|
||||
COM_RELEASE_CHECKING_FILTER_SEARCH_JOOMLA_VERSIONS="Search the joomla version items. Prefix with ID: to search for an item by ID."
|
||||
COM_RELEASE_CHECKING_FILTER_SEARCH_RELEASE_CHECKS="Search the release check items. Prefix with ID: to search for an item by ID."
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS="Select Access"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_ACTION="Select Action"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_CONTEXT="Select Context"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_CREATED_BY="Select Created By"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_JOOMLA_VERSION="Select Joomla Version"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_NAME="Select Name"
|
||||
COM_RELEASE_CHECKING_FILTER_SELECT_OUTCOME="Select Outcome"
|
||||
COM_RELEASE_CHECKING_HELP_MANAGER="Help"
|
||||
COM_RELEASE_CHECKING_IMPORT_CONTINUE="Continue"
|
||||
COM_RELEASE_CHECKING_IMPORT_DATA="Import Data"
|
||||
@ -242,7 +268,6 @@ COM_RELEASE_CHECKING_JOOMLA_VERSIONS_N_ITEMS_UNPUBLISHED="%s Joomla Versions unp
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSIONS_N_ITEMS_UNPUBLISHED_1="%s Joomla Version unpublished."
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSIONS_SUBMENU="Joomla Versions Submenu"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSIONS_SUBMENU_DESC="Allows the users in this group to submenu of joomla version"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_ALIAS="Alias"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_ALIAS_HINT="Auto-generated from name"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_ALIAS_LABEL="Alias"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_CREATED_BY_DESC="The user that created this Joomla Version."
|
||||
@ -257,7 +282,6 @@ COM_RELEASE_CHECKING_JOOMLA_VERSION_MODIFIED_BY_DESC="The last user that modifie
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_MODIFIED_DATE_DESC="The date this Joomla Version was modified."
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_NAME="Name"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_NAME_DESCRIPTION="Enter Name Here"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_NAME_HINT="Name Here"
|
||||
COM_RELEASE_CHECKING_JOOMLA_VERSION_NAME_LABEL="Name"
|
||||
@ -332,14 +356,11 @@ COM_RELEASE_CHECKING_RELEASE_CHECKS_N_ITEMS_UNPUBLISHED="%s Release Checks unpub
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECKS_N_ITEMS_UNPUBLISHED_1="%s Release Check unpublished."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECKS_SUBMENU="Release Checks Submenu"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECKS_SUBMENU_DESC="Allows the users in this group to submenu of release check"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ACTION="Action"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ACTION_DESCRIPTION="Please select the action this release_check belongs to."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ACTION_LABEL="Action"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CHECKING="Checking"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CONTEXT="Context"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CONTEXT_DESCRIPTION="Select the context."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CONTEXT_LABEL="Context"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CREATED_BY="Created By"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CREATED_BY_DESC="The user that created this Release Check."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CREATED_BY_DESCRIPTION="The user that created this."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_CREATED_BY_LABEL="Created By"
|
||||
@ -349,7 +370,6 @@ COM_RELEASE_CHECKING_RELEASE_CHECK_EDIT="Editing the Release Check"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ERROR_UNIQUE_ALIAS="Another Release Check has the same alias."
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_FAILURE="Failure"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ID="Id"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_JOOMLA_VERSION="Joomla Version"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_JOOMLA_VERSION_DESCRIPTION="Select the Joomla version being tested"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_JOOMLA_VERSION_LABEL="Joomla Version"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_MODIFIED_BY_DESC="The last user that modified this Release Check."
|
||||
@ -358,7 +378,6 @@ COM_RELEASE_CHECKING_RELEASE_CHECK_MODIFIED_DATE_DESC="The date this Release Che
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_NEW="A New Release Check"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_ORDERING_LABEL="Ordering"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_OUTCOME="Outcome"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_OUTCOME_DESCRIPTION="Select the test outcome"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_OUTCOME_LABEL="Outcome"
|
||||
COM_RELEASE_CHECKING_RELEASE_CHECK_PERMISSION="Permissions"
|
||||
@ -375,6 +394,8 @@ COM_RELEASE_CHECKING_SELECT="Select"
|
||||
COM_RELEASE_CHECKING_SUBMENU_JOOMLA_VERSIONS="Joomla Versions"
|
||||
COM_RELEASE_CHECKING_SUBMENU_RELEASE_CHECKS="Release Checks"
|
||||
COM_RELEASE_CHECKING_TRASHED="Trashed"
|
||||
COM_RELEASE_CHECKING_TRASHED_ITEMS="Trashed items"
|
||||
COM_RELEASE_CHECKING_TRASH_AREA="Trash Area"
|
||||
COM_RELEASE_CHECKING_TYPE_ACTION="Action"
|
||||
COM_RELEASE_CHECKING_TYPE_CONTEXT="Context"
|
||||
COM_RELEASE_CHECKING_TYPE_JOOMLA_VERSION="Joomla Version"
|
||||
@ -383,4 +404,6 @@ COM_RELEASE_CHECKING_USE_BATCH="Use Batch"
|
||||
COM_RELEASE_CHECKING_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
|
||||
COM_RELEASE_CHECKING_VERSION="Version"
|
||||
COM_RELEASE_CHECKING_WEBSITE="Website"
|
||||
COM_RELEASE_CHECKING_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
|
||||
COM_RELEASE_CHECKING_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"
|
||||
COM_RELEASE_CHECKING_YOU_MUST_FIRST_SELECT_THE_JOOMLA_VERSION_BEING_TESTED="You must first select the Joomla version being tested!"
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -24,6 +25,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
'modified',
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -24,6 +25,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
'modified',
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
41
admin/layouts/joomla_version/details_left.php
Normal file
41
admin/layouts/joomla_version/details_left.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
||||
// get the layout fields override method name (from layout path/ID)
|
||||
$layout_path_array = explode('.', $this->getLayoutId());
|
||||
// Since we cannot pass the layout and tab names as parameters to the model method
|
||||
// this name combination of tab and layout in the method name is the only work around
|
||||
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
|
||||
// example of layout name: details_left.php
|
||||
// example of method name: getFields_details_left()
|
||||
$fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'name'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -24,7 +25,6 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'name',
|
||||
'alias'
|
||||
);
|
||||
|
||||
@ -32,12 +32,10 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<div class="form-inline form-inline-header">
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -24,6 +25,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
'modified',
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -24,6 +25,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
'modified',
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
72
admin/layouts/trashhelper.php
Normal file
72
admin/layouts/trashhelper.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die('Restricted access');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<?php if ($displayData->state->get('filter.published') == -2 && ($displayData->canState && $displayData->canDelete)) : ?>
|
||||
<script>
|
||||
// change the class of the delete button
|
||||
jQuery("#toolbar-delete button").toggleClass("btn-danger");
|
||||
// function to empty the trash
|
||||
function emptyTrash() {
|
||||
if (document.adminForm.boxchecked.value == 0) {
|
||||
// select all the items visable
|
||||
document.adminForm.elements['checkall-toggle'].checked=1;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
// check to confirm the deletion
|
||||
if(confirm('<?= JText::_("COM_RELEASE_CHECKING_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
} else {
|
||||
document.adminForm.elements['checkall-toggle'].checked=0;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
}
|
||||
} else {
|
||||
// confirm deletion of those selected
|
||||
if (confirm('<?= JText::_("COM_RELEASE_CHECKING_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
};
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// function to exit the tash state
|
||||
function exitTrash() {
|
||||
document.adminForm.filter_published.selectedIndex = 0;
|
||||
document.adminForm.submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<div class="alert alert-error">
|
||||
<?php if (empty($displayData->items)): ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= JText::_("COM_RELEASE_CHECKING_TRASH_AREA") ?>
|
||||
</h4>
|
||||
<p><?= JText::_("COM_RELEASE_CHECKING_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
|
||||
<?php else: ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= JText::_("COM_RELEASE_CHECKING_TRASHED_ITEMS") ?>
|
||||
</h4>
|
||||
<p><?= JText::_("COM_RELEASE_CHECKING_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
|
||||
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
|
||||
<span class="icon-delete" aria-hidden="true"></span>
|
||||
<?= JText::_("COM_RELEASE_CHECKING_EMPTY_TRASH") ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button onclick="exitTrash();" class="btn btn-small">
|
||||
<span class="icon-back" aria-hidden="true"></span>
|
||||
<?= JText::_("COM_RELEASE_CHECKING_EXIT_TRASH") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,14 +11,15 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\AdminModel;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Action Model
|
||||
* Release_checking Action Admin Model
|
||||
*/
|
||||
class Release_checkingModelAction extends JModelAdmin
|
||||
class Release_checkingModelAction extends AdminModel
|
||||
{
|
||||
/**
|
||||
* The tab layout fields array.
|
||||
@ -100,12 +102,6 @@ class Release_checkingModelAction extends JModelAdmin
|
||||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_release_checking.action');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
@ -227,7 +223,7 @@ class Release_checkingModelAction extends JModelAdmin
|
||||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_release_checking/models/forms/action.js';
|
||||
return 'media/com_release_checking/js/action.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Actions Model
|
||||
* Actions List Model
|
||||
*/
|
||||
class Release_checkingModelActions extends JModelList
|
||||
class Release_checkingModelActions extends ListModel
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
@ -24,11 +26,12 @@ class Release_checkingModelActions extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'g.name'
|
||||
'g.name','context'
|
||||
);
|
||||
}
|
||||
|
||||
@ -38,7 +41,13 @@ class Release_checkingModelActions extends JModelList
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -49,20 +58,16 @@ class Release_checkingModelActions extends JModelList
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
|
||||
$context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context');
|
||||
$this->setState('filter.context', $context);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
@ -73,6 +78,26 @@ class Release_checkingModelActions extends JModelList
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
$context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$context = $app->input->post->get('context');
|
||||
$this->setState('filter.context', $context);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -84,7 +109,7 @@ class Release_checkingModelActions extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
// Check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
@ -132,9 +157,17 @@ class Release_checkingModelActions extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_release_checking'))
|
||||
@ -158,9 +191,21 @@ class Release_checkingModelActions extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Name.
|
||||
if ($name = $this->getState('filter.name'))
|
||||
$_name = $this->getState('filter.name');
|
||||
if (is_numeric($_name))
|
||||
{
|
||||
$query->where('a.name = ' . $db->quote($db->escape($name)));
|
||||
if (is_float($_name))
|
||||
{
|
||||
$query->where('a.name = ' . (float) $_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.name = ' . (int) $_name);
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($_name))
|
||||
{
|
||||
$query->where('a.name = ' . $db->quote($db->escape($_name)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -310,6 +355,18 @@ class Release_checkingModelActions extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| Release_checkingHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
@ -335,17 +392,19 @@ class Release_checkingModelActions extends JModelList
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__release_checking_action'));
|
||||
$db->setQuery($query);
|
||||
// Only select items that are checked out.
|
||||
$query->where($db->quoteName('checked_out') . '!=0');
|
||||
$db->setQuery($query, 0, 1);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
// Get Yesterdays date.
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
@ -360,7 +419,7 @@ class Release_checkingModelActions extends JModelList
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
// Check table.
|
||||
$query->update($db->quoteName('#__release_checking_action'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,14 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Ajax Model
|
||||
* Release_checking Ajax List Model
|
||||
*/
|
||||
class Release_checkingModelAjax extends JModelList
|
||||
class Release_checkingModelAjax extends ListModel
|
||||
{
|
||||
protected $app_params;
|
||||
|
||||
@ -59,7 +62,7 @@ class Release_checkingModelAjax extends JModelList
|
||||
$query->select($db->quoteName( array('a.id') ));
|
||||
$query->from($db->quoteName('#__release_checking_action', 'a'));
|
||||
// we also filter out the actions this user already did on this context
|
||||
if (Release_checkingHelper::checkArray($result['removed_ids']))
|
||||
if (UtilitiesArrayHelper::check($result['removed_ids']))
|
||||
{
|
||||
$query->where($db->quoteName('a.id') . ' NOT IN (' . implode(', ', $result['removed_ids']) . ')');
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,14 +11,15 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\AdminModel;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Context Model
|
||||
* Release_checking Context Admin Model
|
||||
*/
|
||||
class Release_checkingModelContext extends JModelAdmin
|
||||
class Release_checkingModelContext extends AdminModel
|
||||
{
|
||||
/**
|
||||
* The tab layout fields array.
|
||||
@ -96,12 +98,6 @@ class Release_checkingModelContext extends JModelAdmin
|
||||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_release_checking.context');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
@ -223,7 +219,7 @@ class Release_checkingModelContext extends JModelAdmin
|
||||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_release_checking/models/forms/context.js';
|
||||
return 'media/com_release_checking/js/context.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Contexts Model
|
||||
* Contexts List Model
|
||||
*/
|
||||
class Release_checkingModelContexts extends JModelList
|
||||
class Release_checkingModelContexts extends ListModel
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
@ -24,6 +26,7 @@ class Release_checkingModelContexts extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
@ -37,7 +40,13 @@ class Release_checkingModelContexts extends JModelList
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,17 +57,16 @@ class Release_checkingModelContexts extends JModelList
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
@ -69,6 +77,19 @@ class Release_checkingModelContexts extends JModelList
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -80,7 +101,7 @@ class Release_checkingModelContexts extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
// Check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
@ -124,9 +145,17 @@ class Release_checkingModelContexts extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_release_checking'))
|
||||
@ -150,9 +179,21 @@ class Release_checkingModelContexts extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Name.
|
||||
if ($name = $this->getState('filter.name'))
|
||||
$_name = $this->getState('filter.name');
|
||||
if (is_numeric($_name))
|
||||
{
|
||||
$query->where('a.name = ' . $db->quote($db->escape($name)));
|
||||
if (is_float($_name))
|
||||
{
|
||||
$query->where('a.name = ' . (float) $_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.name = ' . (int) $_name);
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($_name))
|
||||
{
|
||||
$query->where('a.name = ' . $db->quote($db->escape($_name)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -294,6 +335,18 @@ class Release_checkingModelContexts extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| Release_checkingHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
@ -318,17 +371,19 @@ class Release_checkingModelContexts extends JModelList
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__release_checking_context'));
|
||||
$db->setQuery($query);
|
||||
// Only select items that are checked out.
|
||||
$query->where($db->quoteName('checked_out') . '!=0');
|
||||
$db->setQuery($query, 0, 1);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
// Get Yesterdays date.
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
@ -343,7 +398,7 @@ class Release_checkingModelContexts extends JModelList
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
// Check table.
|
||||
$query->update($db->quoteName('#__release_checking_context'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -162,7 +163,9 @@ class JFormFieldActions extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an action');
|
||||
if ($this->multiple === false) {
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
}
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->action_name);
|
||||
|
66
admin/models/fields/actionsfiltername.php
Normal file
66
admin/models/fields/actionsfiltername.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Actionsfiltername Form Field class for the Release_checking component
|
||||
*/
|
||||
class JFormFieldActionsfiltername extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The actionsfiltername field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'actionsfiltername';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('name'));
|
||||
$query->from($db->quoteName('#__release_checking_action'));
|
||||
$query->order($db->quoteName('name') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_NAME') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $name)
|
||||
{
|
||||
// Now add the name and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $name, $name);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -161,7 +162,9 @@ class JFormFieldContexts extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
if ($this->multiple === false) {
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
}
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->context_name);
|
||||
|
66
admin/models/fields/contextsfiltername.php
Normal file
66
admin/models/fields/contextsfiltername.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Contextsfiltername Form Field class for the Release_checking component
|
||||
*/
|
||||
class JFormFieldContextsfiltername extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The contextsfiltername field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'contextsfiltername';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('name'));
|
||||
$query->from($db->quoteName('#__release_checking_context'));
|
||||
$query->order($db->quoteName('name') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_NAME') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $name)
|
||||
{
|
||||
// Now add the name and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $name, $name);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -161,7 +162,9 @@ class JFormFieldJoomlaversions extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
if ($this->multiple === false) {
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
}
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->joomla_version_name);
|
||||
|
65
admin/models/fields/releasechecksfiltercreatedby.php
Normal file
65
admin/models/fields/releasechecksfiltercreatedby.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Releasechecksfiltercreatedby Form Field class for the Release_checking component
|
||||
*/
|
||||
class JFormFieldReleasechecksfiltercreatedby extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The releasechecksfiltercreatedby field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'releasechecksfiltercreatedby';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('created_by'));
|
||||
$query->from($db->quoteName('#__release_checking_release_check'));
|
||||
$query->order($db->quoteName('created_by') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $created_by)
|
||||
{
|
||||
// Now add the created_by and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $created_by, JFactory::getUser($created_by)->name);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
69
admin/models/fields/releasechecksfilteroutcome.php
Normal file
69
admin/models/fields/releasechecksfilteroutcome.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Releasechecksfilteroutcome Form Field class for the Release_checking component
|
||||
*/
|
||||
class JFormFieldReleasechecksfilteroutcome extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The releasechecksfilteroutcome field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'releasechecksfilteroutcome';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('outcome'));
|
||||
$query->from($db->quoteName('#__release_checking_release_check'));
|
||||
$query->order($db->quoteName('outcome') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get release_checksmodel
|
||||
$_model = Release_checkingHelper::getModel('release_checks');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $outcome)
|
||||
{
|
||||
// Translate the outcome selection
|
||||
$_text = $_model->selectionTranslation($outcome,'outcome');
|
||||
// Now add the outcome and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $outcome, JText::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -84,6 +84,14 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Was added due to Permissions JS needing a Title field -->
|
||||
<!-- Let us know at gh-629 should this change -->
|
||||
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
|
||||
<field
|
||||
name="title"
|
||||
type="hidden"
|
||||
default="release_checking action"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
|
@ -84,6 +84,14 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Was added due to Permissions JS needing a Title field -->
|
||||
<!-- Let us know at gh-629 should this change -->
|
||||
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
|
||||
<field
|
||||
name="title"
|
||||
type="hidden"
|
||||
default="release_checking context"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
|
76
admin/models/forms/filter_actions.xml
Normal file
76
admin/models/forms/filter_actions.xml
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_release_checking/models/rules"
|
||||
addfieldpath="/administrator/components/com_release_checking/models/fields"
|
||||
>
|
||||
<fields name="filter">
|
||||
<field
|
||||
type="text"
|
||||
name="search"
|
||||
inputmode="search"
|
||||
label="COM_RELEASE_CHECKING_FILTER_SEARCH"
|
||||
description="COM_RELEASE_CHECKING_FILTER_SEARCH_ACTIONS"
|
||||
hint="JSEARCH_FILTER"
|
||||
/>
|
||||
<field
|
||||
type="status"
|
||||
name="published"
|
||||
label="COM_RELEASE_CHECKING_FILTER_PUBLISHED"
|
||||
description="COM_RELEASE_CHECKING_FILTER_PUBLISHED_ACTIONS"
|
||||
onchange="this.form.submit();"
|
||||
>
|
||||
<option value="">JOPTION_SELECT_PUBLISHED</option>
|
||||
</field>
|
||||
<field
|
||||
type="accesslevel"
|
||||
name="access"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
multiple="true"
|
||||
class="multipleAccessLevels"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="actionsfiltername"
|
||||
name="name"
|
||||
label="COM_RELEASE_CHECKING_ACTION_NAME_LABEL"
|
||||
multiple="false"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
<fields name="list">
|
||||
<field
|
||||
name="fullordering"
|
||||
type="list"
|
||||
label="COM_CONTENT_LIST_FULL_ORDERING"
|
||||
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
|
||||
onchange="this.form.submit();"
|
||||
default="a.id desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
|
||||
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
|
||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="a.name ASC">COM_RELEASE_CHECKING_FILTER_NAME_ASCENDING</option>
|
||||
<option value="a.name DESC">COM_RELEASE_CHECKING_FILTER_NAME_DESCENDING</option>
|
||||
<option value="g.name ASC">COM_RELEASE_CHECKING_FILTER_CONTEXT_ASCENDING</option>
|
||||
<option value="g.name DESC">COM_RELEASE_CHECKING_FILTER_CONTEXT_DESCENDING</option>
|
||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="limit"
|
||||
type="limitbox"
|
||||
label="COM_CONTENT_LIST_LIMIT"
|
||||
description="COM_CONTENT_LIST_LIMIT_DESC"
|
||||
class="input-mini"
|
||||
default="25"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
</fields>
|
||||
</form>
|
74
admin/models/forms/filter_contexts.xml
Normal file
74
admin/models/forms/filter_contexts.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_release_checking/models/rules"
|
||||
addfieldpath="/administrator/components/com_release_checking/models/fields"
|
||||
>
|
||||
<fields name="filter">
|
||||
<field
|
||||
type="text"
|
||||
name="search"
|
||||
inputmode="search"
|
||||
label="COM_RELEASE_CHECKING_FILTER_SEARCH"
|
||||
description="COM_RELEASE_CHECKING_FILTER_SEARCH_CONTEXTS"
|
||||
hint="JSEARCH_FILTER"
|
||||
/>
|
||||
<field
|
||||
type="status"
|
||||
name="published"
|
||||
label="COM_RELEASE_CHECKING_FILTER_PUBLISHED"
|
||||
description="COM_RELEASE_CHECKING_FILTER_PUBLISHED_CONTEXTS"
|
||||
onchange="this.form.submit();"
|
||||
>
|
||||
<option value="">JOPTION_SELECT_PUBLISHED</option>
|
||||
</field>
|
||||
<field
|
||||
type="accesslevel"
|
||||
name="access"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
multiple="true"
|
||||
class="multipleAccessLevels"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="contextsfiltername"
|
||||
name="name"
|
||||
label="COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL"
|
||||
multiple="false"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
<fields name="list">
|
||||
<field
|
||||
name="fullordering"
|
||||
type="list"
|
||||
label="COM_CONTENT_LIST_FULL_ORDERING"
|
||||
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
|
||||
onchange="this.form.submit();"
|
||||
default="a.id desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
|
||||
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
|
||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="a.name ASC">COM_RELEASE_CHECKING_FILTER_NAME_ASCENDING</option>
|
||||
<option value="a.name DESC">COM_RELEASE_CHECKING_FILTER_NAME_DESCENDING</option>
|
||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="limit"
|
||||
type="limitbox"
|
||||
label="COM_CONTENT_LIST_LIMIT"
|
||||
description="COM_CONTENT_LIST_LIMIT_DESC"
|
||||
class="input-mini"
|
||||
default="25"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
</fields>
|
||||
</form>
|
67
admin/models/forms/filter_joomla_versions.xml
Normal file
67
admin/models/forms/filter_joomla_versions.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_release_checking/models/rules"
|
||||
addfieldpath="/administrator/components/com_release_checking/models/fields"
|
||||
>
|
||||
<fields name="filter">
|
||||
<field
|
||||
type="text"
|
||||
name="search"
|
||||
inputmode="search"
|
||||
label="COM_RELEASE_CHECKING_FILTER_SEARCH"
|
||||
description="COM_RELEASE_CHECKING_FILTER_SEARCH_JOOMLA_VERSIONS"
|
||||
hint="JSEARCH_FILTER"
|
||||
/>
|
||||
<field
|
||||
type="status"
|
||||
name="published"
|
||||
label="COM_RELEASE_CHECKING_FILTER_PUBLISHED"
|
||||
description="COM_RELEASE_CHECKING_FILTER_PUBLISHED_JOOMLA_VERSIONS"
|
||||
onchange="this.form.submit();"
|
||||
>
|
||||
<option value="">JOPTION_SELECT_PUBLISHED</option>
|
||||
</field>
|
||||
<field
|
||||
type="accesslevel"
|
||||
name="access"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
multiple="true"
|
||||
class="multipleAccessLevels"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
<fields name="list">
|
||||
<field
|
||||
name="fullordering"
|
||||
type="list"
|
||||
label="COM_CONTENT_LIST_FULL_ORDERING"
|
||||
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
|
||||
onchange="this.form.submit();"
|
||||
default="a.id desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
|
||||
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
|
||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="a.name ASC">COM_RELEASE_CHECKING_FILTER_NAME_ASCENDING</option>
|
||||
<option value="a.name DESC">COM_RELEASE_CHECKING_FILTER_NAME_DESCENDING</option>
|
||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="limit"
|
||||
type="limitbox"
|
||||
label="COM_CONTENT_LIST_LIMIT"
|
||||
description="COM_CONTENT_LIST_LIMIT_DESC"
|
||||
class="input-mini"
|
||||
default="25"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
</fields>
|
||||
</form>
|
115
admin/models/forms/filter_release_checks.xml
Normal file
115
admin/models/forms/filter_release_checks.xml
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_release_checking/models/rules"
|
||||
addfieldpath="/administrator/components/com_release_checking/models/fields"
|
||||
>
|
||||
<fields name="filter">
|
||||
<field
|
||||
type="text"
|
||||
name="search"
|
||||
inputmode="search"
|
||||
label="COM_RELEASE_CHECKING_FILTER_SEARCH"
|
||||
description="COM_RELEASE_CHECKING_FILTER_SEARCH_RELEASE_CHECKS"
|
||||
hint="JSEARCH_FILTER"
|
||||
/>
|
||||
<field
|
||||
type="status"
|
||||
name="published"
|
||||
label="COM_RELEASE_CHECKING_FILTER_PUBLISHED"
|
||||
description="COM_RELEASE_CHECKING_FILTER_PUBLISHED_RELEASE_CHECKS"
|
||||
onchange="this.form.submit();"
|
||||
>
|
||||
<option value="">JOPTION_SELECT_PUBLISHED</option>
|
||||
</field>
|
||||
<field
|
||||
type="accesslevel"
|
||||
name="access"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
multiple="true"
|
||||
class="multipleAccessLevels"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="contexts"
|
||||
name="context"
|
||||
label="COM_RELEASE_CHECKING_RELEASE_CHECK_CONTEXT_LABEL"
|
||||
class="multipleContexts"
|
||||
multiple="true"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="actions"
|
||||
name="action"
|
||||
label="COM_RELEASE_CHECKING_RELEASE_CHECK_ACTION_LABEL"
|
||||
class="multipleActions"
|
||||
multiple="true"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="releasechecksfilteroutcome"
|
||||
name="outcome"
|
||||
label="COM_RELEASE_CHECKING_RELEASE_CHECK_OUTCOME_LABEL"
|
||||
class="multipleReleasechecksfilteroutcome"
|
||||
multiple="true"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="joomlaversions"
|
||||
name="joomla_version"
|
||||
label="COM_RELEASE_CHECKING_RELEASE_CHECK_JOOMLA_VERSION_LABEL"
|
||||
class="multipleJoomlaversions"
|
||||
multiple="true"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="releasechecksfiltercreatedby"
|
||||
name="created_by"
|
||||
label="COM_RELEASE_CHECKING_RELEASE_CHECK_CREATED_BY_LABEL"
|
||||
class="multipleReleasechecksfiltercreatedby"
|
||||
multiple="true"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
<fields name="list">
|
||||
<field
|
||||
name="fullordering"
|
||||
type="list"
|
||||
label="COM_CONTENT_LIST_FULL_ORDERING"
|
||||
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
|
||||
onchange="this.form.submit();"
|
||||
default="a.id desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
|
||||
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
|
||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="g.name ASC">COM_RELEASE_CHECKING_FILTER_CONTEXT_ASCENDING</option>
|
||||
<option value="g.name DESC">COM_RELEASE_CHECKING_FILTER_CONTEXT_DESCENDING</option>
|
||||
<option value="h.name ASC">COM_RELEASE_CHECKING_FILTER_ACTION_ASCENDING</option>
|
||||
<option value="h.name DESC">COM_RELEASE_CHECKING_FILTER_ACTION_DESCENDING</option>
|
||||
<option value="a.outcome ASC">COM_RELEASE_CHECKING_FILTER_OUTCOME_ASCENDING</option>
|
||||
<option value="a.outcome DESC">COM_RELEASE_CHECKING_FILTER_OUTCOME_DESCENDING</option>
|
||||
<option value="i.name ASC">COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_ASCENDING</option>
|
||||
<option value="i.name DESC">COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_DESCENDING</option>
|
||||
<option value="a.created_by ASC">COM_RELEASE_CHECKING_FILTER_CREATED_BY_ASCENDING</option>
|
||||
<option value="a.created_by DESC">COM_RELEASE_CHECKING_FILTER_CREATED_BY_DESCENDING</option>
|
||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="limit"
|
||||
type="limitbox"
|
||||
label="COM_CONTENT_LIST_LIMIT"
|
||||
description="COM_CONTENT_LIST_LIMIT_DESC"
|
||||
class="input-mini"
|
||||
default="25"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
</fields>
|
||||
</form>
|
@ -84,6 +84,14 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Was added due to Permissions JS needing a Title field -->
|
||||
<!-- Let us know at gh-629 should this change -->
|
||||
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
|
||||
<field
|
||||
name="title"
|
||||
type="hidden"
|
||||
default="release_checking joomla_version"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
|
@ -77,6 +77,14 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Was added due to Permissions JS needing a Title field -->
|
||||
<!-- Let us know at gh-629 should this change -->
|
||||
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
|
||||
<field
|
||||
name="title"
|
||||
type="hidden"
|
||||
default="release_checking release_check"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Context Field. Type: Contexts. (custom) -->
|
||||
<field
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,13 +11,16 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
/**
|
||||
* Release_checking Import Model
|
||||
/***
|
||||
* Release_checking Import Base Database Model
|
||||
*/
|
||||
class Release_checkingModelImport extends JModelLegacy
|
||||
class Release_checkingModelImport extends BaseDatabaseModel
|
||||
{
|
||||
// set uploading values
|
||||
protected $use_streams = false;
|
||||
@ -220,7 +224,7 @@ class Release_checkingModelImport extends JModelLegacy
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
|
||||
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
|
||||
|
||||
// Was the package downloaded?
|
||||
if (!$p_file)
|
||||
@ -398,12 +402,12 @@ class Release_checkingModelImport extends JModelLegacy
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
{
|
||||
JFile::delete($package);
|
||||
File::delete($package);
|
||||
}
|
||||
elseif (is_file(JPath::clean($package)))
|
||||
{
|
||||
// It might also be just a base filename
|
||||
JFile::delete(JPath::clean($package));
|
||||
File::delete(JPath::clean($package));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,14 +11,15 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\AdminModel;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Joomla_version Model
|
||||
* Release_checking Joomla_version Admin Model
|
||||
*/
|
||||
class Release_checkingModelJoomla_version extends JModelAdmin
|
||||
class Release_checkingModelJoomla_version extends AdminModel
|
||||
{
|
||||
/**
|
||||
* The tab layout fields array.
|
||||
@ -26,8 +28,10 @@ class Release_checkingModelJoomla_version extends JModelAdmin
|
||||
*/
|
||||
protected $tabLayoutFields = array(
|
||||
'details' => array(
|
||||
'above' => array(
|
||||
'name',
|
||||
'left' => array(
|
||||
'name'
|
||||
),
|
||||
'right' => array(
|
||||
'alias'
|
||||
)
|
||||
)
|
||||
@ -94,12 +98,6 @@ class Release_checkingModelJoomla_version extends JModelAdmin
|
||||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_release_checking.joomla_version');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
@ -221,7 +219,7 @@ class Release_checkingModelJoomla_version extends JModelAdmin
|
||||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_release_checking/models/forms/joomla_version.js';
|
||||
return 'media/com_release_checking/js/joomla_version.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Joomla_versions Model
|
||||
* Joomla_versions List Model
|
||||
*/
|
||||
class Release_checkingModelJoomla_versions extends JModelList
|
||||
class Release_checkingModelJoomla_versions extends ListModel
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
@ -24,6 +26,7 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
@ -37,7 +40,13 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,17 +57,16 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
@ -69,6 +77,19 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -80,7 +101,7 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
// Check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
@ -124,9 +145,17 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_release_checking'))
|
||||
@ -289,6 +318,18 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| Release_checkingHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
@ -313,17 +354,19 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__release_checking_joomla_version'));
|
||||
$db->setQuery($query);
|
||||
// Only select items that are checked out.
|
||||
$query->where($db->quoteName('checked_out') . '!=0');
|
||||
$db->setQuery($query, 0, 1);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
// Get Yesterdays date.
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
@ -338,7 +381,7 @@ class Release_checkingModelJoomla_versions extends JModelList
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
// Check table.
|
||||
$query->update($db->quoteName('#__release_checking_joomla_version'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,14 +11,15 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\AdminModel;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checking Release_check Model
|
||||
* Release_checking Release_check Admin Model
|
||||
*/
|
||||
class Release_checkingModelRelease_check extends JModelAdmin
|
||||
class Release_checkingModelRelease_check extends AdminModel
|
||||
{
|
||||
/**
|
||||
* The tab layout fields array.
|
||||
@ -121,12 +123,6 @@ class Release_checkingModelRelease_check extends JModelAdmin
|
||||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_release_checking.release_check');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
@ -264,7 +260,7 @@ class Release_checkingModelRelease_check extends JModelAdmin
|
||||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_release_checking/models/forms/release_check.js';
|
||||
return 'media/com_release_checking/js/release_check.js';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,12 +11,13 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Release_checks Model
|
||||
* Release_checks List Model
|
||||
*/
|
||||
class Release_checkingModelRelease_checks extends JModelList
|
||||
class Release_checkingModelRelease_checks extends ListModel
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
@ -24,13 +26,14 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'g.name',
|
||||
'h.name',
|
||||
'g.name','context',
|
||||
'h.name','action',
|
||||
'a.outcome','outcome',
|
||||
'i.name'
|
||||
'i.name','joomla_version'
|
||||
);
|
||||
}
|
||||
|
||||
@ -40,7 +43,13 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -51,39 +60,64 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context');
|
||||
$this->setState('filter.context', $context);
|
||||
|
||||
$action = $this->getUserStateFromRequest($this->context . '.filter.action', 'filter_action');
|
||||
$this->setState('filter.action', $action);
|
||||
|
||||
$outcome = $this->getUserStateFromRequest($this->context . '.filter.outcome', 'filter_outcome');
|
||||
$this->setState('filter.outcome', $outcome);
|
||||
|
||||
$joomla_version = $this->getUserStateFromRequest($this->context . '.filter.joomla_version', 'filter_joomla_version');
|
||||
$this->setState('filter.joomla_version', $joomla_version);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$context = $app->input->post->get('context');
|
||||
$this->setState('filter.context', $context);
|
||||
}
|
||||
|
||||
$action = $this->getUserStateFromRequest($this->context . '.filter.action', 'filter_action');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$action = $app->input->post->get('action');
|
||||
$this->setState('filter.action', $action);
|
||||
}
|
||||
|
||||
$outcome = $this->getUserStateFromRequest($this->context . '.filter.outcome', 'filter_outcome');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$outcome = $app->input->post->get('outcome');
|
||||
$this->setState('filter.outcome', $outcome);
|
||||
}
|
||||
|
||||
$joomla_version = $this->getUserStateFromRequest($this->context . '.filter.joomla_version', 'filter_joomla_version');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$joomla_version = $app->input->post->get('joomla_version');
|
||||
$this->setState('filter.joomla_version', $joomla_version);
|
||||
}
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$created_by = $app->input->post->get('created_by');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -95,7 +129,7 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
// Check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
@ -203,9 +237,17 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_release_checking'))
|
||||
@ -228,30 +270,205 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// Filter by context.
|
||||
if ($context = $this->getState('filter.context'))
|
||||
// Filter by Context.
|
||||
$_context = $this->getState('filter.context');
|
||||
if (is_numeric($_context))
|
||||
{
|
||||
$query->where('a.context = ' . $db->quote($db->escape($context)));
|
||||
if (is_float($_context))
|
||||
{
|
||||
$query->where('a.context = ' . (float) $_context);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.context = ' . (int) $_context);
|
||||
}
|
||||
}
|
||||
// Filter by action.
|
||||
if ($action = $this->getState('filter.action'))
|
||||
elseif (Release_checkingHelper::checkString($_context))
|
||||
{
|
||||
$query->where('a.action = ' . $db->quote($db->escape($action)));
|
||||
$query->where('a.context = ' . $db->quote($db->escape($_context)));
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_context))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_context = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_context);
|
||||
// Filter by the Context Array.
|
||||
$query->where('a.context IN (' . implode(',', $_context) . ')');
|
||||
}
|
||||
// Filter by Action.
|
||||
$_action = $this->getState('filter.action');
|
||||
if (is_numeric($_action))
|
||||
{
|
||||
if (is_float($_action))
|
||||
{
|
||||
$query->where('a.action = ' . (float) $_action);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.action = ' . (int) $_action);
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($_action))
|
||||
{
|
||||
$query->where('a.action = ' . $db->quote($db->escape($_action)));
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_action))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_action = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_action);
|
||||
// Filter by the Action Array.
|
||||
$query->where('a.action IN (' . implode(',', $_action) . ')');
|
||||
}
|
||||
// Filter by Outcome.
|
||||
if ($outcome = $this->getState('filter.outcome'))
|
||||
$_outcome = $this->getState('filter.outcome');
|
||||
if (is_numeric($_outcome))
|
||||
{
|
||||
$query->where('a.outcome = ' . $db->quote($db->escape($outcome)));
|
||||
if (is_float($_outcome))
|
||||
{
|
||||
$query->where('a.outcome = ' . (float) $_outcome);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.outcome = ' . (int) $_outcome);
|
||||
}
|
||||
}
|
||||
// Filter by joomla_version.
|
||||
if ($joomla_version = $this->getState('filter.joomla_version'))
|
||||
elseif (Release_checkingHelper::checkString($_outcome))
|
||||
{
|
||||
$query->where('a.joomla_version = ' . $db->quote($db->escape($joomla_version)));
|
||||
$query->where('a.outcome = ' . $db->quote($db->escape($_outcome)));
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_outcome))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_outcome = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_outcome);
|
||||
// Filter by the Outcome Array.
|
||||
$query->where('a.outcome IN (' . implode(',', $_outcome) . ')');
|
||||
}
|
||||
// Filter by Joomla_version.
|
||||
$_joomla_version = $this->getState('filter.joomla_version');
|
||||
if (is_numeric($_joomla_version))
|
||||
{
|
||||
if (is_float($_joomla_version))
|
||||
{
|
||||
$query->where('a.joomla_version = ' . (float) $_joomla_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.joomla_version = ' . (int) $_joomla_version);
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($_joomla_version))
|
||||
{
|
||||
$query->where('a.joomla_version = ' . $db->quote($db->escape($_joomla_version)));
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_joomla_version))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_joomla_version = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_joomla_version);
|
||||
// Filter by the Joomla_version Array.
|
||||
$query->where('a.joomla_version IN (' . implode(',', $_joomla_version) . ')');
|
||||
}
|
||||
// Filter by Created_by.
|
||||
if ($created_by = $this->getState('filter.created_by'))
|
||||
$_created_by = $this->getState('filter.created_by');
|
||||
if (is_numeric($_created_by))
|
||||
{
|
||||
$query->where('a.created_by = ' . $db->quote($db->escape($created_by)));
|
||||
if (is_float($_created_by))
|
||||
{
|
||||
$query->where('a.created_by = ' . (float) $_created_by);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.created_by = ' . (int) $_created_by);
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($_created_by))
|
||||
{
|
||||
$query->where('a.created_by = ' . $db->quote($db->escape($_created_by)));
|
||||
}
|
||||
elseif (Release_checkingHelper::checkArray($_created_by))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_created_by = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (Release_checkingHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_created_by);
|
||||
// Filter by the Created_by Array.
|
||||
$query->where('a.created_by IN (' . implode(',', $_created_by) . ')');
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -428,13 +645,68 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (Release_checkingHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| Release_checkingHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.context');
|
||||
$id .= ':' . $this->getState('filter.action');
|
||||
$id .= ':' . $this->getState('filter.outcome');
|
||||
$id .= ':' . $this->getState('filter.joomla_version');
|
||||
// Check if the value is an array
|
||||
$_context = $this->getState('filter.context');
|
||||
if (Release_checkingHelper::checkArray($_context))
|
||||
{
|
||||
$id .= ':' . implode(':', $_context);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_context)
|
||||
|| Release_checkingHelper::checkString($_context))
|
||||
{
|
||||
$id .= ':' . $_context;
|
||||
}
|
||||
// Check if the value is an array
|
||||
$_action = $this->getState('filter.action');
|
||||
if (Release_checkingHelper::checkArray($_action))
|
||||
{
|
||||
$id .= ':' . implode(':', $_action);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_action)
|
||||
|| Release_checkingHelper::checkString($_action))
|
||||
{
|
||||
$id .= ':' . $_action;
|
||||
}
|
||||
// Check if the value is an array
|
||||
$_outcome = $this->getState('filter.outcome');
|
||||
if (Release_checkingHelper::checkArray($_outcome))
|
||||
{
|
||||
$id .= ':' . implode(':', $_outcome);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_outcome)
|
||||
|| Release_checkingHelper::checkString($_outcome))
|
||||
{
|
||||
$id .= ':' . $_outcome;
|
||||
}
|
||||
// Check if the value is an array
|
||||
$_joomla_version = $this->getState('filter.joomla_version');
|
||||
if (Release_checkingHelper::checkArray($_joomla_version))
|
||||
{
|
||||
$id .= ':' . implode(':', $_joomla_version);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_joomla_version)
|
||||
|| Release_checkingHelper::checkString($_joomla_version))
|
||||
{
|
||||
$id .= ':' . $_joomla_version;
|
||||
}
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
@ -455,17 +727,19 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__release_checking_release_check'));
|
||||
$db->setQuery($query);
|
||||
// Only select items that are checked out.
|
||||
$query->where($db->quoteName('checked_out') . '!=0');
|
||||
$db->setQuery($query, 0, 1);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
// Get Yesterdays date.
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
// Reset query.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
@ -480,7 +754,7 @@ class Release_checkingModelRelease_checks extends JModelList
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
// Check table.
|
||||
$query->update($db->quoteName('#__release_checking_release_check'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -1,15 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
JHtml::_('behavior.tabstate');
|
||||
|
||||
// register this component namespace
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla'
|
||||
];
|
||||
// Start the search and load if found
|
||||
$found = false;
|
||||
$found_base_dir = "";
|
||||
$found_len = 0;
|
||||
foreach ($search as $base_dir => $prefix)
|
||||
{
|
||||
// does the class use the namespace prefix?
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) === 0)
|
||||
{
|
||||
// we have a match so load the values
|
||||
$found = true;
|
||||
$found_base_dir = $base_dir;
|
||||
$found_len = $len;
|
||||
// done here
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if we found a match
|
||||
if (!$found)
|
||||
{
|
||||
// not found so move to the next registered autoloader
|
||||
return;
|
||||
}
|
||||
// get the relative class name
|
||||
$relative_class = substr($class, $found_len);
|
||||
// replace the namespace prefix with the base directory, replace namespace
|
||||
// separators with directory separators in the relative class name, append
|
||||
// with .php
|
||||
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||
// if the file exists, require it
|
||||
if (file_exists($file))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_release_checking'))
|
||||
|
@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `#__release_checking_release_check` (
|
||||
`created_by` INT(11) NOT NULL DEFAULT 0,
|
||||
`joomla_version` INT(11) NOT NULL DEFAULT 0,
|
||||
`outcome` TINYINT(1) NOT NULL DEFAULT -1,
|
||||
`params` text NOT NULL,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS `#__release_checking_joomla_version` (
|
||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||
`alias` CHAR(64) NOT NULL DEFAULT '',
|
||||
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`params` text NOT NULL,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS `#__release_checking_context` (
|
||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||
`alias` CHAR(64) NOT NULL DEFAULT '',
|
||||
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`params` text NOT NULL,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS `#__release_checking_action` (
|
||||
`context` INT(11) NOT NULL DEFAULT 0,
|
||||
`description` TEXT NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`params` text NOT NULL,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
@ -278,13 +278,3 @@ INSERT INTO `#__release_checking_action` (`id`, `alias`, `context`, `description
|
||||
(95, 'make-sure-google-recaptcha-still-works', 35, '', 'Make sure Google recaptcha still works', 1);
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Always insure this column rules is large enough for all the access control values.
|
||||
--
|
||||
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
|
||||
|
||||
--
|
||||
-- Always insure this column name is large enough for long component and view names.
|
||||
--
|
||||
ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';
|
||||
|
@ -2,3 +2,4 @@ DROP TABLE IF EXISTS `#__release_checking_release_check`;
|
||||
DROP TABLE IF EXISTS `#__release_checking_joomla_version`;
|
||||
DROP TABLE IF EXISTS `#__release_checking_context`;
|
||||
DROP TABLE IF EXISTS `#__release_checking_action`;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,6 +11,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
@ -17,7 +19,7 @@ use Joomla\Utilities\ArrayHelper;
|
||||
/**
|
||||
* Actions Table class
|
||||
*/
|
||||
class Release_checkingTableAction extends JTable
|
||||
class Release_checkingTableAction extends Table
|
||||
{
|
||||
/**
|
||||
* Ensure the params and metadata in json encoded in the bind method
|
||||
@ -321,7 +323,7 @@ class Release_checkingTableAction extends JTable
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,6 +11,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
@ -17,7 +19,7 @@ use Joomla\Utilities\ArrayHelper;
|
||||
/**
|
||||
* Contexts Table class
|
||||
*/
|
||||
class Release_checkingTableContext extends JTable
|
||||
class Release_checkingTableContext extends Table
|
||||
{
|
||||
/**
|
||||
* Ensure the params and metadata in json encoded in the bind method
|
||||
@ -321,7 +323,7 @@ class Release_checkingTableContext extends JTable
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,6 +11,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
@ -17,7 +19,7 @@ use Joomla\Utilities\ArrayHelper;
|
||||
/**
|
||||
* Joomla_versions Table class
|
||||
*/
|
||||
class Release_checkingTableJoomla_version extends JTable
|
||||
class Release_checkingTableJoomla_version extends Table
|
||||
{
|
||||
/**
|
||||
* Ensure the params and metadata in json encoded in the bind method
|
||||
@ -321,7 +323,7 @@ class Release_checkingTableJoomla_version extends JTable
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,6 +11,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
@ -17,7 +19,7 @@ use Joomla\Utilities\ArrayHelper;
|
||||
/**
|
||||
* Release_checks Table class
|
||||
*/
|
||||
class Release_checkingTableRelease_check extends JTable
|
||||
class Release_checkingTableRelease_check extends Table
|
||||
{
|
||||
/**
|
||||
* Ensure the params and metadata in json encoded in the bind method
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -11,8 +12,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.formvalidator');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,10 +11,12 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Action View class
|
||||
* Action Html View class
|
||||
*/
|
||||
class Release_checkingViewAction extends JViewLegacy
|
||||
class Release_checkingViewAction extends HtmlView
|
||||
{
|
||||
/**
|
||||
* display method of View
|
||||
@ -147,10 +150,10 @@ class Release_checkingViewAction extends JViewLegacy
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = Release_checkingHelper::getHelpUrl('action');
|
||||
if (Release_checkingHelper::checkString($help_url))
|
||||
$this->help_url = Release_checkingHelper::getHelpUrl('action');
|
||||
if (Release_checkingHelper::checkString($this->help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,36 +11,16 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS') . ' -'));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_release_checking&task=actions.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'actionList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $this->listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_release_checking&view=actions'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
@ -49,35 +30,37 @@ if ($this->saveOrder)
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
// Add the trash helper layout
|
||||
echo JLayoutHelper::render('trashhelper', $this);
|
||||
// Add the searchtools
|
||||
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
?>
|
||||
<?php if (empty($this->items)): ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="actionList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_RELEASE_CHECKING_ACTIONS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<table class="table table-striped" id="actionList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php // Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_RELEASE_CHECKING_ACTIONS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -23,11 +24,8 @@ $edit = "index.php?option=com_release_checking&view=actions&task=action.edit";
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('core.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive';
|
||||
}
|
||||
else
|
||||
$iconClass = '';
|
||||
if (!$this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -14,7 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<tr>
|
||||
<?php if ($this->canEdit&& $this->canState): ?>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
@ -28,17 +29,17 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_ACTION_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_ACTION_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_ACTION_CONTEXT_LABEL', 'g.name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_ACTION_CONTEXT_LABEL', 'g.name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_RELEASE_CHECKING_ACTION_DESCRIPTION_LABEL'); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_ACTION_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_ACTION_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
@ -46,6 +47,6 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th width="5" class="nowrap center hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_ACTION_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_ACTION_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,10 +11,12 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Release_checking View class for the Actions
|
||||
* Release_checking Html View class for the Actions
|
||||
*/
|
||||
class Release_checkingViewActions extends JViewLegacy
|
||||
class Release_checkingViewActions extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Actions view display method
|
||||
@ -32,10 +35,14 @@ class Release_checkingViewActions extends JViewLegacy
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
// Load the filter form from xml.
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
// Load the active filters.
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
// Add the list ordering clause.
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction', 'desc'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->saveOrder = $this->listOrder == 'a.ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
@ -140,10 +147,10 @@ class Release_checkingViewActions extends JViewLegacy
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = Release_checkingHelper::getHelpUrl('actions');
|
||||
if (Release_checkingHelper::checkString($help_url))
|
||||
$this->help_url = Release_checkingHelper::getHelpUrl('actions');
|
||||
if (Release_checkingHelper::checkString($this->help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
@ -152,30 +159,17 @@ class Release_checkingViewActions extends JViewLegacy
|
||||
JToolBarHelper::preferences('com_release_checking');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
// Only load published batch if state and batch is allowed
|
||||
if ($this->canState && $this->canBatch)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
// only load if batch allowed
|
||||
if ($this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
// Only load access batch if create, edit and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
@ -185,34 +179,24 @@ class Release_checkingViewActions extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// Set Name Selection
|
||||
$this->nameOptions = $this->getTheNameSelections();
|
||||
// We do some sanitation for Name filter
|
||||
if (Release_checkingHelper::checkArray($this->nameOptions) &&
|
||||
isset($this->nameOptions[0]->value) &&
|
||||
!Release_checkingHelper::checkString($this->nameOptions[0]->value))
|
||||
// Only load Name batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
unset($this->nameOptions[0]);
|
||||
}
|
||||
// Only load Name filter if it has values
|
||||
if (Release_checkingHelper::checkArray($this->nameOptions))
|
||||
{
|
||||
// Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -',
|
||||
'filter_name',
|
||||
JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
// Set Name Selection
|
||||
$this->nameOptions = JFormHelper::loadFieldType('actionsfiltername')->options;
|
||||
// We do some sanitation for Name filter
|
||||
if (Release_checkingHelper::checkArray($this->nameOptions) &&
|
||||
isset($this->nameOptions[0]->value) &&
|
||||
!Release_checkingHelper::checkString($this->nameOptions[0]->value))
|
||||
{
|
||||
// Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -',
|
||||
'batch[name]',
|
||||
JHtml::_('select.options', $this->nameOptions, 'value', 'text')
|
||||
);
|
||||
unset($this->nameOptions[0]);
|
||||
}
|
||||
// Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -',
|
||||
'batch[name]',
|
||||
JHtml::_('select.options', $this->nameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,43 +241,11 @@ class Release_checkingViewActions extends JViewLegacy
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'ordering' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL'),
|
||||
'g.name' => JText::_('COM_RELEASE_CHECKING_ACTION_CONTEXT_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheNameSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('name'));
|
||||
$query->from($db->quoteName('#__release_checking_action'));
|
||||
$query->order($db->quoteName('name') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
$results = array_unique($results);
|
||||
$_filter = array();
|
||||
foreach ($results as $name)
|
||||
{
|
||||
// Now add the name and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $name, $name);
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -11,8 +12,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.formvalidator');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,10 +11,12 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Context View class
|
||||
* Context Html View class
|
||||
*/
|
||||
class Release_checkingViewContext extends JViewLegacy
|
||||
class Release_checkingViewContext extends HtmlView
|
||||
{
|
||||
/**
|
||||
* display method of View
|
||||
@ -147,10 +150,10 @@ class Release_checkingViewContext extends JViewLegacy
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = Release_checkingHelper::getHelpUrl('context');
|
||||
if (Release_checkingHelper::checkString($help_url))
|
||||
$this->help_url = Release_checkingHelper::getHelpUrl('context');
|
||||
if (Release_checkingHelper::checkString($this->help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_RELEASE_CHECKING_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -10,36 +11,16 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS') . ' -'));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_release_checking&task=contexts.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'contextList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $this->listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_release_checking&view=contexts'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
@ -49,35 +30,37 @@ if ($this->saveOrder)
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
// Add the trash helper layout
|
||||
echo JLayoutHelper::render('trashhelper', $this);
|
||||
// Add the searchtools
|
||||
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
?>
|
||||
<?php if (empty($this->items)): ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="contextList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_RELEASE_CHECKING_CONTEXTS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<table class="table table-striped" id="contextList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php // Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_RELEASE_CHECKING_CONTEXTS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -23,11 +24,8 @@ $edit = "index.php?option=com_release_checking&view=contexts&task=context.edit";
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('core.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive';
|
||||
}
|
||||
else
|
||||
$iconClass = '';
|
||||
if (!$this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -14,7 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<tr>
|
||||
<?php if ($this->canEdit&& $this->canState): ?>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
@ -28,11 +29,11 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_CONTEXT_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_CONTEXT_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
@ -40,6 +41,6 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th width="5" class="nowrap center hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_RELEASE_CHECKING_CONTEXT_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_RELEASE_CHECKING_CONTEXT_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.CMS
|
||||
* @subpackage com_release_checking
|
||||
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
|
||||
*
|
||||
* @created 29th July, 2020
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user