Stable release of v2.1.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 2023-12-23 18:05:05 +02:00
parent d94111f66c
commit 8d583feb3f
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
416 changed files with 6447 additions and 4666 deletions

View File

@ -1,3 +1,20 @@
# v2.1.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
- Fixed other search related issues.

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.32)
# Get Bible (2.1.0)
![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)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 4th December, 2023
+ *Version*: 2.0.32
+ *Last Build*: 23rd December, 2023
+ *Version*: 2.1.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**561 Hours** or **70 Eight Hour Days** (actual time the author saved -
**566 Hours** or **71 Eight Hour Days** (actual time the author saved -
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**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **200979**
+ *File count*: **1744**
+ *Line count*: **202968**
+ *File count*: **1745**
+ *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
**374 Hours** or **47 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @140hours** = codingtime / 4;
> **planning @80hours** = codingtime / 7;
> **mapping @56hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;)
> **debugging @142hours** = codingtime / 4;
> **planning @81hours** = codingtime / 7;
> **mapping @57hours** = codingtime / 10;
> **office @94hours** = codingtime / 6;)
**931 Hours** or **116 Eight Hour Days**
**940 Hours** or **118 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **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).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.32)
# Get Bible (2.1.0)
![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)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 4th December, 2023
+ *Version*: 2.0.32
+ *Last Build*: 23rd December, 2023
+ *Version*: 2.1.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**561 Hours** or **70 Eight Hour Days** (actual time the author saved -
**566 Hours** or **71 Eight Hour Days** (actual time the author saved -
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**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **200979**
+ *File count*: **1744**
+ *Line count*: **202968**
+ *File count*: **1745**
+ *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
**374 Hours** or **47 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @140hours** = codingtime / 4;
> **planning @80hours** = codingtime / 7;
> **mapping @56hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;)
> **debugging @142hours** = codingtime / 4;
> **planning @81hours** = codingtime / 7;
> **mapping @57hours** = codingtime / 10;
> **office @94hours** = codingtime / 6;)
**931 Hours** or **116 Eight Hour Days**
**940 Hours** or **118 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **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).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -20,6 +20,10 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
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
@ -35,7 +39,7 @@ class GetbibleController extends BaseController
*
* @since 3.0
*/
public function __construct($config = array())
public function __construct($config = [])
{
// set the default view
$config['default_view'] = 'getbible';
@ -57,32 +61,32 @@ class GetbibleController extends BaseController
$id = $this->input->getInt('id');
// 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))
{
// 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');
// check if item was opend from other then its own list view
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
// set redirect
if ($refid > 0 && GetbibleHelper::checkString($ref))
if ($refid > 0 && StringHelper::check($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
$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
{
// 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;
@ -95,7 +99,7 @@ class GetbibleController extends BaseController
protected function getViewRelation($view)
{
// check the we have a value
if (GetbibleHelper::checkString($view))
if (StringHelper::check($view))
{
// the view relationships
$views = array(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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.
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
JHtml::_('stylesheet', 'components/com_getbible/assets/css/admin.css', ['version' => 'auto']);
JHtml::_('script', 'components/com_getbible/assets/js/admin.js', ['version' => 'auto']);
Html::_('stylesheet', 'components/com_getbible/assets/css/admin.css', ['version' => 'auto']);
Html::_('script', 'components/com_getbible/assets/js/admin.js', ['version' => 'auto']);
// require helper files
JLoader::register('GetbibleHelper', __DIR__ . '/helpers/getbible.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
// Get an instance of the controller prefixed by Getbible
$controller = JControllerLegacy::getInstance('Getbible');
$controller = BaseController::getInstance('Getbible');
// Perform the Request task
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->execute(Factory::getApplication()->input->get('task'));
// Redirect if set by the controller
$controller->redirect();

View File

@ -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\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\String\StringHelper;
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\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
@ -87,7 +97,7 @@ abstract class GetbibleHelper
*
* @var array
*/
protected static $composer = array();
protected static $composer = [];
/**
* The Main Active Language
@ -116,7 +126,7 @@ abstract class GetbibleHelper
return;
}
Factory::_('GetBible.Loader')->set($row, $plugin);
GetBibleFactory::_('GetBible.Loader')->set($row, $plugin);
}
/**
@ -161,7 +171,7 @@ abstract class GetbibleHelper
// check if set
if (!ObjectHelper::check(self::$JVersion))
{
self::$JVersion = new JVersion();
self::$JVersion = new Version();
}
return self::$JVersion;
}
@ -172,9 +182,9 @@ abstract class GetbibleHelper
public static function getContributors()
{
// get params
$params = JComponentHelper::getParams('com_getbible');
$params = ComponentHelper::getParams('com_getbible');
// start contributors array
$contributors = array();
$contributors = [];
// get all Contributors (max 20)
$searchArray = range('0','20');
foreach($searchArray as $nr)
@ -218,48 +228,48 @@ abstract class GetbibleHelper
public static function addSubmenu($submenu)
{
// load user for access menus
$user = JFactory::getUser();
$user = Factory::getUser();
// 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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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'))
{
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';
}
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__getbible_'.$type.' AS a');
@ -358,7 +368,7 @@ abstract class GetbibleHelper
public static function getGroupName($id)
{
$db = JFactory::getDBO();
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
@ -383,7 +393,7 @@ abstract class GetbibleHelper
* @param string $component The target component
* @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')
@ -392,10 +402,10 @@ abstract class GetbibleHelper
if (!ObjectHelper::check($user))
{
// get the user object
$user = JFactory::getUser();
$user = Factory::getUser();
}
// load the JObject
$result = new JObject;
// load the CMSObject
$result = new CMSObject;
// make view name safe (just incase)
$view = UtilitiesStringHelper::safe($view);
if (UtilitiesStringHelper::check($views))
@ -403,11 +413,11 @@ abstract class GetbibleHelper
$views = UtilitiesStringHelper::safe($views);
}
// get all actions from component
$actions = JAccess::getActionsFromFile(
$actions = Access::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/"
);
// if non found then return empty JObject
// if non found then return empty CMSObject
if (empty($actions))
{
return $result;
@ -574,14 +584,14 @@ abstract class GetbibleHelper
/**
* 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
$name = UtilitiesStringHelper::safe($name);
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
BaseDatabaseModel::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
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';
}
// get instance
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
$model = BaseDatabaseModel::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
@ -624,14 +634,14 @@ abstract class GetbibleHelper
*/
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
$parent = Table::getInstance('Asset');
$parent->loadByName('com_getbible');
$parentId = $parent->id;
$name = 'com_getbible.'.$table.'.'.$id;
$title = '';
$asset = JTable::getInstance('Asset');
$asset = Table::getInstance('Asset');
$asset->loadByName($name);
// Check for an error.
@ -655,14 +665,14 @@ abstract class GetbibleHelper
$asset->title = $title;
// get the default asset rules
$rules = self::getDefaultAssetRules('com_getbible', $table, $inherit);
if ($rules instanceof JAccessRules)
if ($rules instanceof AccessRules)
{
$asset->rules = (string) $rules;
}
if (!$asset->check() || !$asset->store())
{
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
Factory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
@ -675,7 +685,7 @@ abstract class GetbibleHelper
$object->asset_id = (int) $asset->id;
// 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;
@ -692,7 +702,7 @@ abstract class GetbibleHelper
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
@ -707,8 +717,8 @@ abstract class GetbibleHelper
}
}
// get asset rules
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
$result = Access::getAssetRules($assetId);
if ($result instanceof AccessRules)
{
$_result = (string) $result;
$_result = json_decode($_result);
@ -723,7 +733,7 @@ abstract class GetbibleHelper
elseif ($inherit)
{
// clear the value since we inherit
$rule = array();
$rule = [];
}
}
// check if there are any view values remaining
@ -731,8 +741,8 @@ abstract class GetbibleHelper
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
// Instantiate and return the AccessRules object for the asset rules.
$rules = new AccessRules($_result);
// return filtered rules
return $rules;
}
@ -777,7 +787,7 @@ abstract class GetbibleHelper
* @return null
* @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);
}
@ -791,7 +801,7 @@ abstract class GetbibleHelper
* @return void
* @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);
}

View File

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

View File

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

View File

@ -18,6 +18,7 @@
// No direct access to this file
defined('JPATH_BASE') or die;
use Joomla\CMS\Language\Text;
JHtmlBehavior::core();
$divWrapper = range(1,120,2);
$counter = 0;
@ -46,9 +47,9 @@ $counter = 0;
<div class="control-group radio" id="batch-move-copy">
<div class="controls">
<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">
<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>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,22 +18,27 @@
// No direct access to this file
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
$items = $displayData->vvwnotes;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=notes&task=note.edit";
// set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (GetbibleHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$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">
<?php if ($can->get('note.create')): ?>
<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" 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 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 Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br />
<?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,19 +67,19 @@ $can = GetbibleHelper::getActions('note');
<thead>
<tr>
<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 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 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 width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_NOTE_STATUS'); ?>
<?php echo Text::_('COM_GETBIBLE_NOTE_STATUS'); ?>
</th>
<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>
</tr>
</thead>
@ -82,7 +87,7 @@ $can = GetbibleHelper::getActions('note');
<?php foreach ($items as $i => $item): ?>
<?php
$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');
?>
<tr>
@ -90,7 +95,7 @@ $can = GetbibleHelper::getActions('note');
<?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>
<?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 else: ?>
<?php echo $displayData->escape($item->book_nr); ?>
@ -100,30 +105,30 @@ $can = GetbibleHelper::getActions('note');
<?php echo $displayData->escape($item->linker_name); ?>
</td>
<td>
<?php echo JText::_($item->access); ?>
<?php echo Text::_($item->access); ?>
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -136,7 +141,7 @@ $can = GetbibleHelper::getActions('note');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -18,22 +18,27 @@
// No direct access to this file
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
$items = $displayData->vvxpasswords;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=passwords&task=password.edit";
// set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (GetbibleHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$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">
<?php if ($can->get('password.create')): ?>
<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" 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 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 Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br />
<?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,19 +67,19 @@ $can = GetbibleHelper::getActions('password');
<thead>
<tr>
<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 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 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 width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_GETBIBLE_PASSWORD_STATUS'); ?>
<?php echo Text::_('COM_GETBIBLE_PASSWORD_STATUS'); ?>
</th>
<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>
</tr>
</thead>
@ -82,7 +87,7 @@ $can = GetbibleHelper::getActions('password');
<?php foreach ($items as $i => $item): ?>
<?php
$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');
?>
<tr>
@ -90,7 +95,7 @@ $can = GetbibleHelper::getActions('password');
<?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>
<?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 else: ?>
<?php echo $displayData->escape($item->name); ?>
@ -104,26 +109,26 @@ $can = GetbibleHelper::getActions('password');
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -136,7 +141,7 @@ $can = GetbibleHelper::getActions('password');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

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

View File

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

View File

@ -18,22 +18,27 @@
// No direct access to this file
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
$items = $displayData->vvvtags;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=tagged_verses&task=tagged_verse.edit";
// set a return value
$return = ($id) ? "index.php?option=com_getbible&view=linker&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (GetbibleHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$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">
<?php if ($can->get('tagged_verse.create')): ?>
<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" 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 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 Text::_('COM_GETBIBLE_CLOSE_NEW'); ?></a>
</div><br /><br />
<?php endif; ?>
<?php if (GetbibleHelper::checkArray($items)): ?>
@ -62,25 +67,25 @@ $can = GetbibleHelper::getActions('tagged_verse');
<thead>
<tr>
<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 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 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 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 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 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 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>
</tr>
</thead>
@ -88,7 +93,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?php foreach ($items as $i => $item): ?>
<?php
$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');
?>
<tr>
@ -96,7 +101,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?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>
<?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 else: ?>
<?php echo $displayData->escape($item->book_nr); ?>
@ -110,7 +115,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->access); ?>
<?php echo Text::_($item->access); ?>
</td>
<td>
<?php echo $displayData->escape($item->linker_name); ?>
@ -124,26 +129,26 @@ $can = GetbibleHelper::getActions('tagged_verse');
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -156,7 +161,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,22 +18,27 @@
// No direct access to this file
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
$items = $displayData->vvymessage;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=open_ai_messages&task=open_ai_message.edit";
// set a return value
$return = ($id) ? "index.php?option=com_getbible&view=open_ai_response&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (GetbibleHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$ref = ($id) ? "&ref=open_ai_response&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -50,22 +55,22 @@ else
<thead>
<tr>
<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 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 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 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 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 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>
</tr>
</thead>
@ -73,18 +78,18 @@ else
<?php foreach ($items as $i => $item): ?>
<?php
$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');
?>
<tr>
<td>
<?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 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 else: ?>
<?php echo JText::_($item->role); ?>
<?php echo Text::_($item->role); ?>
<?php endif; ?>
</td>
<td>
@ -98,30 +103,30 @@ else
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->source); ?>
<?php echo Text::_($item->source); ?>
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo JText::_('COM_GETBIBLE_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>">
<?php echo Text::_('COM_GETBIBLE_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo JText::_('COM_GETBIBLE_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>">
<?php echo Text::_('COM_GETBIBLE_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo JText::_('COM_GETBIBLE_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>">
<?php echo Text::_('COM_GETBIBLE_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -134,7 +139,7 @@ else
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,6 +17,11 @@
// No direct access to this file
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;
// get the form
@ -67,7 +72,7 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php endforeach; ?>
<?php else: ?>
<div class="alert alert-info">
<h4><?php echo JText::_('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>
<h4><?php echo Text::_('COM_GETBIBLE_OPEN_AI_DISABLED'); ?></h4>
<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>
<?php endif; ?>

View File

@ -17,6 +17,11 @@
// No direct access to this file
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;
// get the form

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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