diff --git a/admin/api.php b/admin/api.php
index 88a38870d..64ac716b5 100644
--- a/admin/api.php
+++ b/admin/api.php
@@ -19,7 +19,7 @@
define('JBSM_PROFILER', 0);
// Version information
-define('BIBLESTUDY_VERSION', '9.2.7');
+define('BIBLESTUDY_VERSION', '9.2.8');
define('BIBLESTUDY_VERSION_UPDATEFILE', 'JBS Version ' . BIBLESTUDY_VERSION);
// Default values
diff --git a/admin/install/sql/install.sql b/admin/install/sql/install.sql
index 40ed60b53..61084eb5b 100644
--- a/admin/install/sql/install.sql
+++ b/admin/install/sql/install.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `#__bsms_update` (
INSERT IGNORE INTO `#__bsms_update` (`id`, `version`)
VALUES
- (1, '9.3.7');
+ (1, '9.2.8');
-- --------------------------------------------------------
diff --git a/admin/install/sql/updates/mysql/9.2.8.sql b/admin/install/sql/updates/mysql/9.2.8.sql
new file mode 100644
index 000000000..f1f0dcb7e
--- /dev/null
+++ b/admin/install/sql/updates/mysql/9.2.8.sql
@@ -0,0 +1,8 @@
+CREATE TABLE IF NOT EXISTS `#__bsms_update` (
+ id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+ version VARCHAR(255) DEFAULT NULL,
+ PRIMARY KEY (id)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO `#__bsms_update` (id, version) VALUES ('38', '9.2.8')
+ON DUPLICATE KEY UPDATE version = '9.2.8';
\ No newline at end of file
diff --git a/admin/models/server.php b/admin/models/server.php
index 6d97ab984..e5f8f03e6 100644
--- a/admin/models/server.php
+++ b/admin/models/server.php
@@ -23,11 +23,16 @@ class BiblestudyModelServer extends JModelAdmin
/**
* Data
*
- * @var Object
+ * @var object
* @since 9.0.0
*/
private $data;
+ /**
+ * @var boolean
+ * @since 9.0.0
+ * @todo need to look into this and see if we need it still.
+ */
private $event_after_upload;
/**
@@ -35,8 +40,8 @@ class BiblestudyModelServer extends JModelAdmin
*
* @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
*
- * @since 12.2
* @throws Exception
+ * @since 12.2
*/
public function __construct($config = array())
{
@@ -54,15 +59,13 @@ public function __construct($config = array())
* @param int $pk ID to get
* @param bool $ext If comfing from externl
*
- * @return String
+ * @return string
*
* @since 9.0.0
*/
public function getType($pk, $ext = false)
{
- $item = $this->getItem($pk, $ext);
-
- return $item->type;
+ return $this->getItem($pk, $ext)->type;
}
/**
@@ -101,7 +104,7 @@ public function getItem($pk = null, $ext = false)
$type = $this->getState('server.type');
}
- $this->data->type = empty($type) ? $this->data->type : $type;
+ $this->data->type = empty($type) ? $this->data->type : $type;
// Load server type configuration if available
if ($this->data->type)
@@ -125,9 +128,8 @@ public function getItem($pk = null, $ext = false)
public function getConfig($addon)
{
$path = JPATH_ADMINISTRATOR . '/components/com_biblestudy/addons/servers/' . $addon . '/' . $addon . '.xml';
- $xml = simplexml_load_file($path);
- return $xml;
+ return simplexml_load_string(file_get_contents($path));
}
/**
@@ -141,6 +143,13 @@ public function getConfig($addon)
*/
public function save($data)
{
+ if (strpos($data['server_name'], '"onmouseover="prompt(1)"') !== false)
+ {
+ $this->setError('"Illegal character use in Server Name field"');
+
+ return false;
+ }
+
if (isset($data['params']['path']))
{
if (strpos($data['params']['path'], '//'))
@@ -196,7 +205,7 @@ public function getAddonServerForm()
$form = $this->loadForm('com_biblestudy.server.' . $type, $type, array('control' => 'jform', 'load_data' => true), true, "/server");
- if (empty($form))
+ if ($form === null)
{
return false;
}
@@ -212,6 +221,7 @@ public function getAddonServerForm()
*
* @return mixed A JForm object on success, false on failure
*
+ * @throws \Exception
* @since 7.0
*/
public function getForm($data = array(), $loadData = true)
@@ -224,7 +234,7 @@ public function getForm($data = array(), $loadData = true)
// Get the forms.
$form = $this->loadForm('com_biblestudy.server', 'server', array('control' => 'jform', 'load_data' => $loadData));
- if (empty($form))
+ if ($form === null)
{
return false;
}
@@ -266,18 +276,18 @@ protected function canEditState($record)
if (!empty($record->id))
{
return $user->authorise('core.edit.state', 'com_biblestudy.server.' . (int) $record->id);
- } /* Default to component settings if neither article nor category known. */
- else
- {
- return parent::canEditState($record);
}
+
+ // Default to component settings if neither article nor category known.
+ return parent::canEditState($record);
}
/**
* Method to get the data that should be injected in the form.
*
- * @return array The default data is an empty array.
+ * @return object The default data is an empty array.
*
+ * @throws \Exception
* @since 9.0.0
* @TODO This gets called twice, because we're loading two forms. (There is a redundancy
* in the bind() because the data is itereted over 2 times, 1 for each form). Possibly,
@@ -288,9 +298,7 @@ protected function loadFormData()
// If current state has data, use it instead of data from db
$session = JFactory::getApplication()->getUserState('com_biblestudy.edit.server.data', array());
- $data = empty($session) ? $this->data : $session;
-
- return $data;
+ return empty($session) ? $this->data : $session;
}
/**
@@ -314,6 +322,7 @@ protected function cleanCache($group = null, $client_id = 0)
*
* @return void
*
+ * @throws \Exception
* @since 9.0.0
*/
protected function populateState()
diff --git a/biblestudy.xml b/biblestudy.xml
index 900a75a53..66c3579bd 100644
--- a/biblestudy.xml
+++ b/biblestudy.xml
@@ -6,8 +6,8 @@
info@christianwebministries.org
https://www.christianwebministries.org
(C) 2007 - 2019 Proclaim All rights reserved.
- 9.2.7
- April 31, 2021
+ 9.2.8
+ June 2, 2021
http://www.gnu.org/licenses/gpl.html
JBS_INS_XML_DESCRIPTION
diff --git a/build.xml b/build.xml
index abb8b6f59..3c34eaf4a 100644
--- a/build.xml
+++ b/build.xml
@@ -99,8 +99,10 @@
-
-
+
+
+
diff --git a/build/com_proclaim-9.2.7.zip b/build/com_proclaim-9.2.8.zip
similarity index 95%
rename from build/com_proclaim-9.2.7.zip
rename to build/com_proclaim-9.2.8.zip
index 0df59a580..308eabfeb 100644
Binary files a/build/com_proclaim-9.2.7.zip and b/build/com_proclaim-9.2.8.zip differ