Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
4f7059010d | |||
615a7e0cef | |||
a5d86a255b | |||
157a45a946 | |||
d9ba1b687b | |||
d9a6c983bc | |||
20bd3dfb8b | |||
325ed17c92 | |||
06439867b2 | |||
59e7b843a5 | |||
22c228239b | |||
044ab27cb5 | |||
976f3ffc97 | |||
04cc3bfaa9 | |||
057c38f16f | |||
b26ab90cf1 | |||
2fa7b8860e | |||
5751ca60f5 | |||
92add9d75d | |||
bcffb565b8 | |||
88104fd483 |
@ -18,13 +18,14 @@
|
||||
"author": "Llewellyn van der Merwe",
|
||||
"author_email": "joomla@vdm.io",
|
||||
"author_url": "https://io.vdm.dev/",
|
||||
"description": "The Get Bible for Joomla.",
|
||||
"description": "The Get Bible for Joomla 3.",
|
||||
"version_id": "com_getbible",
|
||||
"update_servers": "https://git.vdm.dev/getBible/joomla-component/raw/branch/master/update_server.xml"
|
||||
"update_servers": "https://git.vdm.dev/getBible/joomla-component/raw/branch/3.10/update_server.xml"
|
||||
},
|
||||
"repository": {
|
||||
"owner": "getBible",
|
||||
"repo": "joomla-pkg"
|
||||
"repo": "joomla-pkg",
|
||||
"branch": "3.10"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
@ -32,7 +33,7 @@
|
||||
"repo": "joomla-component",
|
||||
"id": "com_getbible",
|
||||
"type": "component",
|
||||
"mode": "master"
|
||||
"mode": "3.10"
|
||||
},
|
||||
{
|
||||
"owner": "getBible",
|
||||
|
74
CHANGELOG.md
74
CHANGELOG.md
@ -1,3 +1,77 @@
|
||||
# v3.1.3-alpha2
|
||||
|
||||
- Improve the PHP environment setup validation
|
||||
- Add option to pass shared session via tag share
|
||||
|
||||
# v3.1.3-alpha
|
||||
|
||||
- Refactored the API classes
|
||||
- Add table schema checker
|
||||
- Improve the removeFolder method in the install script
|
||||
|
||||
# v3.1.1
|
||||
|
||||
- Add back to Bible button to Open AI page.
|
||||
|
||||
# v3.1.0
|
||||
|
||||
- Fix missing Joomla__aeb8e463_291f_4445_9ac4_34b637c12dbd__Power.
|
||||
|
||||
# v3.0.9
|
||||
|
||||
- Add PHP check on installation.
|
||||
- Add Database check on installation.
|
||||
|
||||
# v3.0.8
|
||||
|
||||
- Moved all library classes away from default Namespace and Folder path to avoid collusion on outdated classes.
|
||||
|
||||
# v3.0.7
|
||||
|
||||
- Update getBible loader to version 3.1.0
|
||||
|
||||
# v3.0.6
|
||||
|
||||
- Correct the url encoding to json_encode for none Latin languages.
|
||||
- Fix type cast validation on search page.
|
||||
|
||||
# v3.0.5
|
||||
|
||||
- Fix missing token variable in ajax call
|
||||
|
||||
# v3.0.4
|
||||
|
||||
- Fix an Ajax input typo.
|
||||
|
||||
# v3.0.3
|
||||
|
||||
- Add option to target mysql 8+ with the search regex.
|
||||
|
||||
# v3.0.2
|
||||
|
||||
- More namespace updates.
|
||||
|
||||
# v3.0.1
|
||||
|
||||
- Fix missing use statement in app model.
|
||||
|
||||
# v3.0.0
|
||||
|
||||
- Move all JText to use the namespaced class Text directly.
|
||||
- Move all JHtml to use the namespaced class Html directly.
|
||||
- Move all JFactory to use the namespaced class Factory directly.
|
||||
- Move all JRoute to use the namespaced class Route directly.
|
||||
- Move all JFormHelper to use the namespaced class FormHelper directly.
|
||||
- Move all JLayout to use the namespaced class FileLayout directly.
|
||||
- Move all JLanguageMultilang to use the namespaced class Multilanguage directly.
|
||||
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
|
||||
- Move all JCategoryNode to use the namespaced class CategoryNode directly.
|
||||
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
|
||||
- Move all JToolbar to use the namespaced class Toolbar directly.
|
||||
- Move all JToolbarHelper to use the namespaced class ToolbarHelper directly.
|
||||
- Convert all addStyleSheet to make use of Html class instead.
|
||||
- Convert all addScript to make use of Html class instead.
|
||||
|
||||
# v2.0.32
|
||||
|
||||
- Fixed other search related issues.
|
||||
|
28
README.md
28
README.md
@ -1,4 +1,4 @@
|
||||
# Get Bible (2.0.32)
|
||||
# Get Bible (3.1.3-alpha2)
|
||||
|
||||
![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*: 29th July, 2024
|
||||
+ *Version*: 3.1.3-alpha2
|
||||
+ *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 -
|
||||
**648 Hours** or **81 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**
|
||||
+ *Folder count*: **167**
|
||||
+ *Line count*: **232257**
|
||||
+ *File count*: **1944**
|
||||
+ *Folder count*: **156**
|
||||
|
||||
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
|
||||
**427 Hours** or **53 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 @162hours** = codingtime / 4;
|
||||
> **planning @93hours** = codingtime / 7;
|
||||
> **mapping @65hours** = codingtime / 10;
|
||||
> **office @108hours** = codingtime / 6;)
|
||||
|
||||
**931 Hours** or **116 Eight Hour Days**
|
||||
**1075 Hours** or **134 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: **26.8 weeks** or **5.6 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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Get Bible (2.0.32)
|
||||
# Get Bible (3.1.3-alpha2)
|
||||
|
||||
![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*: 29th July, 2024
|
||||
+ *Version*: 3.1.3-alpha2
|
||||
+ *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 -
|
||||
**648 Hours** or **81 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**
|
||||
+ *Folder count*: **167**
|
||||
+ *Line count*: **232257**
|
||||
+ *File count*: **1944**
|
||||
+ *Folder count*: **156**
|
||||
|
||||
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
|
||||
**427 Hours** or **53 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 @162hours** = codingtime / 4;
|
||||
> **planning @93hours** = codingtime / 7;
|
||||
> **mapping @65hours** = codingtime / 10;
|
||||
> **office @108hours** = codingtime / 6;)
|
||||
|
||||
**931 Hours** or **116 Eight Hour Days**
|
||||
**1075 Hours** or **134 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: **26.8 weeks** or **5.6 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)
|
||||
|
@ -17,153 +17,153 @@
|
||||
/* CSS Document */
|
||||
|
||||
.dashboard-container {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
width: auto;
|
||||
display: block;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
width: auto;
|
||||
}
|
||||
.dashboard-container:before, .dashboard-container:after {
|
||||
content: "";
|
||||
display: table;
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.dashboard-container:after {
|
||||
clear: both;
|
||||
clear: both;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
float: left;
|
||||
min-height: 145px;
|
||||
min-width: 96px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
float: left;
|
||||
min-height: 145px;
|
||||
min-width: 96px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"]:first-child {
|
||||
margin-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
.dashboard-wraper {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
padding: 3px;
|
||||
width: 17%;
|
||||
min-height: 194px;
|
||||
min-width: 96px;
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
padding: 3px;
|
||||
width: 17%;
|
||||
min-height: 194px;
|
||||
min-width: 96px;
|
||||
}
|
||||
.dashboard-content a {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
min-height: 89px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
min-height: 89px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-content a:hover {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
color: hsl(200, 100%, 30%);
|
||||
text-decoration: none;
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
color: hsl(200, 100%, 30%);
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-title {
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.dashboard-info {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info span {
|
||||
display: block;
|
||||
text-align: center;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info img {
|
||||
margin: 0 auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.dashboard-table {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-info h5 {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.dashboard-block {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
|
||||
margin-bottom: 20px;
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border-bottom: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px 3px 0 0;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
|
||||
height: 40px;
|
||||
position: relative;
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border-bottom: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px 3px 0 0;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
|
||||
height: 40px;
|
||||
position: relative;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head h5 {
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
padding-top: 11px;
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
padding-top: 11px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 0 0 3px 3px;
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-box {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
|
||||
border-top: 1px solid hsl(0, 0%, 82%);
|
||||
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
|
||||
border-top: 1px solid hsl(0, 0%, 82%);
|
||||
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box {
|
||||
margin-top: 0 !important;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
|
||||
margin-bottom: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.dashboard-block-table {
|
||||
background-color: hsla(0, 0%, 0%, 0);
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom: 20px;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
background-color: hsla(0, 0%, 0%, 0);
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom: 20px;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-block-table th, .dashboard-block-table td {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dashboard-badge {
|
||||
background-color: hsl(0, 0%, 60%);
|
||||
border-radius: 9px;
|
||||
color: hsl(0, 0%, 100%);
|
||||
font-size: 11.844px;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
padding: 1px 9px 2px;
|
||||
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
background-color: hsl(0, 0%, 60%);
|
||||
border-radius: 9px;
|
||||
color: hsl(0, 0%, 100%);
|
||||
font-size: 11.844px;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
padding: 1px 9px 2px;
|
||||
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 65 KiB |
@ -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 TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use TrueChristianBible\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';
|
||||
@ -51,38 +55,38 @@ class GetbibleController extends BaseController
|
||||
function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
// set default view if not set
|
||||
$view = $this->input->getCmd('view', 'getbible');
|
||||
$data = $this->getViewRelation($view);
|
||||
$layout = $this->input->get('layout', null, 'WORD');
|
||||
$id = $this->input->getInt('id');
|
||||
$view = $this->input->getCmd('view', 'getbible');
|
||||
$data = $this->getViewRelation($view);
|
||||
$layout = $this->input->get('layout', null, 'WORD');
|
||||
$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);
|
||||
$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(
|
||||
|
@ -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,16 +47,16 @@ 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');
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
// return to a callback function
|
||||
$callback = $jinput->get('callback', null, 'CMD');
|
||||
$callback = $jinput->get('callback', null, 'CMD');
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
$token = Session::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
|
||||
{
|
||||
// get the task
|
||||
@ -67,7 +69,15 @@ class GetbibleControllerAjax extends BaseController
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->isNew($noticeValue);
|
||||
$ajaxModule = $this->getModel('ajax');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->isNew($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -86,7 +96,7 @@ class GetbibleControllerAjax extends BaseController
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
@ -108,7 +118,15 @@ class GetbibleControllerAjax extends BaseController
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->isRead($noticeValue);
|
||||
$ajaxModule = $this->getModel('ajax');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->isRead($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -127,7 +145,7 @@ class GetbibleControllerAjax extends BaseController
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
@ -149,7 +167,15 @@ class GetbibleControllerAjax extends BaseController
|
||||
$nameValue = $jinput->get('name', NULL, 'WORD');
|
||||
if($nameValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getWiki($nameValue);
|
||||
$ajaxModule = $this->getModel('ajax');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getWiki($nameValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -168,7 +194,7 @@ class GetbibleControllerAjax extends BaseController
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
@ -190,7 +216,15 @@ class GetbibleControllerAjax extends BaseController
|
||||
$versionValue = $jinput->get('version', NULL, 'INT');
|
||||
if($versionValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getVersion($versionValue);
|
||||
$ajaxModule = $this->getModel('ajax');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getVersion($versionValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -209,7 +243,7 @@ class GetbibleControllerAjax extends BaseController
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\GetBible\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use TrueChristianBible\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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 VDM\Joomla\GetBible\Factory;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
|
||||
/**
|
||||
* Translations Admin Controller
|
||||
@ -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');
|
||||
$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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -18,73 +18,38 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// register this component namespace
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible',
|
||||
'libraries/jcb_powers/VDM.Joomla.Openai' => 'VDM\\Joomla\\Openai',
|
||||
'libraries/jcb_powers/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
|
||||
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla'
|
||||
];
|
||||
// Start the search and load if found
|
||||
$found = false;
|
||||
$found_base_dir = "";
|
||||
$found_len = 0;
|
||||
foreach ($search as $base_dir => $prefix)
|
||||
{
|
||||
// does the class use the namespace prefix?
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) === 0)
|
||||
{
|
||||
// we have a match so load the values
|
||||
$found = true;
|
||||
$found_base_dir = $base_dir;
|
||||
$found_len = $len;
|
||||
// done here
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if we found a match
|
||||
if (!$found)
|
||||
{
|
||||
// not found so move to the next registered autoloader
|
||||
return;
|
||||
}
|
||||
// get the relative class name
|
||||
$relative_class = substr($class, $found_len);
|
||||
// replace the namespace prefix with the base directory, replace namespace
|
||||
// separators with directory separators in the relative class name, append
|
||||
// with .php
|
||||
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||
// if the file exists, require it
|
||||
if (file_exists($file))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
});
|
||||
|
||||
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
|
||||
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();
|
||||
|
@ -18,64 +18,36 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// register this component namespace
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/jcb_powers/VDM.Joomla.GetBible' => 'VDM\\Joomla\\GetBible',
|
||||
'libraries/jcb_powers/VDM.Joomla.Openai' => 'VDM\\Joomla\\Openai',
|
||||
'libraries/jcb_powers/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
|
||||
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla'
|
||||
];
|
||||
// Start the search and load if found
|
||||
$found = false;
|
||||
$found_base_dir = "";
|
||||
$found_len = 0;
|
||||
foreach ($search as $base_dir => $prefix)
|
||||
{
|
||||
// does the class use the namespace prefix?
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) === 0)
|
||||
{
|
||||
// we have a match so load the values
|
||||
$found = true;
|
||||
$found_base_dir = $base_dir;
|
||||
$found_len = $len;
|
||||
// done here
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if we found a match
|
||||
if (!$found)
|
||||
{
|
||||
// not found so move to the next registered autoloader
|
||||
return;
|
||||
}
|
||||
// get the relative class name
|
||||
$relative_class = substr($class, $found_len);
|
||||
// replace the namespace prefix with the base directory, replace namespace
|
||||
// separators with directory separators in the relative class name, append
|
||||
// with .php
|
||||
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||
// if the file exists, require it
|
||||
if (file_exists($file))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
});
|
||||
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
|
||||
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\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\FormHelper;
|
||||
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
|
||||
use TrueChristianBible\Joomla\Gitea\Factory as GiteaFactory;
|
||||
use TrueChristianBible\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ObjectHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\GetHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\JsonHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\FormHelper;
|
||||
|
||||
/**
|
||||
* Getbible component helper.
|
||||
@ -87,7 +59,7 @@ abstract class GetbibleHelper
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $composer = array();
|
||||
protected static $composer = [];
|
||||
|
||||
/**
|
||||
* The Main Active Language
|
||||
@ -116,7 +88,7 @@ abstract class GetbibleHelper
|
||||
return;
|
||||
}
|
||||
|
||||
Factory::_('GetBible.Loader')->set($row, $plugin);
|
||||
GetBibleFactory::_('GetBible.Loader')->set($row, $plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,7 +133,7 @@ abstract class GetbibleHelper
|
||||
// check if set
|
||||
if (!ObjectHelper::check(self::$JVersion))
|
||||
{
|
||||
self::$JVersion = new JVersion();
|
||||
self::$JVersion = new Version();
|
||||
}
|
||||
return self::$JVersion;
|
||||
}
|
||||
@ -172,18 +144,18 @@ 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)
|
||||
{
|
||||
{
|
||||
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3))
|
||||
{
|
||||
// set link based of selected option
|
||||
if($params->get("useContributor".$nr) == 1)
|
||||
{
|
||||
{
|
||||
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
|
||||
$link_back = '</a>';
|
||||
}
|
||||
@ -197,8 +169,8 @@ abstract class GetbibleHelper
|
||||
$link_front = '';
|
||||
$link_back = '';
|
||||
}
|
||||
$contributors[$nr]['title'] = UtilitiesStringHelper::html($params->get("titleContributor".$nr));
|
||||
$contributors[$nr]['name'] = $link_front.UtilitiesStringHelper::html($params->get("nameContributor".$nr)).$link_back;
|
||||
$contributors[$nr]['title'] = UtilitiesStringHelper::html($params->get("titleContributor".$nr));
|
||||
$contributors[$nr]['name'] = $link_front.UtilitiesStringHelper::html($params->get("nameContributor".$nr)).$link_back;
|
||||
}
|
||||
}
|
||||
return $contributors;
|
||||
@ -218,48 +190,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 +312,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 +330,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');
|
||||
@ -367,7 +339,7 @@ abstract class GetbibleHelper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
@ -383,7 +355,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,22 +364,22 @@ 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))
|
||||
{
|
||||
$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 +546,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 +561,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 +596,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 +627,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 +647,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 +664,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 +679,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 +695,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 +703,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 +749,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 +763,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);
|
||||
}
|
||||
@ -862,7 +834,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Check if have an json string
|
||||
*
|
||||
* @input string The json string to check
|
||||
* @input string The json string to check
|
||||
*
|
||||
* @returns bool true on success
|
||||
* @deprecated 3.3 Use JsonHelper::check($string);
|
||||
@ -875,7 +847,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Check if have an object with a length
|
||||
*
|
||||
* @input object The object to check
|
||||
* @input object The object to check
|
||||
*
|
||||
* @returns bool true on success
|
||||
* @deprecated 3.3 Use ObjectHelper::check($object);
|
||||
@ -888,7 +860,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Check if have an array with a length
|
||||
*
|
||||
* @input array The array to check
|
||||
* @input array The array to check
|
||||
*
|
||||
* @returns bool/int number of items in array on success
|
||||
* @deprecated 3.3 Use UtilitiesArrayHelper::check($array, $removeEmptyString);
|
||||
@ -901,7 +873,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Check if have a string with a length
|
||||
*
|
||||
* @input string The string to check
|
||||
* @input string The string to check
|
||||
*
|
||||
* @returns bool true on success
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::check($string);
|
||||
@ -921,7 +893,7 @@ abstract class GetbibleHelper
|
||||
{
|
||||
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
|
||||
$connected = @fsockopen("www.example.com", 80);
|
||||
// website, port (try 80 or 443)
|
||||
// website, port (try 80 or 443)
|
||||
if ($connected)
|
||||
{
|
||||
//action when connected
|
||||
@ -939,7 +911,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Merge an array of array's
|
||||
*
|
||||
* @input array The arrays you would like to merge
|
||||
* @input array The arrays you would like to merge
|
||||
*
|
||||
* @returns array on success
|
||||
* @deprecated 3.3 Use UtilitiesArrayHelper::merge($arrays);
|
||||
@ -958,7 +930,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Shorten a string
|
||||
*
|
||||
* @input string The you would like to shorten
|
||||
* @input string The you would like to shorten
|
||||
*
|
||||
* @returns string on success
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::shorten(...);
|
||||
@ -971,7 +943,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Making strings safe (various ways)
|
||||
*
|
||||
* @input string The you would like to make safe
|
||||
* @input string The you would like to make safe
|
||||
*
|
||||
* @returns string on success
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::safe(...);
|
||||
@ -990,7 +962,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Convert none English strings to code usable string
|
||||
*
|
||||
* @input an string
|
||||
* @input an string
|
||||
*
|
||||
* @returns a string
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::transliterate($string);
|
||||
@ -1003,7 +975,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* make sure a string is HTML save
|
||||
*
|
||||
* @input an html string
|
||||
* @input an html string
|
||||
*
|
||||
* @returns a string
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::html(...);
|
||||
@ -1021,7 +993,7 @@ abstract class GetbibleHelper
|
||||
/**
|
||||
* Convert all int in a string to an English word string
|
||||
*
|
||||
* @input an string with numbers
|
||||
* @input an string with numbers
|
||||
*
|
||||
* @returns a string
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::numbers($string);
|
||||
@ -1035,7 +1007,7 @@ abstract class GetbibleHelper
|
||||
* Convert an integer into an English word string
|
||||
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
|
||||
*
|
||||
* @input an int
|
||||
* @input an int
|
||||
* @returns a string
|
||||
* @deprecated 3.3 Use UtilitiesStringHelper::number($x);
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ abstract class JHtmlBatch_
|
||||
* @var array
|
||||
* @since 3.0
|
||||
*/
|
||||
protected static $ListSelection = array();
|
||||
protected static $ListSelection = [];
|
||||
|
||||
/**
|
||||
* Render the batch selection options.
|
||||
|
64
admin/helpers/powerloader.php
Normal file
64
admin/helpers/powerloader.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// register additional namespace
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/vendor_getbible/TrueChristianBible.Joomla.Openai' => 'TrueChristianBible\\Joomla\\Openai',
|
||||
'libraries/vendor_getbible/TrueChristianBible.Joomla.Gitea' => 'TrueChristianBible\\Joomla\\Gitea',
|
||||
'libraries/vendor_getbible/TrueChristianBible.Joomla' => 'TrueChristianBible\\Joomla'
|
||||
];
|
||||
// Start the search and load if found
|
||||
$found = false;
|
||||
$found_base_dir = "";
|
||||
$found_len = 0;
|
||||
foreach ($search as $base_dir => $prefix)
|
||||
{
|
||||
// does the class use the namespace prefix?
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) === 0)
|
||||
{
|
||||
// we have a match so load the values
|
||||
$found = true;
|
||||
$found_base_dir = $base_dir;
|
||||
$found_len = $len;
|
||||
// done here
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if we found a match
|
||||
if (!$found)
|
||||
{
|
||||
// not found so move to the next registered autoloader
|
||||
return;
|
||||
}
|
||||
// get the relative class name
|
||||
$relative_class = substr($class, $found_len);
|
||||
// replace the namespace prefix with the base directory, replace namespace
|
||||
// separators with directory separators in the relative class name, append
|
||||
// with .php
|
||||
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||
// if the file exists, require it
|
||||
if (file_exists($file))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
});
|
@ -1,14 +1,13 @@
|
||||
COM_GETBIBLE="Get Bible"
|
||||
COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated."
|
||||
COM_GETBIBLE_ACCESS_REVOKED="Access revoked."
|
||||
COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
|
||||
COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER="All is good, please check again later"
|
||||
COM_GETBIBLE_ALL_TRANSLATIONS="All Translations"
|
||||
COM_GETBIBLE_ALL_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="All translations were successfully updated, and they are now in sync with the getBible API."
|
||||
COM_GETBIBLE_ARCHIVED="Archived"
|
||||
COM_GETBIBLE_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
|
||||
COM_GETBIBLE_AUTHOR="Author"
|
||||
COM_GETBIBLE_BACK="Back"
|
||||
COM_GETBIBLE_BETA_RELEASE="Beta Release"
|
||||
COM_GETBIBLE_BOOK="Book"
|
||||
COM_GETBIBLE_BOOKS="Books"
|
||||
COM_GETBIBLE_BOOKS_ACCESS="Books Access"
|
||||
@ -70,6 +69,7 @@ COM_GETBIBLE_BOOK_CREATED_DATE_DESC="The date this Book was created."
|
||||
COM_GETBIBLE_BOOK_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_BOOK_DETAILS="Details"
|
||||
COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS="Another Book has the same alias."
|
||||
COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Book has the same alias ."
|
||||
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS="Book Force Hash Check Button Access"
|
||||
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC="Allows the users in this group to access the force hash check button."
|
||||
COM_GETBIBLE_BOOK_ID="Id"
|
||||
@ -163,6 +163,7 @@ COM_GETBIBLE_CHAPTER_CREATED_DATE_DESC="The date this Chapter was created."
|
||||
COM_GETBIBLE_CHAPTER_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_CHAPTER_DETAILS="Details"
|
||||
COM_GETBIBLE_CHAPTER_ERROR_UNIQUE_ALIAS="Another Chapter has the same alias."
|
||||
COM_GETBIBLE_CHAPTER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Chapter has the same alias ."
|
||||
COM_GETBIBLE_CHAPTER_ID="Id"
|
||||
COM_GETBIBLE_CHAPTER_MODIFIED_BY_DESC="The last user that modified this Chapter."
|
||||
COM_GETBIBLE_CHAPTER_MODIFIED_BY_LABEL="Modified By"
|
||||
@ -684,6 +685,7 @@ COM_GETBIBLE_LINKER_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_LINKER_DETAILS="Details"
|
||||
COM_GETBIBLE_LINKER_EDIT="Editing the Linker"
|
||||
COM_GETBIBLE_LINKER_ERROR_UNIQUE_ALIAS="Another Linker has the same alias."
|
||||
COM_GETBIBLE_LINKER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Linker has the same alias ."
|
||||
COM_GETBIBLE_LINKER_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_GETBIBLE_LINKER_GUID_HINT="Auto Generated"
|
||||
COM_GETBIBLE_LINKER_GUID_LABEL="GUID"
|
||||
@ -788,6 +790,7 @@ COM_GETBIBLE_NOTE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_NOTE_DETAILS="Details"
|
||||
COM_GETBIBLE_NOTE_EDIT="Editing the Note"
|
||||
COM_GETBIBLE_NOTE_ERROR_UNIQUE_ALIAS="Another Note has the same alias."
|
||||
COM_GETBIBLE_NOTE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Note has the same alias ."
|
||||
COM_GETBIBLE_NOTE_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_GETBIBLE_NOTE_GUID_HINT="Auto Generated"
|
||||
COM_GETBIBLE_NOTE_GUID_LABEL="GUID"
|
||||
@ -884,6 +887,7 @@ COM_GETBIBLE_OPEN_AI_MESSAGE_CREATED_DATE_DESC="The date this Open AI Message wa
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_EDIT="Editing the Open AI Message"
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_ERROR_UNIQUE_ALIAS="Another Open AI Message has the same alias."
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Open AI Message has the same alias ."
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_FUNCTION="function"
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_ID="Id"
|
||||
COM_GETBIBLE_OPEN_AI_MESSAGE_INDEX_DESCRIPTION="Message index"
|
||||
@ -1025,6 +1029,7 @@ COM_GETBIBLE_OPEN_AI_RESPONSE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_DETAILS="Details"
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_EDIT="Editing the Open AI Response"
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_ERROR_UNIQUE_ALIAS="Another Open AI Response has the same alias."
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Open AI Response has the same alias ."
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text"
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_FREQUENCY_PENALTY_LABEL="Frequency Penalty"
|
||||
COM_GETBIBLE_OPEN_AI_RESPONSE_GPT35TURBO="gpt-3.5-turbo"
|
||||
@ -1157,6 +1162,7 @@ COM_GETBIBLE_PASSWORD_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_PASSWORD_DETAILS="Details"
|
||||
COM_GETBIBLE_PASSWORD_EDIT="Editing the Password"
|
||||
COM_GETBIBLE_PASSWORD_ERROR_UNIQUE_ALIAS="Another Password has the same alias."
|
||||
COM_GETBIBLE_PASSWORD_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Password has the same alias ."
|
||||
COM_GETBIBLE_PASSWORD_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_GETBIBLE_PASSWORD_GUID_HINT="Auto Generated"
|
||||
COM_GETBIBLE_PASSWORD_GUID_LABEL="GUID"
|
||||
@ -1182,7 +1188,8 @@ COM_GETBIBLE_PASSWORD_STATUS="Status"
|
||||
COM_GETBIBLE_PASSWORD_TO_SHORT_USE_A_LONGER_PASSWORD="Password to short, use a longer password."
|
||||
COM_GETBIBLE_PASSWORD_VERSION_DESC="A count of the number of times this Password has been revised."
|
||||
COM_GETBIBLE_PASSWORD_VERSION_LABEL="Version"
|
||||
COM_GETBIBLE_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
|
||||
COM_GETBIBLE_PLEASE_CHECK_AGAIN_LATER="Please check again later"
|
||||
COM_GETBIBLE_PRE_RELEASE="Pre Release"
|
||||
COM_GETBIBLE_PROMPT="Prompt"
|
||||
COM_GETBIBLE_PROMPTS="Prompts"
|
||||
COM_GETBIBLE_PROMPTS_ACCESS="Prompts Access"
|
||||
@ -1306,6 +1313,7 @@ COM_GETBIBLE_PROMPT_CREATED_DATE_DESC="The date this Prompt was created."
|
||||
COM_GETBIBLE_PROMPT_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_PROMPT_EDIT="Editing the Prompt"
|
||||
COM_GETBIBLE_PROMPT_ERROR_UNIQUE_ALIAS="Another Prompt has the same alias."
|
||||
COM_GETBIBLE_PROMPT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Prompt has the same alias ."
|
||||
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_DESCRIPTION="Penalty for new tokens based on their frequency in the text"
|
||||
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_LABEL="Frequency Penalty"
|
||||
COM_GETBIBLE_PROMPT_FREQUENCY_PENALTY_NOTE_DESCRIPTION="<p>The "frequency_penalty" is another optional parameter that defaults to 0. This is also a value between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</p><ul> <li>For example, a high frequency penalty discourages the model from excessively repeating the same words or phrases, encouraging it to produce more diverse and creative text.</li></ul>"
|
||||
@ -1511,6 +1519,7 @@ COM_GETBIBLE_TAGGED_VERSE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_TAGGED_VERSE_DETAILS="Details"
|
||||
COM_GETBIBLE_TAGGED_VERSE_EDIT="Editing the Tagged Verse"
|
||||
COM_GETBIBLE_TAGGED_VERSE_ERROR_UNIQUE_ALIAS="Another Tagged Verse has the same alias."
|
||||
COM_GETBIBLE_TAGGED_VERSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tagged Verse has the same alias ."
|
||||
COM_GETBIBLE_TAGGED_VERSE_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_GETBIBLE_TAGGED_VERSE_GUID_HINT="Auto Generated"
|
||||
COM_GETBIBLE_TAGGED_VERSE_GUID_LABEL="GUID"
|
||||
@ -1602,6 +1611,7 @@ COM_GETBIBLE_TAG_DESCRIPTION_LABEL="Description"
|
||||
COM_GETBIBLE_TAG_DETAILS="Details"
|
||||
COM_GETBIBLE_TAG_EDIT="Editing the Tag"
|
||||
COM_GETBIBLE_TAG_ERROR_UNIQUE_ALIAS="Another Tag has the same alias."
|
||||
COM_GETBIBLE_TAG_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tag has the same alias ."
|
||||
COM_GETBIBLE_TAG_FOUND_BUT_COULD_NOT_BE_REACTIVATED="Tag found, but could not be reactivated."
|
||||
COM_GETBIBLE_TAG_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_GETBIBLE_TAG_GUID_HINT="Auto Generated"
|
||||
@ -1645,7 +1655,7 @@ COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REACTIVATED="The tag was successfully reac
|
||||
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE="The tag was successfully removed from the verse."
|
||||
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_UPDATED="The tag was successfully updated."
|
||||
COM_GETBIBLE_THE_VERSE_WAS_SUCCESSFULLY_TAGGED="The verse was successfully tagged."
|
||||
COM_GETBIBLE_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your JCB system has internet connection."
|
||||
COM_GETBIBLE_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_GETBIBLE_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your getBible system has internet connection."
|
||||
COM_GETBIBLE_THE_WIKI_IS_LOADING="The wiki is loading"
|
||||
COM_GETBIBLE_THIS_IS_A_GLOBAL_TAG_SET_BY_US_AT_BSB_FOR_YOUR_CONVENIENCE_WE_HOLD_THE_PRIVILEGE_TO_MODIFY_THESE_TAGS_IF_YOU_BELIEVE_ITS_SET_IN_ERROR_KINDLY_INFORM_US="This is a global tag, set by us at <b>%s</b> for your convenience. We hold the privilege to modify these tags. If you believe it's set in error, kindly inform us."
|
||||
COM_GETBIBLE_THIS_TAG_COULD_NOT_BE_REMOVED="This tag could not be removed."
|
||||
@ -1782,6 +1792,7 @@ COM_GETBIBLE_TRANSLATION_ENCODING_DESCRIPTION="Enter some encoding"
|
||||
COM_GETBIBLE_TRANSLATION_ENCODING_LABEL="Encoding"
|
||||
COM_GETBIBLE_TRANSLATION_ENCODING_MESSAGE="Error! Please add some encoding here."
|
||||
COM_GETBIBLE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Translation has the same alias."
|
||||
COM_GETBIBLE_TRANSLATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Translation has the same alias ."
|
||||
COM_GETBIBLE_TRANSLATION_ID="Id"
|
||||
COM_GETBIBLE_TRANSLATION_LANGUAGE_DESCRIPTION="The translation language."
|
||||
COM_GETBIBLE_TRANSLATION_LANGUAGE_HINT="English"
|
||||
@ -1909,6 +1920,7 @@ COM_GETBIBLE_VERSE_CREATED_DATE_DESC="The date this Verse was created."
|
||||
COM_GETBIBLE_VERSE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_GETBIBLE_VERSE_DETAILS="Details"
|
||||
COM_GETBIBLE_VERSE_ERROR_UNIQUE_ALIAS="Another Verse has the same alias."
|
||||
COM_GETBIBLE_VERSE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Verse has the same alias ."
|
||||
COM_GETBIBLE_VERSE_ID="Id"
|
||||
COM_GETBIBLE_VERSE_MODIFIED_BY_DESC="The last user that modified this Verse."
|
||||
COM_GETBIBLE_VERSE_MODIFIED_BY_LABEL="Modified By"
|
||||
|
@ -103,9 +103,6 @@ COM_GETBIBLE_LINKERS_EDIT_STATE_DESC="Allows the users in this group to update t
|
||||
COM_GETBIBLE_LINKERS_SUBMENU="Linkers Submenu"
|
||||
COM_GETBIBLE_LINKERS_SUBMENU_DESC="Allows the users in this group to submenu of linker"
|
||||
COM_GETBIBLE_MENU="Get Bible"
|
||||
COM_GETBIBLE_MENU_API_DESC="Api"
|
||||
COM_GETBIBLE_MENU_API_OPTION="Api"
|
||||
COM_GETBIBLE_MENU_API_TITLE="Api"
|
||||
COM_GETBIBLE_MENU_APP_DESC="App"
|
||||
COM_GETBIBLE_MENU_APP_OPTION="App"
|
||||
COM_GETBIBLE_MENU_APP_TITLE="App"
|
||||
|
@ -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;
|
||||
@ -25,8 +26,8 @@ $counter = 0;
|
||||
<?php if ($displayData->ListSelection) : ?>
|
||||
<div class="row-fluid">
|
||||
<?php foreach ($displayData->ListSelection as $ListSelection) : ?>
|
||||
<div class="control-group span6">
|
||||
<div class="controls">
|
||||
<div class="control-group span6">
|
||||
<div class="controls">
|
||||
<label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label>
|
||||
<select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small">
|
||||
<?php if (!$ListSelection['noDefault']) : ?>
|
||||
@ -34,21 +35,21 @@ $counter = 0;
|
||||
<?php endif; ?>
|
||||
<?php echo $ListSelection['options']; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (in_array($counter,$divWrapper)) : ?>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<?php endif; ?>
|
||||
<?php $counter++; ?>
|
||||
<?php $counter++; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<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 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 Text::_('Update'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -18,22 +18,28 @@
|
||||
// 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 TrueChristianBible\Joomla\Utilities\StringHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// 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,28 +59,28 @@ $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)): ?>
|
||||
<?php if (ArrayHelper::check($items)): ?>
|
||||
<table class="footable table data notes" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
|
||||
<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 +88,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 +96,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 +106,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 +142,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>
|
||||
|
@ -18,22 +18,28 @@
|
||||
// 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 TrueChristianBible\Joomla\Utilities\StringHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// 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,28 +59,28 @@ $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)): ?>
|
||||
<?php if (ArrayHelper::check($items)): ?>
|
||||
<table class="footable table data passwords" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
|
||||
<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 +88,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 +96,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 +110,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 +142,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>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -18,22 +18,28 @@
|
||||
// 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 TrueChristianBible\Joomla\Utilities\StringHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// 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,34 +59,34 @@ $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)): ?>
|
||||
<?php if (ArrayHelper::check($items)): ?>
|
||||
<table class="footable table data tagged_verses" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
|
||||
<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 +94,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 +102,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 +116,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 +130,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 +162,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>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -18,22 +18,28 @@
|
||||
// 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 TrueChristianBible\Joomla\Utilities\StringHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// 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));
|
||||
@ -45,27 +51,27 @@ else
|
||||
|
||||
?>
|
||||
<div class="form-vertical">
|
||||
<?php if (GetbibleHelper::checkArray($items)): ?>
|
||||
<?php if (ArrayHelper::check($items)): ?>
|
||||
<table class="footable table data open_ai_messages" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
|
||||
<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 +79,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 +104,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 +140,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>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -17,7 +17,12 @@
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die('Restricted access');
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\Component\Helper;
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
@ -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; ?>
|
||||
|
@ -17,7 +17,12 @@
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die('Restricted access');
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use TrueChristianBible\Joomla\Utilities\Component\Helper;
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
@ -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)) :?>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user