Stable release of v3.0.0

Move all JText to use the namespaced class Text directly. Move all JHtml to use the namespaced class Html directly. Move all JFactory to use the namespaced class Factory directly. Move all JRoute to use the namespaced class Route directly. Move all JFormHelper to use the namespaced class FormHelper directly. Move all JLayout to use the namespaced class FileLayout directly. Move all JLanguageMultilang to use the namespaced class Multilanguage directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JCategoryNode to use the namespaced class CategoryNode directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JToolbar to use the namespaced class Toolbar directly. Move all JToolbarHelper to use the namespaced class ToolbarHelper directly. Convert all addStyleSheet to make use of Html class instead. Convert all addScript to make use of Html class instead.
This commit is contained in:
Robot 2024-01-22 10:48:28 +02:00
parent d94111f66c
commit 88104fd483
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
459 changed files with 8086 additions and 6116 deletions

View File

@ -1,3 +1,20 @@
# v3.0.0
- Move all JText to use the namespaced class Text directly.
- Move all JHtml to use the namespaced class Html directly.
- Move all JFactory to use the namespaced class Factory directly.
- Move all JRoute to use the namespaced class Route directly.
- Move all JFormHelper to use the namespaced class FormHelper directly.
- Move all JLayout to use the namespaced class FileLayout directly.
- Move all JLanguageMultilang to use the namespaced class Multilanguage directly.
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
- Move all JCategoryNode to use the namespaced class CategoryNode directly.
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
- Move all JToolbar to use the namespaced class Toolbar directly.
- Move all JToolbarHelper to use the namespaced class ToolbarHelper directly.
- Convert all addStyleSheet to make use of Html class instead.
- Convert all addScript to make use of Html class instead.
# v2.0.32 # v2.0.32
- Fixed other search related issues. - Fixed other search related issues.

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.32) # Get Bible (3.0.0)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible") ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 4th December, 2023 + *Last Build*: 22nd January, 2024
+ *Version*: 2.0.32 + *Version*: 3.0.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**561 Hours** or **70 Eight Hour Days** (actual time the author saved - **567 Hours** or **71 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **200979** + *Line count*: **203297**
+ *File count*: **1744** + *File count*: **1750**
+ *Folder count*: **167** + *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent) **375 Hours** or **47 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @140hours** = codingtime / 4; > **debugging @142hours** = codingtime / 4;
> **planning @80hours** = codingtime / 7; > **planning @81hours** = codingtime / 7;
> **mapping @56hours** = codingtime / 10; > **mapping @57hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;) > **office @95hours** = codingtime / 6;)
**931 Hours** or **116 Eight Hour Days** **942 Hours** or **118 Eight Hour Days**
(a total of the realistic time frame for this project) (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**, > (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.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **23.2 weeks** or **4.8 months** Project duration: **23.6 weeks** or **4.9 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.32) # Get Bible (3.0.0)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible") ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 4th December, 2023 + *Last Build*: 22nd January, 2024
+ *Version*: 2.0.32 + *Version*: 3.0.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**561 Hours** or **70 Eight Hour Days** (actual time the author saved - **567 Hours** or **71 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **200979** + *Line count*: **203297**
+ *File count*: **1744** + *File count*: **1750**
+ *Folder count*: **167** + *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent) **375 Hours** or **47 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @140hours** = codingtime / 4; > **debugging @142hours** = codingtime / 4;
> **planning @80hours** = codingtime / 7; > **planning @81hours** = codingtime / 7;
> **mapping @56hours** = codingtime / 10; > **mapping @57hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;) > **office @95hours** = codingtime / 6;)
**931 Hours** or **116 Eight Hour Days** **942 Hours** or **118 Eight Hour Days**
(a total of the realistic time frame for this project) (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**, > (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.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **23.2 weeks** or **4.8 months** Project duration: **23.6 weeks** or **4.9 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -17,153 +17,153 @@
/* CSS Document */ /* CSS Document */
.dashboard-container { .dashboard-container {
margin-left: 10px; margin-left: 10px;
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
} }
.dashboard-container [class*="span"] { .dashboard-container [class*="span"] {
display: block; display: block;
float: none; float: none;
margin-left: 0; margin-left: 0;
width: auto; width: auto;
} }
.dashboard-container:before, .dashboard-container:after { .dashboard-container:before, .dashboard-container:after {
content: ""; content: "";
display: table; display: table;
} }
.dashboard-container:after { .dashboard-container:after {
clear: both; clear: both;
} }
.dashboard-container [class*="span"] { .dashboard-container [class*="span"] {
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
float: left; float: left;
min-height: 145px; min-height: 145px;
min-width: 96px; min-width: 96px;
width: 100%; width: 100%;
} }
.dashboard-container [class*="span"]:first-child { .dashboard-container [class*="span"]:first-child {
margin-left: 0; margin-left: 0;
} }
.dashboard-wraper { .dashboard-wraper {
background: none repeat scroll 0 0 hsl(0, 0%, 93%); background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px; border-radius: 5px;
float: left; float: left;
margin: 1%; margin: 1%;
padding: 3px; padding: 3px;
width: 17%; width: 17%;
min-height: 194px; min-height: 194px;
min-width: 96px; min-width: 96px;
} }
.dashboard-content a { .dashboard-content a {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%); border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%); color: hsl(0, 0%, 20%);
display: block; display: block;
min-height: 89px; min-height: 89px;
padding: 10px; padding: 10px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
} }
.dashboard-content a:hover { .dashboard-content a:hover {
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%); color: hsl(200, 100%, 30%);
text-decoration: none; text-decoration: none;
} }
.dashboard-title { .dashboard-title {
display: block; display: block;
padding-top: 5px; padding-top: 5px;
} }
.dashboard-info { .dashboard-info {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%); border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%); color: hsl(0, 0%, 20%);
display: block; display: block;
font-size: 12px; font-size: 12px;
padding: 10px; padding: 10px;
text-align: center; text-align: center;
} }
.dashboard-info span { .dashboard-info span {
display: block; display: block;
text-align: center; text-align: center;
} }
.dashboard-info img { .dashboard-info img {
margin: 0 auto; margin: 0 auto;
} }
.dashboard-table { .dashboard-table {
border-top: 1px solid hsl(0, 0%, 87%); border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px; margin-top: 5px;
width: 100%; width: 100%;
} }
.dashboard-info h5 { .dashboard-info h5 {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
} }
.dashboard-block { .dashboard-block {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%); border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px; border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset; box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px; margin-bottom: 20px;
} }
.dashboard-block .dashboard-block-head { .dashboard-block .dashboard-block-head {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%); border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%); box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px; height: 40px;
position: relative; position: relative;
} }
.dashboard-block .dashboard-block-head h5 { .dashboard-block .dashboard-block-head h5 {
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
padding-left: 10px; padding-left: 10px;
padding-top: 11px; padding-top: 11px;
text-transform: uppercase; text-transform: uppercase;
} }
.dashboard-block .dashboard-block-content { .dashboard-block .dashboard-block-content {
background: none repeat scroll 0 0 hsl(0, 0%, 93%); background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px;
} }
.dashboard-block .dashboard-block-box { .dashboard-block .dashboard-block-box {
background: none repeat scroll 0 0 hsl(0, 0%, 100%); background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%); border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset; box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
} }
.dashboard-block .dashboard-block-content .dashboard-block-box { .dashboard-block .dashboard-block-content .dashboard-block-box {
margin-top: 0 !important; margin-top: 0 !important;
} }
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table { .dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.dashboard-block-table { .dashboard-block-table {
background-color: hsla(0, 0%, 0%, 0); background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
margin-bottom: 20px; margin-bottom: 20px;
max-width: 100%; max-width: 100%;
width: 100%; width: 100%;
} }
.dashboard-block-table th, .dashboard-block-table td { .dashboard-block-table th, .dashboard-block-table td {
border-top: 1px solid hsl(0, 0%, 87%); border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px; line-height: 20px;
padding: 5px; padding: 5px;
text-align: left; text-align: left;
vertical-align: middle; vertical-align: middle;
} }
.dashboard-badge { .dashboard-badge {
background-color: hsl(0, 0%, 60%); background-color: hsl(0, 0%, 60%);
border-radius: 9px; border-radius: 9px;
color: hsl(0, 0%, 100%); color: hsl(0, 0%, 100%);
font-size: 11.844px; font-size: 11.844px;
font-weight: bold; font-weight: bold;
line-height: 14px; line-height: 14px;
padding: 1px 9px 2px; padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25); text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline; vertical-align: baseline;
white-space: nowrap; white-space: nowrap;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -20,6 +20,10 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController; use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
/** /**
* General Controller of Getbible component * General Controller of Getbible component
@ -35,7 +39,7 @@ class GetbibleController extends BaseController
* *
* @since 3.0 * @since 3.0
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
// set the default view // set the default view
$config['default_view'] = 'getbible'; $config['default_view'] = 'getbible';
@ -51,38 +55,38 @@ class GetbibleController extends BaseController
function display($cachable = false, $urlparams = false) function display($cachable = false, $urlparams = false)
{ {
// set default view if not set // set default view if not set
$view = $this->input->getCmd('view', 'getbible'); $view = $this->input->getCmd('view', 'getbible');
$data = $this->getViewRelation($view); $data = $this->getViewRelation($view);
$layout = $this->input->get('layout', null, 'WORD'); $layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id'); $id = $this->input->getInt('id');
// Check for edit form. // Check for edit form.
if(GetbibleHelper::checkArray($data)) if(UtilitiesArrayHelper::check($data))
{ {
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_getbible.edit.'.$data['view'], $id)) if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_getbible.edit.'.$data['view'], $id))
{ {
// Somehow the person just went to the form - we don't allow that. // Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error'); $this->setMessage($this->getError(), 'error');
// check if item was opend from other then its own list view // check if item was opend from other then its own list view
$ref = $this->input->getCmd('ref', 0); $ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0); $refid = $this->input->getInt('refid', 0);
// set redirect // set redirect
if ($refid > 0 && GetbibleHelper::checkString($ref)) if ($refid > 0 && StringHelper::check($ref))
{ {
// redirect to item of ref // redirect to item of ref
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
} }
elseif (GetbibleHelper::checkString($ref)) elseif (StringHelper::check($ref))
{ {
// redirect to ref // redirect to ref
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view='.(string)$ref, false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view='.(string)$ref, false));
} }
else else
{ {
// normal redirect back to the list view // normal redirect back to the list view
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view='.$data['views'], false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view='.$data['views'], false));
} }
return false; return false;
@ -95,7 +99,7 @@ class GetbibleController extends BaseController
protected function getViewRelation($view) protected function getViewRelation($view)
{ {
// check the we have a value // check the we have a value
if (GetbibleHelper::checkString($view)) if (StringHelper::check($view))
{ {
// the view relationships // the view relationships
$views = array( $views = array(

View File

@ -18,7 +18,9 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController; use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
/** /**
@ -30,9 +32,9 @@ class GetbibleControllerAjax extends BaseController
{ {
parent::__construct($config); parent::__construct($config);
// make sure all json stuff are set // make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' ); Factory::getDocument()->setMimeEncoding( 'application/json' );
// get the application // get the application
$app = JFactory::getApplication(); $app = Factory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"'); $app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*'); $app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks // load the tasks
@ -45,16 +47,16 @@ class GetbibleControllerAjax extends BaseController
public function ajax() public function ajax()
{ {
// get the user for later use // get the user for later use
$user = JFactory::getUser(); $user = Factory::getUser();
// get the input values // get the input values
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
// check if we should return raw // check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function // return to a callback function
$callback = $jinput->get('callback', null, 'CMD'); $callback = $jinput->get('callback', null, 'CMD');
// Check Token! // Check Token!
$token = JSession::getFormToken(); $token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM'); $call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{ {
// get the task // get the task

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Book Form Controller * Book Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerBook extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Books'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Books'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER### }###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerBook extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('book.access', 'com_getbible'); $access = $user->authorise('book.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerBook extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerBook extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerBook extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Book', '', array()); $model = $this->getModel('Book', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerBook extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerBook extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerBook extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerBook extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerBook extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerBook extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,10 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\GetBible\Factory; use VDM\Joomla\GetBible\Factory as GetBibleFactory;
/** /**
* Books Admin Controller * Books Admin Controller
@ -55,108 +59,108 @@ class GetbibleControllerBooks extends AdminController
public function updateChaptersNames() public function updateChaptersNames()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('book.update_chapters_names', 'com_getbible')) if ($user->authorise('book.update_chapters_names', 'com_getbible'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
JArrayHelper::toInteger($pks); ArrayHelper::toInteger($pks);
// check if there is any selections // check if there is any selections
$number = UtilitiesArrayHelper::check($pks); $number = UtilitiesArrayHelper::check($pks);
if (!$number) if (!$number)
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_NO_BOOK_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); $message = Text::_('COM_GETBIBLE_NO_BOOK_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
elseif (Factory::_('GetBible.Watcher.Chapter')->names($pks)) elseif (GetBibleFactory::_('GetBible.Watcher.Chapter')->names($pks))
{ {
// Redirect to the list screen with success. // Redirect to the list screen with success.
$message = array(); $message = array();
$message[] = '<h1>' . JText::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>'; $message[] = '<h1>' . Text::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>';
// get the data to export // get the data to export
if ($number == 1) if ($number == 1)
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_BOOK_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_BOOK_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>';
} }
else else
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_SELECTED_BOOKS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_SELECTED_BOOKS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>';
} }
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), implode('', $message), 'Success'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), implode('', $message), 'Success');
return; return;
} }
} }
else else
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_CHAPTER_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $message = Text::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_CHAPTER_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER'); $message = Text::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
public function forceHashCheck() public function forceHashCheck()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('book.force_hash_check', 'com_getbible')) if ($user->authorise('book.force_hash_check', 'com_getbible'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
JArrayHelper::toInteger($pks); ArrayHelper::toInteger($pks);
// check if there is any selections // check if there is any selections
$number = UtilitiesArrayHelper::check($pks); $number = UtilitiesArrayHelper::check($pks);
if (!$number) if (!$number)
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_NO_BOOK_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); $message = Text::_('COM_GETBIBLE_NO_BOOK_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
elseif (Factory::_('GetBible.Watcher.Chapter')->force($pks)) elseif (GetBibleFactory::_('GetBible.Watcher.Chapter')->force($pks))
{ {
// Redirect to the list screen with success. // Redirect to the list screen with success.
$message = array(); $message = array();
$message[] = '<h1>' . JText::_('COM_GETBIBLE_FORCE_HASH_CHECK_ENABLED') . '</h1>'; $message[] = '<h1>' . Text::_('COM_GETBIBLE_FORCE_HASH_CHECK_ENABLED') . '</h1>';
// get the data to export // get the data to export
if ($number == 1) if ($number == 1)
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_BOOK_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_BOOK_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>';
} }
else else
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_SELECTED_BOOKS_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_SELECTED_BOOKS_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>';
} }
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), implode('', $message), 'Success'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), implode('', $message), 'Success');
return; return;
} }
} }
else else
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_ENABLED_FORCEFUL_CHECK_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $message = Text::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_ENABLED_FORCEFUL_CHECK_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER'); $message = Text::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return; return;
} }
} }

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Chapter Form Controller * Chapter Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerChapter extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Chapters'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Chapters'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER### }###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerChapter extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('chapter.access', 'com_getbible'); $access = $user->authorise('chapter.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerChapter extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerChapter extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerChapter extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Chapter', '', array()); $model = $this->getModel('Chapter', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=chapters' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=chapters' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerChapter extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerChapter extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerChapter extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerChapter extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerChapter extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerChapter extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Chapters Admin Controller * Chapters Admin Controller

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Getbible Admin Controller * Getbible Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Linker Form Controller * Linker Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerLinker extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Linkers'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Linkers'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerLinker extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('linker.access', 'com_getbible'); $access = $user->authorise('linker.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerLinker extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerLinker extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerLinker extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Linker', '', array()); $model = $this->getModel('Linker', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=linkers' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=linkers' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerLinker extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerLinker extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerLinker extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerLinker extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerLinker extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerLinker extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Linkers Admin Controller * Linkers Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Note Form Controller * Note Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerNote extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Notes'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Notes'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerNote extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('note.access', 'com_getbible'); $access = $user->authorise('note.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerNote extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerNote extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerNote extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Note', '', array()); $model = $this->getModel('Note', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=notes' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=notes' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerNote extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerNote extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerNote extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerNote extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerNote extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerNote extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Notes Admin Controller * Notes Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Open_ai_message Form Controller * Open_ai_message Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerOpen_ai_message extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Open_ai_messages'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Open_ai_messages'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerOpen_ai_message extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('open_ai_message.access', 'com_getbible'); $access = $user->authorise('open_ai_message.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerOpen_ai_message extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerOpen_ai_message extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerOpen_ai_message extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Open_ai_message', '', array()); $model = $this->getModel('Open_ai_message', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=open_ai_messages' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=open_ai_messages' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerOpen_ai_message extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerOpen_ai_message extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerOpen_ai_message extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerOpen_ai_message extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerOpen_ai_message extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerOpen_ai_message extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Open_ai_messages Admin Controller * Open_ai_messages Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Open_ai_response Form Controller * Open_ai_response Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerOpen_ai_response extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Open_ai_responses'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Open_ai_responses'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerOpen_ai_response extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('open_ai_response.access', 'com_getbible'); $access = $user->authorise('open_ai_response.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerOpen_ai_response extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerOpen_ai_response extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerOpen_ai_response extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Open_ai_response', '', array()); $model = $this->getModel('Open_ai_response', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=open_ai_responses' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=open_ai_responses' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerOpen_ai_response extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerOpen_ai_response extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerOpen_ai_response extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerOpen_ai_response extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerOpen_ai_response extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerOpen_ai_response extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Open_ai_responses Admin Controller * Open_ai_responses Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Password Form Controller * Password Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerPassword extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Passwords'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Passwords'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerPassword extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('password.access', 'com_getbible'); $access = $user->authorise('password.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerPassword extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerPassword extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerPassword extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Password', '', array()); $model = $this->getModel('Password', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=passwords' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=passwords' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerPassword extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerPassword extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerPassword extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerPassword extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerPassword extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerPassword extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Passwords Admin Controller * Passwords Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Prompt Form Controller * Prompt Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerPrompt extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Prompts'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Prompts'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerPrompt extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('prompt.access', 'com_getbible'); $access = $user->authorise('prompt.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerPrompt extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerPrompt extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerPrompt extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Prompt', '', array()); $model = $this->getModel('Prompt', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=prompts' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=prompts' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerPrompt extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerPrompt extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerPrompt extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerPrompt extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerPrompt extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerPrompt extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Prompts Admin Controller * Prompts Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Tag Form Controller * Tag Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerTag extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Tags'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Tags'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerTag extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('tag.access', 'com_getbible'); $access = $user->authorise('tag.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerTag extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerTag extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerTag extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Tag', '', array()); $model = $this->getModel('Tag', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=tags' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=tags' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerTag extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerTag extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerTag extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerTag extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerTag extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerTag extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Tagged_verse Form Controller * Tagged_verse Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerTagged_verse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Tagged_verses'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Tagged_verses'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerTagged_verse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('tagged_verse.access', 'com_getbible'); $access = $user->authorise('tagged_verse.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerTagged_verse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerTagged_verse extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerTagged_verse extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Tagged_verse', '', array()); $model = $this->getModel('Tagged_verse', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=tagged_verses' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=tagged_verses' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerTagged_verse extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerTagged_verse extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerTagged_verse extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerTagged_verse extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerTagged_verse extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerTagged_verse extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Tagged_verses Admin Controller * Tagged_verses Admin Controller

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Tags Admin Controller * Tags Admin Controller

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Translation Form Controller * Translation Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerTranslation extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Translations'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Translations'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER### }###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerTranslation extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('translation.access', 'com_getbible'); $access = $user->authorise('translation.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerTranslation extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerTranslation extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerTranslation extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Translation', '', array()); $model = $this->getModel('Translation', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerTranslation extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerTranslation extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerTranslation extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerTranslation extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerTranslation extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerTranslation extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,9 +18,13 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use VDM\Joomla\GetBible\Factory; use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\GetBible\Factory as GetBibleFactory;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** /**
@ -55,86 +59,86 @@ class GetbibleControllerTranslations extends AdminController
public function updateTranslationsDetails() public function updateTranslationsDetails()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('translation.update_translations_details', 'com_getbible')) if ($user->authorise('translation.update_translations_details', 'com_getbible'))
{ {
if (Factory::_('GetBible.Watcher.Translation')->translations()) if (GetBibleFactory::_('GetBible.Watcher.Translation')->translations())
{ {
// Redirect to the list screen with success. // Redirect to the list screen with success.
$message = array(); $message = array();
$message[] = '<h1>' . JText::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>'; $message[] = '<h1>' . Text::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>';
$message[] = '<p>' . JText::_('COM_GETBIBLE_ALL_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_ALL_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>';
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), implode('', $message), 'Success'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), implode('', $message), 'Success');
return; return;
} }
} }
else else
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_BOOK_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $message = Text::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_BOOK_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error');
return; return;
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER'); $message = Text::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), $message, 'error');
return; return;
} }
public function updateBookNames() public function updateBookNames()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('translation.update_book_names', 'com_getbible')) if ($user->authorise('translation.update_book_names', 'com_getbible'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
JArrayHelper::toInteger($pks); ArrayHelper::toInteger($pks);
// check if there is any selections // check if there is any selections
$number = UtilitiesArrayHelper::check($pks); $number = UtilitiesArrayHelper::check($pks);
if (!$number) if (!$number)
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_NO_TRANSLATION_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); $message = Text::_('COM_GETBIBLE_NO_TRANSLATION_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), $message, 'error');
return; return;
} }
elseif (Factory::_('GetBible.Watcher.Book')->translations($pks)) elseif (GetBibleFactory::_('GetBible.Watcher.Book')->translations($pks))
{ {
// Redirect to the list screen with success. // Redirect to the list screen with success.
$message = array(); $message = array();
$message[] = '<h1>' . JText::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>'; $message[] = '<h1>' . Text::_('COM_GETBIBLE_UPDATE_COMPLETED') . '</h1>';
// get the data to export // get the data to export
if ($number == 1) if ($number == 1)
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_TRANSLATION_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_TRANSLATION_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>';
} }
else else
{ {
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_SELECTED_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>'; $message[] = '<p>' . Text::_('COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_SELECTED_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API') . '</p>';
} }
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), implode('', $message), 'Success'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), implode('', $message), 'Success');
return; return;
} }
} }
else else
{ {
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_BOOK_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); $message = Text::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_BOOK_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), $message, 'error');
return; return;
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER'); $message = Text::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=translations', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_getbible&view=translations', false), $message, 'error');
return; return;
} }
} }

View File

@ -18,8 +18,14 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/** /**
* Verse Form Controller * Verse Form Controller
@ -42,13 +48,13 @@ class GetbibleControllerVerse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
public function __construct($config = array()) public function __construct($config = [])
{ {
$this->view_list = 'Verses'; // safeguard for setting the return view listing to the main view. $this->view_list = 'Verses'; // safeguard for setting the return view listing to the main view.
parent::__construct($config); parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER### }###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
@ -57,10 +63,10 @@ class GetbibleControllerVerse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('verse.access', 'com_getbible'); $access = $user->authorise('verse.access', 'com_getbible');
if (!$access) if (!$access)
@ -82,10 +88,10 @@ class GetbibleControllerVerse extends FormController
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -156,12 +162,12 @@ class GetbibleControllerVerse extends FormController
// set the referral options // set the referral options
if ($refid && $ref) if ($refid && $ref)
{ {
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
} }
elseif ($ref) elseif ($ref)
{ {
$append = '&ref='. (string)$ref . $append; $append = '&ref='. (string) $ref . $append;
} }
return $append; return $append;
@ -178,13 +184,13 @@ class GetbibleControllerVerse extends FormController
*/ */
public function batch($model = null) public function batch($model = null)
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model // Set the model
$model = $this->getModel('Verse', '', array()); $model = $this->getModel('Verse', '', []);
// Preset the redirect // Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=verses' . $this->getRedirectToListAppend(), false)); $this->setRedirect(Route::_('index.php?option=com_getbible&view=verses' . $this->getRedirectToListAppend(), false));
return parent::batch($model); return parent::batch($model);
} }
@ -209,13 +215,13 @@ class GetbibleControllerVerse extends FormController
$cancel = parent::cancel($key); $cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return))) if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{ {
$redirect = base64_decode($return); $redirect = base64_decode($return);
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
@ -226,7 +232,7 @@ class GetbibleControllerVerse extends FormController
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -237,7 +243,7 @@ class GetbibleControllerVerse extends FormController
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -263,7 +269,7 @@ class GetbibleControllerVerse extends FormController
// Check if there is a return value // Check if there is a return value
$return = $this->input->get('return', null, 'base64'); $return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn) if ($this->ref || $this->refid || $canReturn)
{ {
@ -281,29 +287,29 @@ class GetbibleControllerVerse extends FormController
// Redirect to the return value. // Redirect to the return value.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
$redirect, false $redirect, false
) )
); );
} }
elseif ($this->refid && $this->ref) elseif ($this->refid && $this->ref)
{ {
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen. // Redirect to the item screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
} }
elseif ($this->ref) elseif ($this->ref)
{ {
$redirect = '&view=' . (string)$this->ref; $redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen. // Redirect to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . $redirect, false 'index.php?option=' . $this->option . $redirect, false
) )
); );
@ -315,16 +321,15 @@ class GetbibleControllerVerse extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModel &$model The data model object. * @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 11.1 * @since 11.1
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = array()) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
return; return;
} }
} }

