+
+
+
+items)): ?>
+ loadTemplate('toolbar');?>
+
+
+
+
+ loadTemplate('toolbar');?>
+
+ loadTemplate('head');?>
+ loadTemplate('foot');?>
+ loadTemplate('body');?>
+
+
+ canCreate && $this->canEdit) : ?>
+ JText::_('COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_BATCH_OPTIONS'),
+ 'footer' => $this->loadTemplate('batch_footer')
+ ),
+ $this->loadTemplate('batch_body')
+ ); ?>
+
+
+
+
+
+
+
+
+
diff --git a/admin/views/questions_and_answers/tmpl/default_batch_body.php b/admin/views/questions_and_answers/tmpl/default_batch_body.php
index f4ced7e..b279a2b 100644
--- a/admin/views/questions_and_answers/tmpl/default_batch_body.php
+++ b/admin/views/questions_and_answers/tmpl/default_batch_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_body.php
@@ -24,7 +24,7 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
-defined('_JEXEC') or die('Restricted access');
+defined('_JEXEC') or die('Restricted access');
?>
diff --git a/admin/views/questions_and_answers/tmpl/default_batch_footer.php b/admin/views/questions_and_answers/tmpl/default_batch_footer.php
index e6e9113..5500650 100644
--- a/admin/views/questions_and_answers/tmpl/default_batch_footer.php
+++ b/admin/views/questions_and_answers/tmpl/default_batch_footer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_footer.php
@@ -24,7 +24,7 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
-defined('_JEXEC') or die('Restricted access');
+defined('_JEXEC') or die('Restricted access');
?>
diff --git a/admin/views/questions_and_answers/tmpl/default_body.php b/admin/views/questions_and_answers/tmpl/default_body.php
index 9bd1b08..4bb2784 100644
--- a/admin/views/questions_and_answers/tmpl/default_body.php
+++ b/admin/views/questions_and_answers/tmpl/default_body.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php
@@ -24,7 +24,7 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
-defined('_JEXEC') or die('Restricted access');
+defined('_JEXEC') or die('Restricted access');
$edit = "index.php?option=com_questionsanswers&view=questions_and_answers&task=question_and_answer.edit";
@@ -39,11 +39,8 @@ $edit = "index.php?option=com_questionsanswers&view=questions_and_answers&task=q
get('question_and_answer.edit.state')): ?>
saveOrder)
- {
- $iconClass = ' inactive';
- }
- else
+ $iconClass = '';
+ if (!$this->saveOrder)
{
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
}
diff --git a/admin/views/questions_and_answers/tmpl/default_foot.php b/admin/views/questions_and_answers/tmpl/default_foot.php
index 97969e1..f85d564 100644
--- a/admin/views/questions_and_answers/tmpl/default_foot.php
+++ b/admin/views/questions_and_answers/tmpl/default_foot.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php
diff --git a/admin/views/questions_and_answers/tmpl/default_head.php b/admin/views/questions_and_answers/tmpl/default_head.php
index 7272eb8..82075ce 100644
--- a/admin/views/questions_and_answers/tmpl/default_head.php
+++ b/admin/views/questions_and_answers/tmpl/default_head.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php
@@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
|
canEdit&& $this->canState): ?>
- ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
+ ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
diff --git a/admin/views/questions_and_answers/tmpl/default_toolbar.php b/admin/views/questions_and_answers/tmpl/default_toolbar.php
index b37338e..cd066df 100644
--- a/admin/views/questions_and_answers/tmpl/default_toolbar.php
+++ b/admin/views/questions_and_answers/tmpl/default_toolbar.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php
diff --git a/admin/views/questions_and_answers/view.html.php b/admin/views/questions_and_answers/view.html.php
index 0134667..9272616 100644
--- a/admin/views/questions_and_answers/view.html.php
+++ b/admin/views/questions_and_answers/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
@@ -51,7 +51,7 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy
// Add the list ordering clause.
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
$this->listDirn = $this->escape($this->state->get('list.direction', 'desc'));
- $this->saveOrder = $this->listOrder == 'ordering';
+ $this->saveOrder = $this->listOrder == 'a.ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
@@ -166,41 +166,24 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_questionsanswers');
- }
-
- if ($this->canState)
- {
- JHtmlSidebar::addFilter(
- JText::_('JOPTION_SELECT_PUBLISHED'),
- 'filter_published',
- JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
- );
- // only load if batch allowed
- if ($this->canBatch)
- {
- JHtmlBatch_::addListSelection(
- JText::_('COM_QUESTIONSANSWERS_KEEP_ORIGINAL_STATE'),
- 'batch[published]',
- JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
- );
- }
- }
-
- JHtmlSidebar::addFilter(
- JText::_('JOPTION_SELECT_ACCESS'),
- 'filter_access',
- JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
- );
-
- if ($this->canBatch && $this->canCreate && $this->canEdit)
- {
- JHtmlBatch_::addListSelection(
- JText::_('COM_QUESTIONSANSWERS_KEEP_ORIGINAL_ACCESS'),
- 'batch[access]',
- JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
- );
}
+ // Only load publish filter if state change is allowed
+ if ($this->canState)
+ {
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_PUBLISHED'),
+ 'filter_published',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
+ );
+ }
+
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_ACCESS'),
+ 'filter_access',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
+ );
+
// Category Filter.
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_CATEGORY'),
@@ -208,6 +191,26 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy
JHtml::_('select.options', JHtml::_('category.options', 'com_questionsanswers.question_and_answer'), 'value', 'text', $this->state->get('filter.category_id'))
);
+ // Only load published batch if state and batch is allowed
+ if ($this->canState && $this->canBatch)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_QUESTIONSANSWERS_KEEP_ORIGINAL_STATE'),
+ 'batch[published]',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
+ );
+ }
+
+ // Only load access batch if create, edit and batch is allowed
+ if ($this->canBatch && $this->canCreate && $this->canEdit)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_QUESTIONSANSWERS_KEEP_ORIGINAL_ACCESS'),
+ 'batch[access]',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
+ );
+ }
+
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Category Batch selection.
@@ -260,7 +263,7 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy
protected function getSortFields()
{
return array(
- 'ordering' => JText::_('JGRID_HEADING_ORDERING'),
+ 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'),
'a.question' => JText::_('COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_QUESTION_LABEL'),
'a.answer' => JText::_('COM_QUESTIONSANSWERS_QUESTION_AND_ANSWER_ANSWER_LABEL'),
diff --git a/admin/views/questionsanswers/tmpl/default.php b/admin/views/questionsanswers/tmpl/default.php
index 5f0a1b8..ce1ac4c 100644
--- a/admin/views/questionsanswers/tmpl/default.php
+++ b/admin/views/questionsanswers/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
diff --git a/admin/views/questionsanswers/tmpl/default_main.php b/admin/views/questionsanswers/tmpl/default_main.php
index 5da108b..01d8818 100644
--- a/admin/views/questionsanswers/tmpl/default_main.php
+++ b/admin/views/questionsanswers/tmpl/default_main.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_main.php
diff --git a/admin/views/questionsanswers/tmpl/default_readme_information.php b/admin/views/questionsanswers/tmpl/default_readme_information.php
index 225416c..5922943 100644
--- a/admin/views/questionsanswers/tmpl/default_readme_information.php
+++ b/admin/views/questionsanswers/tmpl/default_readme_information.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_readme_information.php
diff --git a/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php b/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
index 1a388b6..8a6896e 100644
--- a/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
+++ b/admin/views/questionsanswers/tmpl/default_vast_development_method_notice_board.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vast_development_method_notice_board.php
diff --git a/admin/views/questionsanswers/tmpl/default_vdm.php b/admin/views/questionsanswers/tmpl/default_vdm.php
index 90b5ee3..de64a4a 100644
--- a/admin/views/questionsanswers/tmpl/default_vdm.php
+++ b/admin/views/questionsanswers/tmpl/default_vdm.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vdm.php
diff --git a/admin/views/questionsanswers/view.html.php b/admin/views/questionsanswers/view.html.php
index 3c248cd..3b36eb0 100644
--- a/admin/views/questionsanswers/view.html.php
+++ b/admin/views/questionsanswers/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
diff --git a/media/css/A4.print.css b/media/css/A4.print.css
index 084588f..0492819 100644
--- a/media/css/A4.print.css
+++ b/media/css/A4.print.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage A4.print.css
diff --git a/questionsanswers.xml b/questionsanswers.xml
index 777be23..76a1d76 100644
--- a/questionsanswers.xml
+++ b/questionsanswers.xml
@@ -1,7 +1,7 @@
COM_QUESTIONSANSWERS
- 30th May, 2020
+ 6th January, 2021
Llewellyn van der Merwe
joomla@vdm.io
https://www.vdm.io/
diff --git a/script.php b/script.php
index 26becf5..5128da1 100644
--- a/script.php
+++ b/script.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage script.php
@@ -89,7 +89,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_done = $db->execute();
if ($question_and_answer_done)
{
- // If succesfully remove Question_and_answer add queued success message.
+ // If successfully remove Question_and_answer add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer) type alias was removed from the #__content_type table'));
}
@@ -104,7 +104,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_done = $db->execute();
if ($question_and_answer_done)
{
- // If succesfully remove Question_and_answer add queued success message.
+ // If successfully remove Question_and_answer add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer) type alias was removed from the #__contentitem_tag_map table'));
}
@@ -119,7 +119,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_done = $db->execute();
if ($question_and_answer_done)
{
- // If succesfully remove Question_and_answer add queued success message.
+ // If successfully removed Question_and_answer add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer) type alias was removed from the #__ucm_content table'));
}
@@ -175,7 +175,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_catid_done = $db->execute();
if ($question_and_answer_catid_done)
{
- // If succesfully remove Question_and_answer catid add queued success message.
+ // If successfully remove Question_and_answer catid add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer.category) type alias was removed from the #__content_type table'));
}
@@ -190,7 +190,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_catid_done = $db->execute();
if ($question_and_answer_catid_done)
{
- // If succesfully remove Question_and_answer catid add queued success message.
+ // If successfully remove Question_and_answer catid add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer.category) type alias was removed from the #__contentitem_tag_map table'));
}
@@ -205,7 +205,7 @@ class com_questionsanswersInstallerScript
$question_and_answer_catid_done = $db->execute();
if ($question_and_answer_catid_done)
{
- // If succesfully remove Question_and_answer catid add queued success message.
+ // If successfully removed Question_and_answer catid add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.question_and_answer.category) type alias was removed from the #__ucm_content table'));
}
@@ -261,7 +261,7 @@ class com_questionsanswersInstallerScript
$help_document_done = $db->execute();
if ($help_document_done)
{
- // If succesfully remove Help_document add queued success message.
+ // If successfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.help_document) type alias was removed from the #__content_type table'));
}
@@ -276,7 +276,7 @@ class com_questionsanswersInstallerScript
$help_document_done = $db->execute();
if ($help_document_done)
{
- // If succesfully remove Help_document add queued success message.
+ // If successfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.help_document) type alias was removed from the #__contentitem_tag_map table'));
}
@@ -291,7 +291,7 @@ class com_questionsanswersInstallerScript
$help_document_done = $db->execute();
if ($help_document_done)
{
- // If succesfully remove Help_document add queued success message.
+ // If successfully removed Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_questionsanswers.help_document) type alias was removed from the #__ucm_content table'));
}
@@ -335,10 +335,31 @@ class com_questionsanswersInstallerScript
$help_document_done = $db->execute();
if ($help_document_done)
{
- // If succesfully remove questionsanswers add queued success message.
+ // If successfully removed questionsanswers add queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the #__assets table'));
}
+ // Get the biggest rule column in the assets table at this point.
+ $get_rule_length = "SELECT CHAR_LENGTH(`rules`) as rule_size FROM #__assets ORDER BY rule_size DESC LIMIT 1";
+ $db->setQuery($get_rule_length);
+ if ($db->execute())
+ {
+ $rule_length = $db->loadResult();
+ // Check the size of the rules column
+ if ($rule_length < 5120)
+ {
+ // Revert the assets table rules column back to the default
+ $revert_rule = "ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.';";
+ $db->setQuery($revert_rule);
+ $db->execute();
+ $app->enqueueMessage(JText::_('Reverted the #__assets table rules column back to its default size of varchar(5120)'));
+ }
+ else
+ {
+
+ $app->enqueueMessage(JText::_('Could not revert the #__assets table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.'));
+ }
+ }
// Set db if not set already.
if (!isset($db))
@@ -602,9 +623,9 @@ class com_questionsanswersInstallerScript
$help_document->type_title = 'Questionsanswers Help_document';
$help_document->type_alias = 'com_questionsanswers.help_document';
$help_document->table = '{"special": {"dbtable": "#__questionsanswers_help_document","key": "id","type": "Help_document","prefix": "questionsanswersTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","not_required":"not_required","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}';
+ $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}';
$help_document->router = 'QuestionsanswersHelperRoute::getHelp_documentRoute';
- $help_document->content_history_options = '{"formFile": "administrator/components/com_questionsanswers/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
+ $help_document->content_history_options = '{"formFile": "administrator/components/com_questionsanswers/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
// Set the object into the content types table.
$help_document_Inserted = $db->insertObject('#__content_types', $help_document);
@@ -624,6 +645,22 @@ class com_questionsanswersInstallerScript
$db->setQuery($query);
$allDone = $db->execute();
+ // Get the biggest rule column in the assets table at this point.
+ $get_rule_length = "SELECT CHAR_LENGTH(`rules`) as rule_size FROM #__assets ORDER BY rule_size DESC LIMIT 1";
+ $db->setQuery($get_rule_length);
+ if ($db->execute())
+ {
+ $rule_length = $db->loadResult();
+ // Check the size of the rules column
+ if ($rule_length <= 7520)
+ {
+ // Fix the assets table rules column size
+ $fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` TEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to TEXT by JCB';";
+ $db->setQuery($fix_rules_size);
+ $db->execute();
+ $app->enqueueMessage(JText::_('The #__assets table rules column was resized to the TEXT datatype for the components possible large permission rules.'));
+ }
+ }
echo '
';
@@ -744,9 +781,9 @@ class com_questionsanswersInstallerScript
$help_document->type_title = 'Questionsanswers Help_document';
$help_document->type_alias = 'com_questionsanswers.help_document';
$help_document->table = '{"special": {"dbtable": "#__questionsanswers_help_document","key": "id","type": "Help_document","prefix": "questionsanswersTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","not_required":"not_required","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}';
+ $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}';
$help_document->router = 'QuestionsanswersHelperRoute::getHelp_documentRoute';
- $help_document->content_history_options = '{"formFile": "administrator/components/com_questionsanswers/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
+ $help_document->content_history_options = '{"formFile": "administrator/components/com_questionsanswers/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
// Check if help_document type is already in content_type DB.
$help_document_id = null;
diff --git a/site/assets/css/category.css b/site/assets/css/category.css
index 29534f7..3006b3e 100644
--- a/site/assets/css/category.css
+++ b/site/assets/css/category.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage category.css
diff --git a/site/assets/css/downloads.css b/site/assets/css/downloads.css
index 8533cbf..b48f176 100644
--- a/site/assets/css/downloads.css
+++ b/site/assets/css/downloads.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.css
diff --git a/site/assets/css/question_and_answer.css b/site/assets/css/question_and_answer.css
index 77ca672..d1a392b 100644
--- a/site/assets/css/question_and_answer.css
+++ b/site/assets/css/question_and_answer.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.css
diff --git a/site/assets/css/questions_and_answers.css b/site/assets/css/questions_and_answers.css
index 1a12579..5498c75 100644
--- a/site/assets/css/questions_and_answers.css
+++ b/site/assets/css/questions_and_answers.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.css
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index f87925e..c48fdfc 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage site.css
diff --git a/site/assets/js/site.js b/site/assets/js/site.js
index bc3db34..ee4ea9f 100644
--- a/site/assets/js/site.js
+++ b/site/assets/js/site.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage site.js
diff --git a/site/controller.php b/site/controller.php
index 8c79530..b0c16bd 100644
--- a/site/controller.php
+++ b/site/controller.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php
diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php
index 9a6a27a..0a4be67 100644
--- a/site/controllers/ajax.json.php
+++ b/site/controllers/ajax.json.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php
diff --git a/site/controllers/download.php b/site/controllers/download.php
index e04c93f..864c40e 100644
--- a/site/controllers/download.php
+++ b/site/controllers/download.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php
diff --git a/site/controllers/help.php b/site/controllers/help.php
index 7829659..5a4aa72 100644
--- a/site/controllers/help.php
+++ b/site/controllers/help.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php
diff --git a/site/controllers/question_and_answer.php b/site/controllers/question_and_answer.php
index 992c707..9c66b88 100644
--- a/site/controllers/question_and_answer.php
+++ b/site/controllers/question_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
diff --git a/site/helpers/category.php b/site/helpers/category.php
index 7c27672..b044254 100644
--- a/site/helpers/category.php
+++ b/site/helpers/category.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php
diff --git a/site/helpers/categoryquestion_and_answer.php b/site/helpers/categoryquestion_and_answer.php
index 73164ba..4d5a078 100644
--- a/site/helpers/categoryquestion_and_answer.php
+++ b/site/helpers/categoryquestion_and_answer.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage categoryquestion_and_answer.php
diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php
index 95d3ceb..1d6cfef 100644
--- a/site/helpers/headercheck.php
+++ b/site/helpers/headercheck.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php
diff --git a/site/helpers/questionsanswers.php b/site/helpers/questionsanswers.php
index 89eaf30..d665dbb 100644
--- a/site/helpers/questionsanswers.php
+++ b/site/helpers/questionsanswers.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@@ -26,8 +26,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\CMS\Language\Language;
-use Joomla\String\StringHelper;
+use Joomla\CMS\Language\Language;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -467,9 +468,9 @@ abstract class QuestionsanswersHelper
/**
* Change to nice fancy date
*/
- public static function fancyDate($date)
+ public static function fancyDate($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -479,9 +480,9 @@ abstract class QuestionsanswersHelper
/**
* get date based in period past
*/
- public static function fancyDynamicDate($date)
+ public static function fancyDynamicDate($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -505,9 +506,9 @@ abstract class QuestionsanswersHelper
/**
* Change to nice fancy day time and date
*/
- public static function fancyDayTimeDate($time)
+ public static function fancyDayTimeDate($time, $check_stamp = true)
{
- if (!self::isValidTimeStamp($time))
+ if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
@@ -517,9 +518,9 @@ abstract class QuestionsanswersHelper
/**
* Change to nice fancy time and date
*/
- public static function fancyDateTime($time)
+ public static function fancyDateTime($time, $check_stamp = true)
{
- if (!self::isValidTimeStamp($time))
+ if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
@@ -529,9 +530,9 @@ abstract class QuestionsanswersHelper
/**
* Change to nice hour:minutes time
*/
- public static function fancyTime($time)
+ public static function fancyTime($time, $check_stamp = true)
{
- if (!self::isValidTimeStamp($time))
+ if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
@@ -541,9 +542,9 @@ abstract class QuestionsanswersHelper
/**
* set the date day as Sunday through Saturday
*/
- public static function setDayName($date)
+ public static function setDayName($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -553,9 +554,9 @@ abstract class QuestionsanswersHelper
/**
* set the date month as January through December
*/
- public static function setMonthName($date)
+ public static function setMonthName($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -565,9 +566,9 @@ abstract class QuestionsanswersHelper
/**
* set the date day as 1st
*/
- public static function setDay($date)
+ public static function setDay($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -577,9 +578,9 @@ abstract class QuestionsanswersHelper
/**
* set the date month as 5
*/
- public static function setMonth($date)
+ public static function setMonth($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -589,9 +590,9 @@ abstract class QuestionsanswersHelper
/**
* set the date year as 2004 (for charts)
*/
- public static function setYear($date)
+ public static function setYear($date, $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -601,9 +602,9 @@ abstract class QuestionsanswersHelper
/**
* set the date as 2004/05 (for charts)
*/
- public static function setYearMonth($date, $spacer = '/')
+ public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
@@ -613,15 +614,27 @@ abstract class QuestionsanswersHelper
/**
* set the date as 2004/05/03 (for charts)
*/
- public static function setYearMonthDay($date, $spacer = '/')
+ public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
{
- if (!self::isValidTimeStamp($date))
+ if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
}
+ /**
+ * set the date as 03/05/2004
+ */
+ public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
+ {
+ if ($check_stamp && !self::isValidTimeStamp($date))
+ {
+ $date = strtotime($date);
+ }
+ return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
+ }
+
/**
* Check if string is a valid time stamp
*/
@@ -632,6 +645,16 @@ abstract class QuestionsanswersHelper
&& ($timestamp >= ~PHP_INT_MAX);
}
+ /**
+ * Check if string is a valid date
+ * https://www.php.net/manual/en/function.checkdate.php#113205
+ */
+ public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
+ {
+ $d = DateTime::createFromFormat($format, $date);
+ return $d && $d->format($format) == $date;
+ }
+
/**
* prepare base64 string for url
diff --git a/site/helpers/route.php b/site/helpers/route.php
index af206da..fe3c859 100644
--- a/site/helpers/route.php
+++ b/site/helpers/route.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage route.php
diff --git a/site/language/en-GB/en-GB.com_questionsanswers.ini b/site/language/en-GB/en-GB.com_questionsanswers.ini
index 941ef5b..73d9990 100644
--- a/site/language/en-GB/en-GB.com_questionsanswers.ini
+++ b/site/language/en-GB/en-GB.com_questionsanswers.ini
@@ -39,6 +39,8 @@ COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_CHECKED_IN_1="%d Question and
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_CHECKED_IN_MORE="%d Questions and Answers successfully checked in."
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_DELETED="%s Questions and Answers deleted."
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_DELETED_1="%s Question and Answer deleted."
+COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_FAILED_PUBLISHING="%s Questions and Answers failed publishing."
+COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_FAILED_PUBLISHING_1="%s Question and Answer failed publishing."
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_FEATURED="%s Questions and Answers featured."
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_FEATURED_1="%s Question and Answer featured."
COM_QUESTIONSANSWERS_QUESTIONS_AND_ANSWERS_N_ITEMS_PUBLISHED="%s Questions and Answers published."
diff --git a/site/layouts/question_and_answer/details_fullwidth.php b/site/layouts/question_and_answer/details_fullwidth.php
index f7e5fac..92f866f 100644
--- a/site/layouts/question_and_answer/details_fullwidth.php
+++ b/site/layouts/question_and_answer/details_fullwidth.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php
diff --git a/site/layouts/question_and_answer/details_rightside.php b/site/layouts/question_and_answer/details_rightside.php
index 3be6300..069540b 100644
--- a/site/layouts/question_and_answer/details_rightside.php
+++ b/site/layouts/question_and_answer/details_rightside.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage details_rightside.php
diff --git a/site/layouts/question_and_answer/details_under.php b/site/layouts/question_and_answer/details_under.php
index df115a9..86caebc 100644
--- a/site/layouts/question_and_answer/details_under.php
+++ b/site/layouts/question_and_answer/details_under.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php
diff --git a/site/layouts/question_and_answer/metadata.php b/site/layouts/question_and_answer/metadata.php
index e05bfbc..73ea074 100644
--- a/site/layouts/question_and_answer/metadata.php
+++ b/site/layouts/question_and_answer/metadata.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage metadata.php
diff --git a/site/layouts/question_and_answer/publishing.php b/site/layouts/question_and_answer/publishing.php
index 9b97e65..7c711e3 100644
--- a/site/layouts/question_and_answer/publishing.php
+++ b/site/layouts/question_and_answer/publishing.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php
@@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/site/models/ajax.php b/site/models/ajax.php
index b5484ca..e32bf36 100644
--- a/site/models/ajax.php
+++ b/site/models/ajax.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.php
diff --git a/site/models/category.php b/site/models/category.php
index b9c9dff..2118fdb 100644
--- a/site/models/category.php
+++ b/site/models/category.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php
diff --git a/site/models/downloads.php b/site/models/downloads.php
index aaa5f8b..f1ded9f 100644
--- a/site/models/downloads.php
+++ b/site/models/downloads.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.php
diff --git a/site/models/forms/question_and_answer.js b/site/models/forms/question_and_answer.js
index 2ab53df..e3fc70f 100644
--- a/site/models/forms/question_and_answer.js
+++ b/site/models/forms/question_and_answer.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.js
diff --git a/site/models/forms/question_and_answer.xml b/site/models/forms/question_and_answer.xml
index 9bb5b03..79967bb 100644
--- a/site/models/forms/question_and_answer.xml
+++ b/site/models/forms/question_and_answer.xml
@@ -102,6 +102,14 @@
rows="3"
cols="30"
/>
+
+
+
+
addStyleSheet('components/com_questionsanswers/assets/css/site.css');
$document->addScript('components/com_questionsanswers/assets/js/site.js');
// Require helper files
-JLoader::register('QuestionsanswersHelper', __DIR__ . '/helpers/questionsanswers.php');
+JLoader::register('QuestionsanswersHelper', __DIR__ . '/helpers/questionsanswers.php');
JLoader::register('QuestionsanswersHelperRoute', __DIR__ . '/helpers/route.php');
// Triger the Global Site Event
diff --git a/site/router.php b/site/router.php
index 27c21f5..35f327e 100644
--- a/site/router.php
+++ b/site/router.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage router.php
diff --git a/site/views/category/tmpl/default.php b/site/views/category/tmpl/default.php
index 6007071..31c98f5 100644
--- a/site/views/category/tmpl/default.php
+++ b/site/views/category/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
@@ -26,6 +26,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+
?>
items) && QuestionsanswersHelper::checkArray($this->items)): ?>
diff --git a/site/views/category/tmpl/default_qna-table.php b/site/views/category/tmpl/default_qna-table.php
index 4d5bb59..83b022e 100644
--- a/site/views/category/tmpl/default_qna-table.php
+++ b/site/views/category/tmpl/default_qna-table.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_qna-table.php
diff --git a/site/views/category/view.html.php b/site/views/category/view.html.php
index b317676..ab3db73 100644
--- a/site/views/category/view.html.php
+++ b/site/views/category/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
@@ -278,8 +278,6 @@ class QuestionsanswersViewCategory extends JViewLegacy
*/
protected function addToolBar()
{
- // adding the joomla toolbar to the front
- JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
// set help url for this view if found
$help_url = QuestionsanswersHelper::getHelpUrl('category');
diff --git a/site/views/downloads/tmpl/default.php b/site/views/downloads/tmpl/default.php
index 2cc3333..ba7b1ba 100644
--- a/site/views/downloads/tmpl/default.php
+++ b/site/views/downloads/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php
@@ -26,6 +26,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+
?>
items) && QuestionsanswersHelper::checkArray($this->items)): ?>
diff --git a/site/views/downloads/tmpl/default_qna-downloads-table.php b/site/views/downloads/tmpl/default_qna-downloads-table.php
index 834480b..ef2aae5 100644
--- a/site/views/downloads/tmpl/default_qna-downloads-table.php
+++ b/site/views/downloads/tmpl/default_qna-downloads-table.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage default_qna-downloads-table.php
diff --git a/site/views/downloads/view.html.php b/site/views/downloads/view.html.php
index 45ab399..171d484 100644
--- a/site/views/downloads/view.html.php
+++ b/site/views/downloads/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php
@@ -278,8 +278,6 @@ class QuestionsanswersViewDownloads extends JViewLegacy
*/
protected function addToolBar()
{
- // adding the joomla toolbar to the front
- JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
// set help url for this view if found
$help_url = QuestionsanswersHelper::getHelpUrl('downloads');
diff --git a/site/views/question_and_answer/submitbutton.js b/site/views/question_and_answer/submitbutton.js
index 62a9528..14c1071 100644
--- a/site/views/question_and_answer/submitbutton.js
+++ b/site/views/question_and_answer/submitbutton.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js
diff --git a/site/views/question_and_answer/tmpl/edit.php b/site/views/question_and_answer/tmpl/edit.php
index 868719b..1f1abe9 100644
--- a/site/views/question_and_answer/tmpl/edit.php
+++ b/site/views/question_and_answer/tmpl/edit.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php
@@ -26,15 +26,15 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
-JHtml::_('behavior.tooltip');
-JHtml::_('behavior.formvalidation');
-JHtml::_('formbehavior.chosen', 'select');
-JHtml::_('behavior.keepalive');
-JHtml::_('behavior.tabstate');
+JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
+JHtml::_('behavior.tooltip');
+JHtml::_('behavior.formvalidation');
+JHtml::_('formbehavior.chosen', 'select');
+JHtml::_('behavior.keepalive');
+JHtml::_('behavior.tabstate');
JHtml::_('behavior.calendar');
-$componentParams = $this->params; // will be removed just use $this->params instead
?>
+ |