View File

@ -18,8 +18,12 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController; use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/** /**
* Verses Admin Controller * Verses Admin Controller

View File

@ -18,8 +18,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// register this component namespace // register additional namespace
spl_autoload_register(function ($class) { \spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix // project-specific base directories and namespace prefix
$search = [ $search = [
'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible', 'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible',
@ -64,27 +64,31 @@ spl_autoload_register(function ($class) {
} }
}); });
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\MVC\Controller\BaseController;
// Access check. // Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_getbible')) if (!Factory::getUser()->authorise('core.manage', 'com_getbible'))
{ {
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}; }
// Add CSS file for all pages // Add CSS file for all pages
JHtml::_('stylesheet', 'components/com_getbible/assets/css/admin.css', ['version' => 'auto']); Html::_('stylesheet', 'components/com_getbible/assets/css/admin.css', ['version' => 'auto']);
JHtml::_('script', 'components/com_getbible/assets/js/admin.js', ['version' => 'auto']); Html::_('script', 'components/com_getbible/assets/js/admin.js', ['version' => 'auto']);
// require helper files // require helper files
JLoader::register('GetbibleHelper', __DIR__ . '/helpers/getbible.php'); JLoader::register('GetbibleHelper', __DIR__ . '/helpers/getbible.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php'); JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
// Get an instance of the controller prefixed by Getbible // Get an instance of the controller prefixed by Getbible
$controller = JControllerLegacy::getInstance('Getbible'); $controller = BaseController::getInstance('Getbible');
// Perform the Request task // Perform the Request task
$controller->execute(JFactory::getApplication()->input->get('task')); $controller->execute(Factory::getApplication()->input->get('task'));
// Redirect if set by the controller // Redirect if set by the controller
$controller->redirect(); $controller->redirect();

View File

@ -18,8 +18,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// register this component namespace // register additional namespace
spl_autoload_register(function ($class) { \spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix // project-specific base directories and namespace prefix
$search = [ $search = [
'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible', 'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible',
@ -64,12 +64,22 @@ spl_autoload_register(function ($class) {
} }
}); });
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Access\Rules as AccessRules;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Language\Language; use Joomla\CMS\Language\Language;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Version;
use Joomla\Registry\Registry; use Joomla\Registry\Registry;
use Joomla\String\StringHelper; use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use VDM\Joomla\GetBible\Factory; use VDM\Joomla\GetBible\Factory as GetBibleFactory;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper; use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GetHelper;
@ -87,7 +97,7 @@ abstract class GetbibleHelper
* *
* @var array * @var array
*/ */
protected static $composer = array(); protected static $composer = [];
/** /**
* The Main Active Language * The Main Active Language
@ -116,7 +126,7 @@ abstract class GetbibleHelper
return; return;
} }
Factory::_('GetBible.Loader')->set($row, $plugin); GetBibleFactory::_('GetBible.Loader')->set($row, $plugin);
} }
/** /**
@ -161,7 +171,7 @@ abstract class GetbibleHelper
// check if set // check if set
if (!ObjectHelper::check(self::$JVersion)) if (!ObjectHelper::check(self::$JVersion))
{ {
self::$JVersion = new JVersion(); self::$JVersion = new Version();
} }
return self::$JVersion; return self::$JVersion;
} }
@ -172,18 +182,18 @@ abstract class GetbibleHelper
public static function getContributors() public static function getContributors()
{ {
// get params // get params
$params = JComponentHelper::getParams('com_getbible'); $params = ComponentHelper::getParams('com_getbible');
// start contributors array // start contributors array
$contributors = array(); $contributors = [];
// get all Contributors (max 20) // get all Contributors (max 20)
$searchArray = range('0','20'); $searchArray = range('0','20');
foreach($searchArray as $nr) foreach($searchArray as $nr)
{ {
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3)) if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3))
{ {
// set link based of selected option // set link based of selected option
if($params->get("useContributor".$nr) == 1) if($params->get("useContributor".$nr) == 1)
{ {
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">'; $link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
$link_back = '</a>'; $link_back = '</a>';
} }
@ -197,8 +207,8 @@ abstract class GetbibleHelper
$link_front = ''; $link_front = '';
$link_back = ''; $link_back = '';
} }
$contributors[$nr]['title'] = UtilitiesStringHelper::html($params->get("titleContributor".$nr)); $contributors[$nr]['title'] = UtilitiesStringHelper::html($params->get("titleContributor".$nr));
$contributors[$nr]['name'] = $link_front.UtilitiesStringHelper::html($params->get("nameContributor".$nr)).$link_back; $contributors[$nr]['name'] = $link_front.UtilitiesStringHelper::html($params->get("nameContributor".$nr)).$link_back;
} }
} }
return $contributors; return $contributors;
@ -218,48 +228,48 @@ abstract class GetbibleHelper
public static function addSubmenu($submenu) public static function addSubmenu($submenu)
{ {
// load user for access menus // load user for access menus
$user = JFactory::getUser(); $user = Factory::getUser();
// load the submenus to sidebar // load the submenus to sidebar
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_DASHBOARD'), 'index.php?option=com_getbible&view=getbible', $submenu === 'getbible'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_DASHBOARD'), 'index.php?option=com_getbible&view=getbible', $submenu === 'getbible');
if ($user->authorise('linker.access', 'com_getbible') && $user->authorise('linker.submenu', 'com_getbible')) if ($user->authorise('linker.access', 'com_getbible') && $user->authorise('linker.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_LINKERS'), 'index.php?option=com_getbible&view=linkers', $submenu === 'linkers'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_LINKERS'), 'index.php?option=com_getbible&view=linkers', $submenu === 'linkers');
} }
if ($user->authorise('note.access', 'com_getbible') && $user->authorise('note.submenu', 'com_getbible')) if ($user->authorise('note.access', 'com_getbible') && $user->authorise('note.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_NOTES'), 'index.php?option=com_getbible&view=notes', $submenu === 'notes'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_NOTES'), 'index.php?option=com_getbible&view=notes', $submenu === 'notes');
} }
if ($user->authorise('tagged_verse.access', 'com_getbible') && $user->authorise('tagged_verse.submenu', 'com_getbible')) if ($user->authorise('tagged_verse.access', 'com_getbible') && $user->authorise('tagged_verse.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_TAGGED_VERSES'), 'index.php?option=com_getbible&view=tagged_verses', $submenu === 'tagged_verses'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_TAGGED_VERSES'), 'index.php?option=com_getbible&view=tagged_verses', $submenu === 'tagged_verses');
} }
if ($user->authorise('prompt.access', 'com_getbible') && $user->authorise('prompt.submenu', 'com_getbible')) if ($user->authorise('prompt.access', 'com_getbible') && $user->authorise('prompt.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_PROMPTS'), 'index.php?option=com_getbible&view=prompts', $submenu === 'prompts'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_PROMPTS'), 'index.php?option=com_getbible&view=prompts', $submenu === 'prompts');
} }
if ($user->authorise('open_ai_response.access', 'com_getbible') && $user->authorise('open_ai_response.submenu', 'com_getbible')) if ($user->authorise('open_ai_response.access', 'com_getbible') && $user->authorise('open_ai_response.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_OPEN_AI_RESPONSES'), 'index.php?option=com_getbible&view=open_ai_responses', $submenu === 'open_ai_responses'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_OPEN_AI_RESPONSES'), 'index.php?option=com_getbible&view=open_ai_responses', $submenu === 'open_ai_responses');
} }
if ($user->authorise('tag.access', 'com_getbible') && $user->authorise('tag.submenu', 'com_getbible')) if ($user->authorise('tag.access', 'com_getbible') && $user->authorise('tag.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_TAGS'), 'index.php?option=com_getbible&view=tags', $submenu === 'tags'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_TAGS'), 'index.php?option=com_getbible&view=tags', $submenu === 'tags');
} }
if ($user->authorise('translation.access', 'com_getbible') && $user->authorise('translation.submenu', 'com_getbible')) if ($user->authorise('translation.access', 'com_getbible') && $user->authorise('translation.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_TRANSLATIONS'), 'index.php?option=com_getbible&view=translations', $submenu === 'translations'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_TRANSLATIONS'), 'index.php?option=com_getbible&view=translations', $submenu === 'translations');
} }
if ($user->authorise('book.access', 'com_getbible') && $user->authorise('book.submenu', 'com_getbible')) if ($user->authorise('book.access', 'com_getbible') && $user->authorise('book.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_BOOKS'), 'index.php?option=com_getbible&view=books', $submenu === 'books'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_BOOKS'), 'index.php?option=com_getbible&view=books', $submenu === 'books');
} }
if ($user->authorise('chapter.access', 'com_getbible') && $user->authorise('chapter.submenu', 'com_getbible')) if ($user->authorise('chapter.access', 'com_getbible') && $user->authorise('chapter.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_CHAPTERS'), 'index.php?option=com_getbible&view=chapters', $submenu === 'chapters'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_CHAPTERS'), 'index.php?option=com_getbible&view=chapters', $submenu === 'chapters');
} }
if ($user->authorise('verse.access', 'com_getbible') && $user->authorise('verse.submenu', 'com_getbible')) if ($user->authorise('verse.access', 'com_getbible') && $user->authorise('verse.submenu', 'com_getbible'))
{ {
JHtmlSidebar::addEntry(JText::_('COM_GETBIBLE_SUBMENU_VERSES'), 'index.php?option=com_getbible&view=verses', $submenu === 'verses'); JHtmlSidebar::addEntry(Text::_('COM_GETBIBLE_SUBMENU_VERSES'), 'index.php?option=com_getbible&view=verses', $submenu === 'verses');
} }
} }
@ -340,7 +350,7 @@ abstract class GetbibleHelper
{ {
$type = 'item'; $type = 'item';
} }
$db = JFactory::getDbo(); $db = Factory::getDbo();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select(array('a.published')); $query->select(array('a.published'));
$query->from('#__getbible_'.$type.' AS a'); $query->from('#__getbible_'.$type.' AS a');
@ -358,7 +368,7 @@ abstract class GetbibleHelper
public static function getGroupName($id) public static function getGroupName($id)
{ {
$db = JFactory::getDBO(); $db = Factory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select(array('a.title')); $query->select(array('a.title'));
$query->from('#__usergroups AS a'); $query->from('#__usergroups AS a');
@ -367,7 +377,7 @@ abstract class GetbibleHelper
$db->execute(); $db->execute();
$found = $db->getNumRows(); $found = $db->getNumRows();
if($found) if($found)
{ {
return $db->loadResult(); return $db->loadResult();
} }
return $id; return $id;
@ -383,7 +393,7 @@ abstract class GetbibleHelper
* @param string $component The target component * @param string $component The target component
* @param object $user The user whose permissions we are loading * @param object $user The user whose permissions we are loading
* *
* @return object The JObject of permission/authorised actions * @return object The CMSObject of permission/authorised actions
* *
*/ */
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'getbible', $user = 'null') public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'getbible', $user = 'null')
@ -392,22 +402,22 @@ abstract class GetbibleHelper
if (!ObjectHelper::check($user)) if (!ObjectHelper::check($user))
{ {
// get the user object // get the user object
$user = JFactory::getUser(); $user = Factory::getUser();
} }
// load the JObject // load the CMSObject
$result = new JObject; $result = new CMSObject;
// make view name safe (just incase) // make view name safe (just incase)
$view = UtilitiesStringHelper::safe($view); $view = UtilitiesStringHelper::safe($view);
if (UtilitiesStringHelper::check($views)) if (UtilitiesStringHelper::check($views))
{ {
$views = UtilitiesStringHelper::safe($views); $views = UtilitiesStringHelper::safe($views);
} }
// get all actions from component // get all actions from component
$actions = JAccess::getActionsFromFile( $actions = Access::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml', JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/" "/access/section[@name='component']/"
); );
// if non found then return empty JObject // if non found then return empty CMSObject
if (empty($actions)) if (empty($actions))
{ {
return $result; return $result;
@ -574,14 +584,14 @@ abstract class GetbibleHelper
/** /**
* Get any component's model * Get any component's model
*/ */
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Getbible', $config = array()) public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Getbible', $config = [])
{ {
// fix the name // fix the name
$name = UtilitiesStringHelper::safe($name); $name = UtilitiesStringHelper::safe($name);
// full path to models // full path to models
$fullPathModels = $path . '/models'; $fullPathModels = $path . '/models';
// load the model file // load the model file
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model'); BaseDatabaseModel::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded // make sure the table path is loaded
if (!isset($config['table_path']) || !UtilitiesStringHelper::check($config['table_path'])) if (!isset($config['table_path']) || !UtilitiesStringHelper::check($config['table_path']))
{ {
@ -589,7 +599,7 @@ abstract class GetbibleHelper
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables'; $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
} }
// get instance // get instance
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config); $model = BaseDatabaseModel::getInstance($name, $Component . 'Model', $config);
// if model not found (strange) // if model not found (strange)
if ($model == false) if ($model == false)
{ {
@ -624,14 +634,14 @@ abstract class GetbibleHelper
*/ */
public static function setAsset($id, $table, $inherit = true) public static function setAsset($id, $table, $inherit = true)
{ {
$parent = JTable::getInstance('Asset'); $parent = Table::getInstance('Asset');
$parent->loadByName('com_getbible'); $parent->loadByName('com_getbible');
$parentId = $parent->id; $parentId = $parent->id;
$name = 'com_getbible.'.$table.'.'.$id; $name = 'com_getbible.'.$table.'.'.$id;
$title = ''; $title = '';
$asset = JTable::getInstance('Asset'); $asset = Table::getInstance('Asset');
$asset->loadByName($name); $asset->loadByName($name);
// Check for an error. // Check for an error.
@ -655,14 +665,14 @@ abstract class GetbibleHelper
$asset->title = $title; $asset->title = $title;
// get the default asset rules // get the default asset rules
$rules = self::getDefaultAssetRules('com_getbible', $table, $inherit); $rules = self::getDefaultAssetRules('com_getbible', $table, $inherit);
if ($rules instanceof JAccessRules) if ($rules instanceof AccessRules)
{ {
$asset->rules = (string) $rules; $asset->rules = (string) $rules;
} }
if (!$asset->check() || !$asset->store()) if (!$asset->check() || !$asset->store())
{ {
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning'); Factory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false; return false;
} }
else else
@ -675,7 +685,7 @@ abstract class GetbibleHelper
$object->asset_id = (int) $asset->id; $object->asset_id = (int) $asset->id;
// Update their asset_id to link to the asset table. // Update their asset_id to link to the asset table.
return JFactory::getDbo()->updateObject('#__getbible_'.$table, $object, 'id'); return Factory::getDbo()->updateObject('#__getbible_'.$table, $object, 'id');
} }
} }
return false; return false;
@ -692,7 +702,7 @@ abstract class GetbibleHelper
if (!$inherit) if (!$inherit)
{ {
// Need to find the asset id by the name of the component. // Need to find the asset id by the name of the component.
$db = JFactory::getDbo(); $db = Factory::getDbo();
$query = $db->getQuery(true) $query = $db->getQuery(true)
->select($db->quoteName('id')) ->select($db->quoteName('id'))
->from($db->quoteName('#__assets')) ->from($db->quoteName('#__assets'))
@ -707,8 +717,8 @@ abstract class GetbibleHelper
} }
} }
// get asset rules // get asset rules
$result = JAccess::getAssetRules($assetId); $result = Access::getAssetRules($assetId);
if ($result instanceof JAccessRules) if ($result instanceof AccessRules)
{ {
$_result = (string) $result; $_result = (string) $result;
$_result = json_decode($_result); $_result = json_decode($_result);
@ -723,7 +733,7 @@ abstract class GetbibleHelper
elseif ($inherit) elseif ($inherit)
{ {
// clear the value since we inherit // clear the value since we inherit
$rule = array(); $rule = [];
} }
} }
// check if there are any view values remaining // check if there are any view values remaining
@ -731,8 +741,8 @@ abstract class GetbibleHelper
{ {
$_result = json_encode($_result); $_result = json_encode($_result);
$_result = array($_result); $_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules. // Instantiate and return the AccessRules object for the asset rules.
$rules = new JAccessRules($_result); $rules = new AccessRules($_result);
// return filtered rules // return filtered rules
return $rules; return $rules;
} }
@ -777,7 +787,7 @@ abstract class GetbibleHelper
* @return null * @return null
* @deprecated 3.3 Use FormHelper::attributes($xml, $attributes); * @deprecated 3.3 Use FormHelper::attributes($xml, $attributes);
*/ */
public static function xmlAddAttributes(&$xml, $attributes = array()) public static function xmlAddAttributes(&$xml, $attributes = [])
{ {
FormHelper::attributes($xml, $attributes); FormHelper::attributes($xml, $attributes);
} }
@ -791,7 +801,7 @@ abstract class GetbibleHelper
* @return void * @return void
* @deprecated 3.3 Use FormHelper::options($xml, $options); * @deprecated 3.3 Use FormHelper::options($xml, $options);
*/ */
public static function xmlAddOptions(&$xml, $options = array()) public static function xmlAddOptions(&$xml, $options = [])
{ {
FormHelper::options($xml, $options); FormHelper::options($xml, $options);
} }
@ -862,7 +872,7 @@ abstract class GetbibleHelper
/** /**
* Check if have an json string * Check if have an json string
* *
* @input string The json string to check * @input string The json string to check
* *
* @returns bool true on success * @returns bool true on success
* @deprecated 3.3 Use JsonHelper::check($string); * @deprecated 3.3 Use JsonHelper::check($string);
@ -875,7 +885,7 @@ abstract class GetbibleHelper
/** /**
* Check if have an object with a length * Check if have an object with a length
* *
* @input object The object to check * @input object The object to check
* *
* @returns bool true on success * @returns bool true on success
* @deprecated 3.3 Use ObjectHelper::check($object); * @deprecated 3.3 Use ObjectHelper::check($object);
@ -888,7 +898,7 @@ abstract class GetbibleHelper
/** /**
* Check if have an array with a length * Check if have an array with a length
* *
* @input array The array to check * @input array The array to check
* *
* @returns bool/int number of items in array on success * @returns bool/int number of items in array on success
* @deprecated 3.3 Use UtilitiesArrayHelper::check($array, $removeEmptyString); * @deprecated 3.3 Use UtilitiesArrayHelper::check($array, $removeEmptyString);
@ -901,7 +911,7 @@ abstract class GetbibleHelper
/** /**
* Check if have a string with a length * Check if have a string with a length
* *
* @input string The string to check * @input string The string to check
* *
* @returns bool true on success * @returns bool true on success
* @deprecated 3.3 Use UtilitiesStringHelper::check($string); * @deprecated 3.3 Use UtilitiesStringHelper::check($string);
@ -921,7 +931,7 @@ abstract class GetbibleHelper
{ {
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
$connected = @fsockopen("www.example.com", 80); $connected = @fsockopen("www.example.com", 80);
// website, port (try 80 or 443) // website, port (try 80 or 443)
if ($connected) if ($connected)
{ {
//action when connected //action when connected
@ -939,7 +949,7 @@ abstract class GetbibleHelper
/** /**
* Merge an array of array's * Merge an array of array's
* *
* @input array The arrays you would like to merge * @input array The arrays you would like to merge
* *
* @returns array on success * @returns array on success
* @deprecated 3.3 Use UtilitiesArrayHelper::merge($arrays); * @deprecated 3.3 Use UtilitiesArrayHelper::merge($arrays);
@ -958,7 +968,7 @@ abstract class GetbibleHelper
/** /**
* Shorten a string * Shorten a string
* *
* @input string The you would like to shorten * @input string The you would like to shorten
* *
* @returns string on success * @returns string on success
* @deprecated 3.3 Use UtilitiesStringHelper::shorten(...); * @deprecated 3.3 Use UtilitiesStringHelper::shorten(...);
@ -971,7 +981,7 @@ abstract class GetbibleHelper
/** /**
* Making strings safe (various ways) * Making strings safe (various ways)
* *
* @input string The you would like to make safe * @input string The you would like to make safe
* *
* @returns string on success * @returns string on success
* @deprecated 3.3 Use UtilitiesStringHelper::safe(...); * @deprecated 3.3 Use UtilitiesStringHelper::safe(...);
@ -990,7 +1000,7 @@ abstract class GetbibleHelper
/** /**
* Convert none English strings to code usable string * Convert none English strings to code usable string
* *
* @input an string * @input an string
* *
* @returns a string * @returns a string
* @deprecated 3.3 Use UtilitiesStringHelper::transliterate($string); * @deprecated 3.3 Use UtilitiesStringHelper::transliterate($string);
@ -1003,7 +1013,7 @@ abstract class GetbibleHelper
/** /**
* make sure a string is HTML save * make sure a string is HTML save
* *
* @input an html string * @input an html string
* *
* @returns a string * @returns a string
* @deprecated 3.3 Use UtilitiesStringHelper::html(...); * @deprecated 3.3 Use UtilitiesStringHelper::html(...);
@ -1021,7 +1031,7 @@ abstract class GetbibleHelper
/** /**
* Convert all int in a string to an English word string * Convert all int in a string to an English word string
* *
* @input an string with numbers * @input an string with numbers
* *
* @returns a string * @returns a string
* @deprecated 3.3 Use UtilitiesStringHelper::numbers($string); * @deprecated 3.3 Use UtilitiesStringHelper::numbers($string);
@ -1035,7 +1045,7 @@ abstract class GetbibleHelper
* Convert an integer into an English word string * Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988> * Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
* *
* @input an int * @input an int
* @returns a string * @returns a string
* @deprecated 3.3 Use UtilitiesStringHelper::number($x); * @deprecated 3.3 Use UtilitiesStringHelper::number($x);
*/ */

View File

@ -18,24 +18,36 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
class getbibleHeaderCheck class getbibleHeaderCheck
{ {
protected $document = null;
protected $app = null;
function js_loaded($script_name) function js_loaded($script_name)
{ {
// UIkit check point // UIkit check point
if (strpos($script_name,'uikit') !== false) if (strpos($script_name,'uikit') !== false)
{ {
$app = JFactory::getApplication(); if (!$this->app)
$getTemplateName = $app->getTemplate('template')->template; {
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false) if (strpos($getTemplateName,'yoo') !== false)
{ {
return true; return true;
} }
} }
$document = JFactory::getDocument(); if (!$this->document)
$head_data = $document->getHeadData(); {
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['scripts']) as $script) foreach (array_keys($head_data['scripts']) as $script)
{ {
if (stristr($script, $script_name)) if (stristr($script, $script_name))
@ -46,24 +58,30 @@ class getbibleHeaderCheck
return false; return false;
} }
function css_loaded($script_name) function css_loaded($script_name)
{ {
// UIkit check point // UIkit check point
if (strpos($script_name,'uikit') !== false) if (strpos($script_name,'uikit') !== false)
{ {
$app = JFactory::getApplication(); if (!$this->app)
$getTemplateName = $app->getTemplate('template')->template; {
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false) if (strpos($getTemplateName,'yoo') !== false)
{ {
return true; return true;
} }
} }
$document = JFactory::getDocument(); if (!$this->document)
$head_data = $document->getHeadData(); {
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['styleSheets']) as $script) foreach (array_keys($head_data['styleSheets']) as $script)
{ {
if (stristr($script, $script_name)) if (stristr($script, $script_name))
@ -74,4 +92,4 @@ class getbibleHeaderCheck
return false; return false;
} }
} }

View File

@ -31,7 +31,7 @@ abstract class JHtmlBatch_
* @var array * @var array
* @since 3.0 * @since 3.0
*/ */
protected static $ListSelection = array(); protected static $ListSelection = [];
/** /**
* Render the batch selection options. * Render the batch selection options.

View File

@ -1,7 +1,7 @@
COM_GETBIBLE="Get Bible" COM_GETBIBLE="Get Bible"
COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated." COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated."
COM_GETBIBLE_ACCESS_REVOKED="Access revoked." COM_GETBIBLE_ACCESS_REVOKED="Access revoked."
COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER="All is good, please check again later"
COM_GETBIBLE_ALL_TRANSLATIONS="All Translations" COM_GETBIBLE_ALL_TRANSLATIONS="All Translations"
COM_GETBIBLE_ALL_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="All translations were successfully updated, and they are now in sync with the getBible API." COM_GETBIBLE_ALL_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="All translations were successfully updated, and they are now in sync with the getBible API."
COM_GETBIBLE_ARCHIVED="Archived" COM_GETBIBLE_ARCHIVED="Archived"
@ -70,6 +70,7 @@ COM_GETBIBLE_BOOK_CREATED_DATE_DESC="The date this Book was created."
COM_GETBIBLE_BOOK_CREATED_DATE_LABEL="Created Date" COM_GETBIBLE_BOOK_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_BOOK_DETAILS="Details" COM_GETBIBLE_BOOK_DETAILS="Details"
COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS="Another Book has the same alias." COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS="Another Book has the same alias."
COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Book has the same alias ."
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS="Book Force Hash Check Button Access" COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS="Book Force Hash Check Button Access"
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC="Allows the users in this group to access the force hash check button." COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC="Allows the users in this group to access the force hash check button."
COM_GETBIBLE_BOOK_ID="Id" COM_GETBIBLE_BOOK_ID="Id"
@ -163,6 +164,7 @@ COM_GETBIBLE_CHAPTER_CREATED_DATE_DESC="The date this Chapter was created."
COM_GETBIBLE_CHAPTER_CREATED_DATE_LABEL="Created Date" COM_GETBIBLE_CHAPTER_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_CHAPTER_DETAILS="Details" COM_GETBIBLE_CHAPTER_DETAILS="Details"
COM_GETBIBLE_CHAPTER_ERROR_UNIQUE_ALIAS="Another Chapter has the same alias." COM_GETBIBLE_CHAPTER_ERROR_UNIQUE_ALIAS="Another Chapter has the same alias."
COM_GETBIBLE_CHAPTER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Chapter has the same alias ."
COM_GETBIBLE_CHAPTER_ID="Id" COM_GETBIBLE_CHAPTER_ID="Id"
COM_GETBIBLE_CHAPTER_MODIFIED_BY_DESC="The last user that modified this Chapter." COM_GETBIBLE_CHAPTER_MODIFIED_BY_DESC="The last user that modified this Chapter."
COM_GETBIBLE_CHAPTER_MODIFIED_BY_LABEL="Modified By" COM_GETBIBLE_CHAPTER_MODIFIED_BY_LABEL="Modified By"
@ -684,6 +686,7 @@ COM_GETBIBLE_LINKER_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_LINKER_DETAILS="Details" COM_GETBIBLE_LINKER_DETAILS="Details"
COM_GETBIBLE_LINKER_EDIT="Editing the Linker" COM_GETBIBLE_LINKER_EDIT="Editing the Linker"
COM_GETBIBLE_LINKER_ERROR_UNIQUE_ALIAS="Another Linker has the same alias." COM_GETBIBLE_LINKER_ERROR_UNIQUE_ALIAS="Another Linker has the same alias."
COM_GETBIBLE_LINKER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Linker has the same alias ."
COM_GETBIBLE_LINKER_GUID_DESCRIPTION="Globally Unique Identifier" COM_GETBIBLE_LINKER_GUID_DESCRIPTION="Globally Unique Identifier"
COM_GETBIBLE_LINKER_GUID_HINT="Auto Generated" COM_GETBIBLE_LINKER_GUID_HINT="Auto Generated"
COM_GETBIBLE_LINKER_GUID_LABEL="GUID" COM_GETBIBLE_LINKER_GUID_LABEL="GUID"
@ -788,6 +791,7 @@ COM_GETBIBLE_NOTE_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_NOTE_DETAILS="Details" COM_GETBIBLE_NOTE_DETAILS="Details"
COM_GETBIBLE_NOTE_EDIT="Editing the Note" COM_GETBIBLE_NOTE_EDIT="Editing the Note"
COM_GETBIBLE_NOTE_ERROR_UNIQUE_ALIAS="Another Note has the same alias." COM_GETBIBLE_NOTE_ERROR_UNIQUE_ALIAS="Another Note has the same alias."
COM_GETBIBLE_NOTE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Note has the same alias ."
COM_GETBIBLE_NOTE_GUID_DESCRIPTION="Globally Unique Identifier" COM_GETBIBLE_NOTE_GUID_DESCRIPTION="Globally Unique Identifier"
COM_GETBIBLE_NOTE_GUID_HINT="Auto Generated" COM_GETBIBLE_NOTE_GUID_HINT="Auto Generated"
COM_GETBIBLE_NOTE_GUID_LABEL="GUID" COM_GETBIBLE_NOTE_GUID_LABEL="GUID"
@ -884,6 +888,7 @@ COM_GETBIBLE_OPEN_AI_MESSAGE_CREATED_DATE_DESC="The date this Open AI Message wa
COM_GETBIBLE_OPEN_AI_MESSAGE_CREATED_DATE_LABEL="Created Date" COM_GETBIBLE_OPEN_AI_MESSAGE_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_OPEN_AI_MESSAGE_EDIT="Editing the Open AI Message" COM_GETBIBLE_OPEN_AI_MESSAGE_EDIT="Editing the Open AI Message"
COM_GETBIBLE_OPEN_AI_MESSAGE_ERROR_UNIQUE_ALIAS="Another Open AI Message has the same alias." COM_GETBIBLE_OPEN_AI_MESSAGE_ERROR_UNIQUE_ALIAS="Another Open AI Message has the same alias."
COM_GETBIBLE_OPEN_AI_MESSAGE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Open AI Message has the same alias ."
COM_GETBIBLE_OPEN_AI_MESSAGE_FUNCTION="function" COM_GETBIBLE_OPEN_AI_MESSAGE_FUNCTION="function"
COM_GETBIBLE_OPEN_AI_MESSAGE_ID="Id" COM_GETBIBLE_OPEN_AI_MESSAGE_ID="Id"
COM_GETBIBLE_OPEN_AI_MESSAGE_INDEX_DESCRIPTION="Message index" COM_GETBIBLE_OPEN_AI_MESSAGE_INDEX_DESCRIPTION="Message index"
@ -1025,6 +1030,7 @@ COM_GETBIBLE_OPEN_AI_RESPONSE_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_OPEN_AI_RESPONSE_DETAILS="Details" COM_GETBIBLE_OPEN_AI_RESPONSE_DETAILS="Details"
COM_GETBIBLE_OPEN_AI_RESPONSE_EDIT="Editing the Open AI Response" COM_GETBIBLE_OPEN_AI_RESPONSE_EDIT="Editing the Open AI Response"
COM_GETBIBLE_OPEN_AI_RESPONSE_ERROR_UNIQUE_ALIAS="Another Open AI Response has the same alias." COM_GETBIBLE_OPEN_AI_RESPONSE_ERROR_UNIQUE_ALIAS="Another Open AI Response has the same alias."
COM_GETBIBLE_OPEN_AI_RESPONSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Open AI Response has the same alias ."
COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text" COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text"
COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_LABEL="Frequency Penalty" COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_LABEL="Frequency Penalty"
COM_GETBIBLE_OPEN_AI_RESPONSE_GPT35TURBO="gpt-3.5-turbo" COM_GETBIBLE_OPEN_AI_RESPONSE_GPT35TURBO="gpt-3.5-turbo"
@ -1157,6 +1163,7 @@ COM_GETBIBLE_PASSWORD_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_PASSWORD_DETAILS="Details" COM_GETBIBLE_PASSWORD_DETAILS="Details"
COM_GETBIBLE_PASSWORD_EDIT="Editing the Password" COM_GETBIBLE_PASSWORD_EDIT="Editing the Password"
COM_GETBIBLE_PASSWORD_ERROR_UNIQUE_ALIAS="Another Password has the same alias." COM_GETBIBLE_PASSWORD_ERROR_UNIQUE_ALIAS="Another Password has the same alias."
COM_GETBIBLE_PASSWORD_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Password has the same alias ."
COM_GETBIBLE_PASSWORD_GUID_DESCRIPTION="Globally Unique Identifier" COM_GETBIBLE_PASSWORD_GUID_DESCRIPTION="Globally Unique Identifier"
COM_GETBIBLE_PASSWORD_GUID_HINT="Auto Generated" COM_GETBIBLE_PASSWORD_GUID_HINT="Auto Generated"
COM_GETBIBLE_PASSWORD_GUID_LABEL="GUID" COM_GETBIBLE_PASSWORD_GUID_LABEL="GUID"
@ -1182,7 +1189,7 @@ COM_GETBIBLE_PASSWORD_STATUS="Status"
COM_GETBIBLE_PASSWORD_TO_SHORT_USE_A_LONGER_PASSWORD="Password to short, use a longer password." COM_GETBIBLE_PASSWORD_TO_SHORT_USE_A_LONGER_PASSWORD="Password to short, use a longer password."
COM_GETBIBLE_PASSWORD_VERSION_DESC="A count of the number of times this Password has been revised." COM_GETBIBLE_PASSWORD_VERSION_DESC="A count of the number of times this Password has been revised."
COM_GETBIBLE_PASSWORD_VERSION_LABEL="Version" COM_GETBIBLE_PASSWORD_VERSION_LABEL="Version"
COM_GETBIBLE_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." COM_GETBIBLE_PLEASE_CHECK_AGAIN_LATER="Please check again later"
COM_GETBIBLE_PROMPT="Prompt" COM_GETBIBLE_PROMPT="Prompt"
COM_GETBIBLE_PROMPTS="Prompts" COM_GETBIBLE_PROMPTS="Prompts"
COM_GETBIBLE_PROMPTS_ACCESS="Prompts Access" COM_GETBIBLE_PROMPTS_ACCESS="Prompts Access"
@ -1306,6 +1313,7 @@ COM_GETBIBLE_PROMPT_CREATED_DATE_DESC="The date this Prompt was created."
COM_GETBIBLE_PROMPT_CREATED_DATE_LABEL="Created Date" COM_GETBIBLE_PROMPT_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_PROMPT_EDIT="Editing the Prompt" COM_GETBIBLE_PROMPT_EDIT="Editing the Prompt"
COM_GETBIBLE_PROMPT_ERROR_UNIQUE_ALIAS="Another Prompt has the same alias." COM_GETBIBLE_PROMPT_ERROR_UNIQUE_ALIAS="Another Prompt has the same alias."
COM_GETBIBLE_PROMPT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Prompt has the same alias ."
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text" COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text"
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_LABEL="Frequency Penalty" COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_LABEL="Frequency Penalty"
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_NOTE_DESCRIPTION="<p>The &quot;frequency_penalty&quot; is another optional parameter that defaults to 0. This is also a value between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</p><ul> <li>For example, a high frequency penalty discourages the model from excessively repeating the same words or phrases, encouraging it to produce more diverse and creative text.</li></ul>" COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_NOTE_DESCRIPTION="<p>The &quot;frequency_penalty&quot; is another optional parameter that defaults to 0. This is also a value between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</p><ul> <li>For example, a high frequency penalty discourages the model from excessively repeating the same words or phrases, encouraging it to produce more diverse and creative text.</li></ul>"
@ -1511,6 +1519,7 @@ COM_GETBIBLE_TAGGED_VERSE_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_TAGGED_VERSE_DETAILS="Details" COM_GETBIBLE_TAGGED_VERSE_DETAILS="Details"
COM_GETBIBLE_TAGGED_VERSE_EDIT="Editing the Tagged Verse" COM_GETBIBLE_TAGGED_VERSE_EDIT="Editing the Tagged Verse"
COM_GETBIBLE_TAGGED_VERSE_ERROR_UNIQUE_ALIAS="Another Tagged Verse has the same alias." COM_GETBIBLE_TAGGED_VERSE_ERROR_UNIQUE_ALIAS="Another Tagged Verse has the same alias."
COM_GETBIBLE_TAGGED_VERSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tagged Verse has the same alias ."
COM_GETBIBLE_TAGGED_VERSE_GUID_DESCRIPTION="Globally Unique Identifier" COM_GETBIBLE_TAGGED_VERSE_GUID_DESCRIPTION="Globally Unique Identifier"
COM_GETBIBLE_TAGGED_VERSE_GUID_HINT="Auto Generated" COM_GETBIBLE_TAGGED_VERSE_GUID_HINT="Auto Generated"
COM_GETBIBLE_TAGGED_VERSE_GUID_LABEL="GUID" COM_GETBIBLE_TAGGED_VERSE_GUID_LABEL="GUID"
@ -1602,6 +1611,7 @@ COM_GETBIBLE_TAG_DESCRIPTION_LABEL="Description"
COM_GETBIBLE_TAG_DETAILS="Details" COM_GETBIBLE_TAG_DETAILS="Details"
COM_GETBIBLE_TAG_EDIT="Editing the Tag" COM_GETBIBLE_TAG_EDIT="Editing the Tag"
COM_GETBIBLE_TAG_ERROR_UNIQUE_ALIAS="Another Tag has the same alias." COM_GETBIBLE_TAG_ERROR_UNIQUE_ALIAS="Another Tag has the same alias."
COM_GETBIBLE_TAG_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tag has the same alias ."
COM_GETBIBLE_TAG_FOUND_BUT_COULD_NOT_BE_REACTIVATED="Tag found, but could not be reactivated." COM_GETBIBLE_TAG_FOUND_BUT_COULD_NOT_BE_REACTIVATED="Tag found, but could not be reactivated."
COM_GETBIBLE_TAG_GUID_DESCRIPTION="Globally Unique Identifier" COM_GETBIBLE_TAG_GUID_DESCRIPTION="Globally Unique Identifier"
COM_GETBIBLE_TAG_GUID_HINT="Auto Generated" COM_GETBIBLE_TAG_GUID_HINT="Auto Generated"
@ -1782,6 +1792,7 @@ COM_GETBIBLE_TRANSLATION_ENCODING_DESCRIPTION="Enter some encoding"
COM_GETBIBLE_TRANSLATION_ENCODING_LABEL="Encoding" COM_GETBIBLE_TRANSLATION_ENCODING_LABEL="Encoding"
COM_GETBIBLE_TRANSLATION_ENCODING_MESSAGE="Error! Please add some encoding here." COM_GETBIBLE_TRANSLATION_ENCODING_MESSAGE="Error! Please add some encoding here."
COM_GETBIBLE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Translation has the same alias." COM_GETBIBLE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Translation has the same alias."
COM_GETBIBLE_TRANSLATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Translation has the same alias ."
COM_GETBIBLE_TRANSLATION_ID="Id" COM_GETBIBLE_TRANSLATION_ID="Id"
COM_GETBIBLE_TRANSLATION_LANGUAGE_DESCRIPTION="The translation language." COM_GETBIBLE_TRANSLATION_LANGUAGE_DESCRIPTION="The translation language."
COM_GETBIBLE_TRANSLATION_LANGUAGE_HINT="English" COM_GETBIBLE_TRANSLATION_LANGUAGE_HINT="English"
@ -1909,6 +1920,7 @@ COM_GETBIBLE_VERSE_CREATED_DATE_DESC="The date this Verse was created."
COM_GETBIBLE_VERSE_CREATED_DATE_LABEL="Created Date" COM_GETBIBLE_VERSE_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_VERSE_DETAILS="Details" COM_GETBIBLE_VERSE_DETAILS="Details"
COM_GETBIBLE_VERSE_ERROR_UNIQUE_ALIAS="Another Verse has the same alias." COM_GETBIBLE_VERSE_ERROR_UNIQUE_ALIAS="Another Verse has the same alias."
COM_GETBIBLE_VERSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Verse has the same alias ."
COM_GETBIBLE_VERSE_ID="Id" COM_GETBIBLE_VERSE_ID="Id"
COM_GETBIBLE_VERSE_MODIFIED_BY_DESC="The last user that modified this Verse." COM_GETBIBLE_VERSE_MODIFIED_BY_DESC="The last user that modified this Verse."
COM_GETBIBLE_VERSE_MODIFIED_BY_LABEL="Modified By" COM_GETBIBLE_VERSE_MODIFIED_BY_LABEL="Modified By"

View File

@ -18,6 +18,7 @@
// No direct access to this file // No direct access to this file
defined('JPATH_BASE') or die; defined('JPATH_BASE') or die;
use Joomla\CMS\Language\Text;
JHtmlBehavior::core(); JHtmlBehavior::core();
$divWrapper = range(1,120,2); $divWrapper = range(1,120,2);
$counter = 0; $counter = 0;
@ -25,8 +26,8 @@ $counter = 0;
<?php if ($displayData->ListSelection) : ?> <?php if ($displayData->ListSelection) : ?>
<div class="row-fluid"> <div class="row-fluid">
<?php foreach ($displayData->ListSelection as $ListSelection) : ?> <?php foreach ($displayData->ListSelection as $ListSelection) : ?>
<div class="control-group span6"> <div class="control-group span6">
<div class="controls"> <div class="controls">
<label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label> <label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label>
<select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small"> <select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small">
<?php if (!$ListSelection['noDefault']) : ?> <?php if (!$ListSelection['noDefault']) : ?>
@ -34,21 +35,21 @@ $counter = 0;
<?php endif; ?> <?php endif; ?>
<?php echo $ListSelection['options']; ?> <?php echo $ListSelection['options']; ?>
</select> </select>
</div> </div>
</div> </div>
<?php if (in_array($counter,$divWrapper)) : ?> <?php if (in_array($counter,$divWrapper)) : ?>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<?php endif; ?> <?php endif; ?>
<?php $counter++; ?> <?php $counter++; ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<div class="control-group radio" id="batch-move-copy"> <div class="control-group radio" id="batch-move-copy">
<div class="controls"> <div class="controls">
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c"> <label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo JText::_('Copy'); ?></label> <input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo Text::_('Copy'); ?></label>
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m"> <label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo JText::_('Update'); ?></label> <input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo Text::_('Update'); ?></label>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'nr' 'nr'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'abbreviation' 'abbreviation'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'sha' 'sha'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'book_nr' 'book_nr'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'abbreviation' 'abbreviation'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'sha' 'sha'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'name' 'name'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'public_tagged_verses' 'public_tagged_verses'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'public_notes' 'public_notes'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -18,22 +18,27 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
// set the defaults // set the defaults
$items = $displayData->vvwnotes; $items = $displayData->vvwnotes;
$user = JFactory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_getbible&view=notes&task=note.edit"; $edit = "index.php?option=com_getbible&view=notes&task=note.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (GetbibleHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -53,8 +58,8 @@ $can = GetbibleHelper::getActions('note');
<div class="form-vertical"> <div class="form-vertical">
<?php if ($can->get('note.create')): ?> <?php if ($can->get('note.create')): ?>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_GETBIBLE_NEW'); ?></a> <a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_GETBIBLE_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText::_('COM_GETBIBLE_CLOSE_NEW'); ?></a> <a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br /> </div><br /><br />
<?php endif; ?> <?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?> <?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,19 +67,19 @@ $can = GetbibleHelper::getActions('note');
<thead> <thead>
<tr> <tr>
<th data-type="html" data-sort-use="text"> <th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_NOTE_BOOK_NR_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_NOTE_BOOK_NR_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_NOTE_LINKER_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_NOTE_LINKER_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_NOTE_ACCESS_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_NOTE_ACCESS_LABEL'); ?>
</th> </th>
<th width="10" data-breakpoints="xs sm md"> <th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_NOTE_STATUS'); ?> <?php echo Text::_('COM_GETBIBLE_NOTE_STATUS'); ?>
</th> </th>
<th width="5" data-type="number" data-breakpoints="xs sm md"> <th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_NOTE_ID'); ?> <?php echo Text::_('COM_GETBIBLE_NOTE_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -82,7 +87,7 @@ $can = GetbibleHelper::getActions('note');
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = GetbibleHelper::getActions('note',$item,'notes'); $canDo = GetbibleHelper::getActions('note',$item,'notes');
?> ?>
<tr> <tr>
@ -90,7 +95,7 @@ $can = GetbibleHelper::getActions('note');
<?php if ($canDo->get('note.edit')): ?> <?php if ($canDo->get('note.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->book_nr); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->book_nr); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'notes.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'notes.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->book_nr); ?> <?php echo $displayData->escape($item->book_nr); ?>
@ -100,30 +105,30 @@ $can = GetbibleHelper::getActions('note');
<?php echo $displayData->escape($item->linker_name); ?> <?php echo $displayData->escape($item->linker_name); ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->access); ?> <?php echo Text::_($item->access); ?>
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1"> <td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?> <?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2"> <td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?> <?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3"> <td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?> <?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4"> <td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?> <?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -136,7 +141,7 @@ $can = GetbibleHelper::getActions('note');
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -18,22 +18,27 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
// set the defaults // set the defaults
$items = $displayData->vvxpasswords; $items = $displayData->vvxpasswords;
$user = JFactory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_getbible&view=passwords&task=password.edit"; $edit = "index.php?option=com_getbible&view=passwords&task=password.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (GetbibleHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -53,8 +58,8 @@ $can = GetbibleHelper::getActions('password');
<div class="form-vertical"> <div class="form-vertical">
<?php if ($can->get('password.create')): ?> <?php if ($can->get('password.create')): ?>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_GETBIBLE_NEW'); ?></a> <a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_GETBIBLE_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText::_('COM_GETBIBLE_CLOSE_NEW'); ?></a> <a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br /> </div><br /><br />
<?php endif; ?> <?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?> <?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,19 +67,19 @@ $can = GetbibleHelper::getActions('password');
<thead> <thead>
<tr> <tr>
<th data-type="html" data-sort-use="text"> <th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_NAME_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_PASSWORD_NAME_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_LINKER_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_PASSWORD_LINKER_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_GUID_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_PASSWORD_GUID_LABEL'); ?>
</th> </th>
<th width="10" data-breakpoints="xs sm md"> <th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_STATUS'); ?> <?php echo Text::_('COM_GETBIBLE_PASSWORD_STATUS'); ?>
</th> </th>
<th width="5" data-type="number" data-breakpoints="xs sm md"> <th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_ID'); ?> <?php echo Text::_('COM_GETBIBLE_PASSWORD_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -82,7 +87,7 @@ $can = GetbibleHelper::getActions('password');
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = GetbibleHelper::getActions('password',$item,'passwords'); $canDo = GetbibleHelper::getActions('password',$item,'passwords');
?> ?>
<tr> <tr>
@ -90,7 +95,7 @@ $can = GetbibleHelper::getActions('password');
<?php if ($canDo->get('password.edit')): ?> <?php if ($canDo->get('password.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'passwords.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'passwords.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->name); ?> <?php echo $displayData->escape($item->name); ?>
@ -104,26 +109,26 @@ $can = GetbibleHelper::getActions('password');
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1"> <td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?> <?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2"> <td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?> <?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3"> <td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?> <?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4"> <td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?> <?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -136,7 +141,7 @@ $can = GetbibleHelper::getActions('password');
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -18,22 +18,27 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
// set the defaults // set the defaults
$items = $displayData->vvvtags; $items = $displayData->vvvtags;
$user = JFactory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_getbible&view=tagged_verses&task=tagged_verse.edit"; $edit = "index.php?option=com_getbible&view=tagged_verses&task=tagged_verse.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (GetbibleHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=linker&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -53,8 +58,8 @@ $can = GetbibleHelper::getActions('tagged_verse');
<div class="form-vertical"> <div class="form-vertical">
<?php if ($can->get('tagged_verse.create')): ?> <?php if ($can->get('tagged_verse.create')): ?>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_GETBIBLE_NEW'); ?></a> <a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_GETBIBLE_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText::_('COM_GETBIBLE_CLOSE_NEW'); ?></a> <a class="btn btn-small" onclick="Joomla.submitbutton('linker.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br /> </div><br /><br />
<?php endif; ?> <?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?> <?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,25 +67,25 @@ $can = GetbibleHelper::getActions('tagged_verse');
<thead> <thead>
<tr> <tr>
<th data-type="html" data-sort-use="text"> <th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSES_REFERENCE'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSES_REFERENCE'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_ABBREVIATION_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_ABBREVIATION_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_ACCESS_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_ACCESS_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_LINKER_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_LINKER_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_TAG_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_TAG_LABEL'); ?>
</th> </th>
<th width="10" data-breakpoints="xs sm md"> <th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_STATUS'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_STATUS'); ?>
</th> </th>
<th width="5" data-type="number" data-breakpoints="xs sm md"> <th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_TAGGED_VERSE_ID'); ?> <?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -88,7 +93,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = GetbibleHelper::getActions('tagged_verse',$item,'tagged_verses'); $canDo = GetbibleHelper::getActions('tagged_verse',$item,'tagged_verses');
?> ?>
<tr> <tr>
@ -96,7 +101,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?php if ($canDo->get('tagged_verse.edit')): ?> <?php if ($canDo->get('tagged_verse.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->book_nr); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->book_nr); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'tagged_verses.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'tagged_verses.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->book_nr); ?> <?php echo $displayData->escape($item->book_nr); ?>
@ -110,7 +115,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->access); ?> <?php echo Text::_($item->access); ?>
</td> </td>
<td> <td>
<?php echo $displayData->escape($item->linker_name); ?> <?php echo $displayData->escape($item->linker_name); ?>
@ -124,26 +129,26 @@ $can = GetbibleHelper::getActions('tagged_verse');
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1"> <td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?> <?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2"> <td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?> <?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3"> <td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?> <?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4"> <td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?> <?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -156,7 +161,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'linker' 'linker'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'verse' 'verse'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'note' 'note'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'prompt' 'prompt'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'content' 'content'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'index' 'index'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'name' 'name'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -38,7 +38,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'book' 'book'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -38,7 +38,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'selected_word' 'selected_word'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'prompt' 'prompt'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'response_created' 'response_created'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'total_tokens' 'total_tokens'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -18,22 +18,27 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
// set the defaults // set the defaults
$items = $displayData->vvymessage; $items = $displayData->vvymessage;
$user = JFactory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_getbible&view=open_ai_messages&task=open_ai_message.edit"; $edit = "index.php?option=com_getbible&view=open_ai_messages&task=open_ai_message.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_getbible&view=open_ai_response&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_getbible&view=open_ai_response&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (GetbibleHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=open_ai_response&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=open_ai_response&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -50,22 +55,22 @@ else
<thead> <thead>
<tr> <tr>
<th data-type="html" data-sort-use="text"> <th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_ROLE_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_ROLE_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_OPEN_AI_RESPONSE_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_OPEN_AI_RESPONSE_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PROMPT_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PROMPT_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_SOURCE_LABEL'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_SOURCE_LABEL'); ?>
</th> </th>
<th width="10" data-breakpoints="xs sm md"> <th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_STATUS'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_STATUS'); ?>
</th> </th>
<th width="5" data-type="number" data-breakpoints="xs sm md"> <th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_OPEN_AI_MESSAGE_ID'); ?> <?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -73,18 +78,18 @@ else
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = GetbibleHelper::getActions('open_ai_message',$item,'open_ai_messages'); $canDo = GetbibleHelper::getActions('open_ai_message',$item,'open_ai_messages');
?> ?>
<tr> <tr>
<td> <td>
<?php if ($canDo->get('open_ai_message.edit')): ?> <?php if ($canDo->get('open_ai_message.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo JText::_($item->role); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo Text::_($item->role); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'open_ai_messages.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'open_ai_messages.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo JText::_($item->role); ?> <?php echo Text::_($item->role); ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
@ -98,30 +103,30 @@ else
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->source); ?> <?php echo Text::_($item->source); ?>
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1"> <td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?> <?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2"> <td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?> <?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3"> <td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?> <?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4"> <td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?> <?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -134,7 +139,7 @@ else
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'top_p' 'top_p'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -38,7 +38,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'n' 'n'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'linker' 'linker'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'name' 'name'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'password' 'password'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -17,6 +17,11 @@
// No direct access to this file // No direct access to this file
defined('JPATH_BASE') or die('Restricted access'); defined('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use VDM\Joomla\Utilities\Component\Helper; use VDM\Joomla\Utilities\Component\Helper;
// get the form // get the form
@ -67,7 +72,7 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php endforeach; ?> <?php endforeach; ?>
<?php else: ?> <?php else: ?>
<div class="alert alert-info"> <div class="alert alert-info">
<h4><?php echo JText::_('COM_GETBIBLE_OPEN_AI_DISABLED'); ?></h4> <h4><?php echo Text::_('COM_GETBIBLE_OPEN_AI_DISABLED'); ?></h4>
<p><?php echo JText::_('COM_GETBIBLE_YOU_WILL_HAVE_TO_ENABLE_OPEN_AI_IN_THE_GLOBAL_OPTIONS_OF_YOUR_COMPONENT_SINCE_IT_IS_CURRENTLY_DISABLED'); ?></p> <p><?php echo Text::_('COM_GETBIBLE_YOU_WILL_HAVE_TO_ENABLE_OPEN_AI_IN_THE_GLOBAL_OPTIONS_OF_YOUR_COMPONENT_SINCE_IT_IS_CURRENTLY_DISABLED'); ?></p>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -17,6 +17,11 @@
// No direct access to this file // No direct access to this file
defined('JPATH_BASE') or die('Restricted access'); defined('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use VDM\Joomla\Utilities\Component\Helper; use VDM\Joomla\Utilities\Component\Helper;
// get the form // get the form

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'abbreviation' 'abbreviation'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -38,7 +38,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'messages' 'messages'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'cache_advance_note' 'cache_advance_note'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -38,7 +38,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'response_retrieval_note' 'response_retrieval_note'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'linker' 'linker'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -35,7 +35,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'name' 'name'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -37,7 +37,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'linker' 'linker'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'book_nr' 'book_nr'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -36,7 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'verse' 'verse'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -40,7 +40,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

View File

@ -39,7 +39,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>

Some files were not shown because too many files have changed in this diff Show More