diff --git a/README.md b/README.md index a4b0650..2272962 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Questions and Answers (1.0.x) +# Questions and Answers (1.1.x) This is a [Joomla 3.x](http://www.joomla.org/) component. @@ -12,15 +12,15 @@ Just a basic Questions & Answers. + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Questions and Answers](https://www.vdm.io/) + *First Build*: 30th January, 2017 -+ *Last Build*: 2nd March, 2022 -+ *Version*: 1.0.x ++ *Last Build*: 27th May, 2022 ++ *Version*: 1.1.x + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html # Component Number -+ *Line count*: **31397** -+ *File count*: **207** ++ *Line count*: **31488** ++ *File count*: **208** + *Folder count*: **63** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). diff --git a/admin/README.txt b/admin/README.txt index a4b0650..2272962 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,4 +1,4 @@ -# Questions and Answers (1.0.x) +# Questions and Answers (1.1.x) This is a [Joomla 3.x](http://www.joomla.org/) component. @@ -12,15 +12,15 @@ Just a basic Questions & Answers. + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Questions and Answers](https://www.vdm.io/) + *First Build*: 30th January, 2017 -+ *Last Build*: 2nd March, 2022 -+ *Version*: 1.0.x ++ *Last Build*: 27th May, 2022 ++ *Version*: 1.1.x + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html # Component Number -+ *Line count*: **31397** -+ *File count*: **207** ++ *Line count*: **31488** ++ *File count*: **208** + *Folder count*: **63** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 78aa8b4..5efffb4 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage admin.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index efc28b4..9b6dcbd 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage dashboard.css diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index 5b5080d..4a52038 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_document.css diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index 3e886aa..ef13e03 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_documents.css diff --git a/admin/assets/css/question_and_answer.css b/admin/assets/css/question_and_answer.css index f9ef6a5..04908a0 100644 --- a/admin/assets/css/question_and_answer.css +++ b/admin/assets/css/question_and_answer.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.css diff --git a/admin/assets/css/questions_and_answers.css b/admin/assets/css/questions_and_answers.css index b2e3e2a..8b9804d 100644 --- a/admin/assets/css/questions_and_answers.css +++ b/admin/assets/css/questions_and_answers.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questions_and_answers.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index b49ad4d..b91c0e3 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage admin.js diff --git a/admin/controller.php b/admin/controller.php index 35afb4a..1fa6bc2 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage controller.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** * General Controller of Questionsanswers component */ -class QuestionsanswersController extends JControllerLegacy +class QuestionsanswersController extends BaseController { /** * Constructor. diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 9edea8f..cf2b450 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage ajax.json.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Ajax Controller + * Questionsanswers Ajax Base Controller */ -class QuestionsanswersControllerAjax extends JControllerLegacy +class QuestionsanswersControllerAjax extends BaseController { public function __construct($config) { diff --git a/admin/controllers/download.php b/admin/controllers/download.php index baf5353..21dc718 100644 --- a/admin/controllers/download.php +++ b/admin/controllers/download.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage download.php diff --git a/admin/controllers/help.php b/admin/controllers/help.php index 3b3912b..e6b38dc 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Help Controller + * Questionsanswers Help Base Controller */ -class QuestionsanswersControllerHelp extends JControllerLegacy +class QuestionsanswersControllerHelp extends BaseController { public function __construct($config) { diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index c586a7d..c0b2085 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_document.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\FormController; use Joomla\Utilities\ArrayHelper; /** - * Help_document Controller + * Help_document Form Controller */ -class QuestionsanswersControllerHelp_document extends JControllerForm +class QuestionsanswersControllerHelp_document extends FormController { /** * Current or most recently performed task. diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index 188330d..a1c5277 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_documents.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; /** - * Help_documents Controller + * Help_documents Admin Controller */ -class QuestionsanswersControllerHelp_documents extends JControllerAdmin +class QuestionsanswersControllerHelp_documents extends AdminController { /** * The prefix to use with controller messages. diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 72549e5..24ee109 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage import.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Import Controller + * Questionsanswers Import Base Controller */ -class QuestionsanswersControllerImport extends JControllerLegacy +class QuestionsanswersControllerImport extends BaseController { /** * Import an spreadsheet. diff --git a/admin/controllers/question_and_answer.php b/admin/controllers/question_and_answer.php index d0b429f..a53d5f4 100644 --- a/admin/controllers/question_and_answer.php +++ b/admin/controllers/question_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\FormController; use Joomla\Utilities\ArrayHelper; /** - * Question_and_answer Controller + * Question_and_answer Form Controller */ -class QuestionsanswersControllerQuestion_and_answer extends JControllerForm +class QuestionsanswersControllerQuestion_and_answer extends FormController { /** * Current or most recently performed task. diff --git a/admin/controllers/questions_and_answers.php b/admin/controllers/questions_and_answers.php index 6439fc0..e161a1b 100644 --- a/admin/controllers/questions_and_answers.php +++ b/admin/controllers/questions_and_answers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questions_and_answers.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; /** - * Questions_and_answers Controller + * Questions_and_answers Admin Controller */ -class QuestionsanswersControllerQuestions_and_answers extends JControllerAdmin +class QuestionsanswersControllerQuestions_and_answers extends AdminController { /** * The prefix to use with controller messages. diff --git a/admin/controllers/questionsanswers.php b/admin/controllers/questionsanswers.php index 7eb0342..3970af8 100644 --- a/admin/controllers/questionsanswers.php +++ b/admin/controllers/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); - +use Joomla\CMS\MVC\Controller\AdminController; +use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Controller + * Questionsanswers Admin Controller */ -class QuestionsanswersControllerQuestionsanswers extends JControllerAdmin +class QuestionsanswersControllerQuestionsanswers extends AdminController { } diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 4eece99..f7d2903 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 5e8c51d..aef6255 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage batch_.php diff --git a/admin/helpers/questionsanswers.php b/admin/helpers/questionsanswers.php index 7dabc5c..31dd764 100644 --- a/admin/helpers/questionsanswers.php +++ b/admin/helpers/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php @@ -878,12 +878,12 @@ abstract class QuestionsanswersHelper } /** - * File Extension to Mimetype + * File Extensions to Mimetypes * https://gist.github.com/Llewellynvdm/74be373357e131b8775a7582c3de508b * http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types - * + * * @var array - **/ + */ protected static $fileExtensionToMimeType = array( '123' => 'application/vnd.lotus-1-2-3', '3dml' => 'text/vnd.in3d.3dml', @@ -1428,6 +1428,7 @@ abstract class QuestionsanswersHelper 'opf' => 'application/oebps-package+xml', 'opml' => 'text/x-opml', 'oprc' => 'application/vnd.palm', + 'opus' => 'audio/ogg', 'org' => 'application/vnd.lotus-organizer', 'osf' => 'application/vnd.yamaha.openscoreformat', 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', @@ -1889,7 +1890,7 @@ abstract class QuestionsanswersHelper */ // get the extension form file - $extension = \strtolower(\pathinfo($file, \PATHINFO_EXTENSION)); + $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION)); // check if we have the extension listed if (isset(self::$fileExtensionToMimeType[$extension])) { @@ -3693,3 +3694,4 @@ abstract class QuestionsanswersHelper return $default; } } + diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 80023f4..22a45fb 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage batchselection.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 303197a..ddeab28 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index ebd0865..d75571d 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 451044a..c1676a9 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 2cf3feb..f7404ec 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 3da1f91..5d729ab 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 6b451d6..787b844 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 72de9f3..ce703da 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage publlshing.php diff --git a/admin/layouts/question_and_answer/details_fullwidth.php b/admin/layouts/question_and_answer/details_fullwidth.php index bba1dcd..0582af4 100644 --- a/admin/layouts/question_and_answer/details_fullwidth.php +++ b/admin/layouts/question_and_answer/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_fullwidth.php diff --git a/admin/layouts/question_and_answer/details_rightside.php b/admin/layouts/question_and_answer/details_rightside.php index eccc407..a6dd27f 100644 --- a/admin/layouts/question_and_answer/details_rightside.php +++ b/admin/layouts/question_and_answer/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_rightside.php diff --git a/admin/layouts/question_and_answer/details_under.php b/admin/layouts/question_and_answer/details_under.php index 5db8331..af4d11d 100644 --- a/admin/layouts/question_and_answer/details_under.php +++ b/admin/layouts/question_and_answer/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage details_under.php diff --git a/admin/layouts/question_and_answer/metadata.php b/admin/layouts/question_and_answer/metadata.php index 180adac..0bf41e4 100644 --- a/admin/layouts/question_and_answer/metadata.php +++ b/admin/layouts/question_and_answer/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage metadata.php diff --git a/admin/layouts/question_and_answer/publishing.php b/admin/layouts/question_and_answer/publishing.php index cf577b9..0d85944 100644 --- a/admin/layouts/question_and_answer/publishing.php +++ b/admin/layouts/question_and_answer/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage publishing.php diff --git a/admin/layouts/trashhelper.php b/admin/layouts/trashhelper.php index a027129..f3ac039 100644 --- a/admin/layouts/trashhelper.php +++ b/admin/layouts/trashhelper.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage trashhelper.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 5367a1f..f62f951 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage ajax.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Ajax Model + * Questionsanswers Ajax List Model */ -class QuestionsanswersModelAjax extends JModelList +class QuestionsanswersModelAjax extends ListModel { protected $app_params; @@ -45,8 +46,22 @@ class QuestionsanswersModelAjax extends JModelList // Used in question_and_answer + /** + * The view persistence details + * + * @var array + * @since 1.0.0 + */ protected $viewid = array(); + /** + * The view details loaded via the session + * + * @input string $call The state key + * + * @return mixed + * @since 1.0.0 + */ protected function getViewID($call = 'table') { if (!isset($this->viewid[$call])) diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index e80c373..3362ecc 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/alloweddocumentformats.php b/admin/models/fields/alloweddocumentformats.php index be26556..e165687 100644 --- a/admin/models/fields/alloweddocumentformats.php +++ b/admin/models/fields/alloweddocumentformats.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage alloweddocumentformats.php diff --git a/admin/models/fields/allowedimageformats.php b/admin/models/fields/allowedimageformats.php index d4b9d50..aadca8b 100644 --- a/admin/models/fields/allowedimageformats.php +++ b/admin/models/fields/allowedimageformats.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage allowedimageformats.php diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 4f35a8e..6fc6624 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage articles.php diff --git a/admin/models/fields/helpdocumentsfilterlocation.php b/admin/models/fields/helpdocumentsfilterlocation.php index 677ee74..f6b1874 100644 --- a/admin/models/fields/helpdocumentsfilterlocation.php +++ b/admin/models/fields/helpdocumentsfilterlocation.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage helpdocumentsfilterlocation.php diff --git a/admin/models/fields/helpdocumentsfiltertype.php b/admin/models/fields/helpdocumentsfiltertype.php index 9a40e6b..e82decb 100644 --- a/admin/models/fields/helpdocumentsfiltertype.php +++ b/admin/models/fields/helpdocumentsfiltertype.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage helpdocumentsfiltertype.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index ac549c0..86c9227 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage siteviewfolderlist.php diff --git a/admin/models/help_document.php b/admin/models/help_document.php index ad2d4b6..4c305b7 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_document.php @@ -26,14 +26,15 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\AdminModel; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Help_document Model + * Questionsanswers Help_document Admin Model */ -class QuestionsanswersModelHelp_document extends JModelAdmin +class QuestionsanswersModelHelp_document extends AdminModel { /** * The tab layout fields array. diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 76aff81..3bc628a 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_documents.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Help_documents Model + * Help_documents List Model */ -class QuestionsanswersModelHelp_documents extends JModelList +class QuestionsanswersModelHelp_documents extends ListModel { public function __construct($config = array()) { diff --git a/admin/models/import.php b/admin/models/import.php index 9b97198..901cd9e 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage import.php @@ -26,15 +26,16 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; /** - * Questionsanswers Import Model + * Questionsanswers Import Base Database Model */ -class QuestionsanswersModelImport extends JModelLegacy +class QuestionsanswersModelImport extends BaseDatabaseModel { // set uploading values protected $use_streams = false; diff --git a/admin/models/question_and_answer.php b/admin/models/question_and_answer.php index 0069923..b1af2a9 100644 --- a/admin/models/question_and_answer.php +++ b/admin/models/question_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.php @@ -26,14 +26,15 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\AdminModel; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Question_and_answer Model + * Questionsanswers Question_and_answer Admin Model */ -class QuestionsanswersModelQuestion_and_answer extends JModelAdmin +class QuestionsanswersModelQuestion_and_answer extends AdminModel { /** * The tab layout fields array. diff --git a/admin/models/questions_and_answers.php b/admin/models/questions_and_answers.php index dd5a1c4..3f4c002 100644 --- a/admin/models/questions_and_answers.php +++ b/admin/models/questions_and_answers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questions_and_answers.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questions_and_answers Model + * Questions_and_answers List Model */ -class QuestionsanswersModelQuestions_and_answers extends JModelList +class QuestionsanswersModelQuestions_and_answers extends ListModel { public function __construct($config = array()) { diff --git a/admin/models/questionsanswers.php b/admin/models/questionsanswers.php index 4d5e4fa..5183674 100644 --- a/admin/models/questionsanswers.php +++ b/admin/models/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); - +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Model + * Questionsanswers List Model */ -class QuestionsanswersModelQuestionsanswers extends JModelList +class QuestionsanswersModelQuestionsanswers extends ListModel { public function getIcons() { @@ -325,7 +326,7 @@ jQuery(document).ready( function($) { jQuery(document).ready(function () { jQuery.get(getreadme) .success(function(readme) { - jQuery("#readme-md").html(marked(readme)); + jQuery("#readme-md").html(marked.parse(readme)); }) .error(function(jqXHR, textStatus, errorThrown) { jQuery("#readme-md").html("'.JText::_('COM_QUESTIONSANSWERS_PLEASE_CHECK_AGAIN_LATTER').'"); diff --git a/admin/questionsanswers.php b/admin/questionsanswers.php index 8db9f56..b35f2c5 100644 --- a/admin/questionsanswers.php +++ b/admin/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php diff --git a/admin/sql/updates/mysql/1.0.4.sql b/admin/sql/updates/mysql/1.0.4.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/admin/sql/updates/mysql/1.0.4.sql @@ -0,0 +1 @@ + diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index c15cc7e..7ee4e9d 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_document.php @@ -26,6 +26,7 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Table\Table; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -33,7 +34,7 @@ use Joomla\Utilities\ArrayHelper; /** * Help_documents Table class */ -class QuestionsanswersTableHelp_document extends JTable +class QuestionsanswersTableHelp_document extends Table { /** * Ensure the params and metadata in json encoded in the bind method diff --git a/admin/tables/question_and_answer.php b/admin/tables/question_and_answer.php index 1654478..899f4f0 100644 --- a/admin/tables/question_and_answer.php +++ b/admin/tables/question_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.php @@ -26,6 +26,7 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Table\Table; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -33,7 +34,7 @@ use Joomla\Utilities\ArrayHelper; /** * Questions_and_answers Table class */ -class QuestionsanswersTableQuestion_and_answer extends JTable +class QuestionsanswersTableQuestion_and_answer extends Table { /** * Ensure the params and metadata in json encoded in the bind method diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js index 4d88acc..477f990 100644 --- a/admin/views/help_document/submitbutton.js +++ b/admin/views/help_document/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage submitbutton.js diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 53cae7e..df0ab6d 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage edit.php diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php index c56009f..a6cd01a 100644 --- a/admin/views/help_document/view.html.php +++ b/admin/views/help_document/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,10 +26,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; + /** - * Help_document View class + * Help_document Html View class */ -class QuestionsanswersViewHelp_document extends JViewLegacy +class QuestionsanswersViewHelp_document extends HtmlView { /** * display method of View diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 31f36ff..24cc702 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php diff --git a/admin/views/help_documents/tmpl/default_batch_body.php b/admin/views/help_documents/tmpl/default_batch_body.php index a2baa97..7c6e1b9 100644 --- a/admin/views/help_documents/tmpl/default_batch_body.php +++ b/admin/views/help_documents/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_batch_body.php diff --git a/admin/views/help_documents/tmpl/default_batch_footer.php b/admin/views/help_documents/tmpl/default_batch_footer.php index ca0a903..e79de4f 100644 --- a/admin/views/help_documents/tmpl/default_batch_footer.php +++ b/admin/views/help_documents/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_batch_footer.php diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php index 9824c9b..aebe818 100644 --- a/admin/views/help_documents/tmpl/default_body.php +++ b/admin/views/help_documents/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_body.php diff --git a/admin/views/help_documents/tmpl/default_foot.php b/admin/views/help_documents/tmpl/default_foot.php index cc5f644..388453f 100644 --- a/admin/views/help_documents/tmpl/default_foot.php +++ b/admin/views/help_documents/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_foot.php diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index 7fb059e..d1c8706 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_head.php diff --git a/admin/views/help_documents/tmpl/default_toolbar.php b/admin/views/help_documents/tmpl/default_toolbar.php index 1ed5676..1396d46 100644 --- a/admin/views/help_documents/tmpl/default_toolbar.php +++ b/admin/views/help_documents/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_toolbar.php diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 9a5033d..550a1c6 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,10 +26,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; + /** - * Questionsanswers View class for the Help_documents + * Questionsanswers Html View class for the Help_documents */ -class QuestionsanswersViewHelp_documents extends JViewLegacy +class QuestionsanswersViewHelp_documents extends HtmlView { /** * Help_documents view display method diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index ce3dc2b..e49ed9e 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index f0b0276..eed28f0 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,10 +26,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; + /** - * Questionsanswers Import View + * Questionsanswers Import Html View */ -class QuestionsanswersViewImport extends JViewLegacy +class QuestionsanswersViewImport extends HtmlView { protected $headerList; protected $hasPackage = false; diff --git a/admin/views/question_and_answer/submitbutton.js b/admin/views/question_and_answer/submitbutton.js index 48186f0..c124bf3 100644 --- a/admin/views/question_and_answer/submitbutton.js +++ b/admin/views/question_and_answer/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage submitbutton.js diff --git a/admin/views/question_and_answer/tmpl/edit.php b/admin/views/question_and_answer/tmpl/edit.php index 24a8bdc..29e99cc 100644 --- a/admin/views/question_and_answer/tmpl/edit.php +++ b/admin/views/question_and_answer/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage edit.php diff --git a/admin/views/question_and_answer/view.html.php b/admin/views/question_and_answer/view.html.php index 5c62d0a..575e4bf 100644 --- a/admin/views/question_and_answer/view.html.php +++ b/admin/views/question_and_answer/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,10 +26,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; + /** - * Question_and_answer View class + * Question_and_answer Html View class */ -class QuestionsanswersViewQuestion_and_answer extends JViewLegacy +class QuestionsanswersViewQuestion_and_answer extends HtmlView { /** * display method of View diff --git a/admin/views/questions_and_answers/tmpl/default.php b/admin/views/questions_and_answers/tmpl/default.php index 462de8f..3852c52 100644 --- a/admin/views/questions_and_answers/tmpl/default.php +++ b/admin/views/questions_and_answers/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php 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 dab3680..78a4749 100644 --- a/admin/views/questions_and_answers/tmpl/default_batch_body.php +++ b/admin/views/questions_and_answers/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_batch_body.php 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 9ab9973..8f572cb 100644 --- a/admin/views/questions_and_answers/tmpl/default_batch_footer.php +++ b/admin/views/questions_and_answers/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_batch_footer.php diff --git a/admin/views/questions_and_answers/tmpl/default_body.php b/admin/views/questions_and_answers/tmpl/default_body.php index 3700da0..c0e656c 100644 --- a/admin/views/questions_and_answers/tmpl/default_body.php +++ b/admin/views/questions_and_answers/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_body.php diff --git a/admin/views/questions_and_answers/tmpl/default_foot.php b/admin/views/questions_and_answers/tmpl/default_foot.php index e0e8ef6..88fd309 100644 --- a/admin/views/questions_and_answers/tmpl/default_foot.php +++ b/admin/views/questions_and_answers/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 d7fdf74..4aeb9b8 100644 --- a/admin/views/questions_and_answers/tmpl/default_head.php +++ b/admin/views/questions_and_answers/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_head.php diff --git a/admin/views/questions_and_answers/tmpl/default_toolbar.php b/admin/views/questions_and_answers/tmpl/default_toolbar.php index 467826f..3d93695 100644 --- a/admin/views/questions_and_answers/tmpl/default_toolbar.php +++ b/admin/views/questions_and_answers/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 77a3d8b..cbcfbb4 100644 --- a/admin/views/questions_and_answers/view.html.php +++ b/admin/views/questions_and_answers/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Filesystem\File; /** - * Questionsanswers View class for the Questions_and_answers + * Questionsanswers Html View class for the Questions_and_answers */ -class QuestionsanswersViewQuestions_and_answers extends JViewLegacy +class QuestionsanswersViewQuestions_and_answers extends HtmlView { /** * Questions_and_answers view display method diff --git a/admin/views/questionsanswers/tmpl/default.php b/admin/views/questionsanswers/tmpl/default.php index 09d812b..7c16f55 100644 --- a/admin/views/questionsanswers/tmpl/default.php +++ b/admin/views/questionsanswers/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 fe885ba..9764cb4 100644 --- a/admin/views/questionsanswers/tmpl/default_main.php +++ b/admin/views/questionsanswers/tmpl/default_main.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 d73ea63..da43614 100644 --- a/admin/views/questionsanswers/tmpl/default_readme_information.php +++ b/admin/views/questionsanswers/tmpl/default_readme_information.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 417de05..2b73c1f 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 @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 4c1b4bf..9a94126 100644 --- a/admin/views/questionsanswers/tmpl/default_vdm.php +++ b/admin/views/questionsanswers/tmpl/default_vdm.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 e619c8e..1960a8e 100644 --- a/admin/views/questionsanswers/view.html.php +++ b/admin/views/questionsanswers/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 b470978..31cb21a 100644 --- a/media/css/A4.print.css +++ b/media/css/A4.print.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage A4.print.css diff --git a/media/js/help_document.js b/media/js/help_document.js index e5d207c..9a67579 100644 --- a/media/js/help_document.js +++ b/media/js/help_document.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help_document.js diff --git a/media/js/question_and_answer.js b/media/js/question_and_answer.js index dfc44ac..4ad7233 100644 --- a/media/js/question_and_answer.js +++ b/media/js/question_and_answer.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.js diff --git a/questionsanswers.xml b/questionsanswers.xml index d4f6ba5..75b9418 100644 --- a/questionsanswers.xml +++ b/questionsanswers.xml @@ -1,15 +1,15 @@ COM_QUESTIONSANSWERS - 2nd March, 2022 + 27th May, 2022 Llewellyn van der Merwe joomla@vdm.io https://www.vdm.io/ Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 1.0.4 + 1.1.0 Questions and Answers (v.1.0.4) +

Questions and Answers (v.1.1.0)

Just a basic Questions & Answers.

Created by Llewellyn van der Merwe
Development started 30th January, 2017

diff --git a/questionsanswers_server.xml b/questionsanswers_server.xml index 78fccfc..718935a 100644 --- a/questionsanswers_server.xml +++ b/questionsanswers_server.xml @@ -7,7 +7,7 @@ 1.0.2 https://www.vdm.io/ - https://github.com/vdm-io/Joomla-Questions-and-Answers/archive/master.zip + https://git.vdm.dev/joomla/Questions-and-Answers/archive/v1.0.4.zip stable @@ -24,7 +24,24 @@ 1.0.4 https://www.vdm.io/ - https://github.com/vdm-io/Joomla-Questions-and-Answers/archive/master.zip + https://git.vdm.dev/joomla/Questions-and-Answers/archive/v1.0.4.zip + + + stable + + Llewellyn van der Merwe + https://www.vdm.io/ + + + + Questions and Answers + Questions & Answers + com_questionsanswers + component + 1.1.0 + https://www.vdm.io/ + + https://git.vdm.dev/joomla/Questions-and-Answers/archive/v1.1.0.zip stable diff --git a/script.php b/script.php index 9d68f9a..ef25860 100644 --- a/script.php +++ b/script.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage script.php @@ -812,7 +812,7 @@ class com_questionsanswersInstallerScript echo ' -

Upgrade to Version 1.0.4 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 1.1.0 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) diff --git a/site/assets/css/category.css b/site/assets/css/category.css index cec95dd..b37999a 100644 --- a/site/assets/css/category.css +++ b/site/assets/css/category.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 98e7e23..7e99264 100644 --- a/site/assets/css/downloads.css +++ b/site/assets/css/downloads.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 f9ef6a5..04908a0 100644 --- a/site/assets/css/question_and_answer.css +++ b/site/assets/css/question_and_answer.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 862d4ff..7501cc9 100644 --- a/site/assets/css/questions_and_answers.css +++ b/site/assets/css/questions_and_answers.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 092d9f2..ad85bc6 100644 --- a/site/assets/css/site.css +++ b/site/assets/css/site.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 7968bcb..079b60a 100644 --- a/site/assets/js/site.js +++ b/site/assets/js/site.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage site.js diff --git a/site/controller.php b/site/controller.php index 1832934..4830928 100644 --- a/site/controller.php +++ b/site/controller.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage controller.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Component Controller + * Questionsanswers Component Base Controller */ -class QuestionsanswersController extends JControllerLegacy +class QuestionsanswersController extends BaseController { /** * Method to display a view. diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php index a771003..ec866c8 100644 --- a/site/controllers/ajax.json.php +++ b/site/controllers/ajax.json.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage ajax.json.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Ajax Controller + * Questionsanswers Ajax Base Controller */ -class QuestionsanswersControllerAjax extends JControllerLegacy +class QuestionsanswersControllerAjax extends BaseController { public function __construct($config) { diff --git a/site/controllers/download.php b/site/controllers/download.php index baf5353..21dc718 100644 --- a/site/controllers/download.php +++ b/site/controllers/download.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage download.php diff --git a/site/controllers/help.php b/site/controllers/help.php index a50a336..14308e6 100644 --- a/site/controllers/help.php +++ b/site/controllers/help.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage help.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Help Controller + * Questionsanswers Help Base Controller */ -class QuestionsanswersControllerHelp extends JControllerLegacy +class QuestionsanswersControllerHelp extends BaseController { public function __construct($config) { diff --git a/site/controllers/question_and_answer.php b/site/controllers/question_and_answer.php index f076a17..69ccc80 100644 --- a/site/controllers/question_and_answer.php +++ b/site/controllers/question_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\FormController; use Joomla\Utilities\ArrayHelper; /** - * Question_and_answer Controller + * Question_and_answer Form Controller */ -class QuestionsanswersControllerQuestion_and_answer extends JControllerForm +class QuestionsanswersControllerQuestion_and_answer extends FormController { /** * Current or most recently performed task. diff --git a/site/helpers/category.php b/site/helpers/category.php index 4c2cd86..568a793 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 884da65..cfdbb41 100644 --- a/site/helpers/categoryquestion_and_answer.php +++ b/site/helpers/categoryquestion_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 4eece99..f7d2903 100644 --- a/site/helpers/headercheck.php +++ b/site/helpers/headercheck.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage headercheck.php diff --git a/site/helpers/questionsanswers.php b/site/helpers/questionsanswers.php index 57e5903..0e0811d 100644 --- a/site/helpers/questionsanswers.php +++ b/site/helpers/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php @@ -875,12 +875,12 @@ abstract class QuestionsanswersHelper } /** - * File Extension to Mimetype + * File Extensions to Mimetypes * https://gist.github.com/Llewellynvdm/74be373357e131b8775a7582c3de508b * http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types - * + * * @var array - **/ + */ protected static $fileExtensionToMimeType = array( '123' => 'application/vnd.lotus-1-2-3', '3dml' => 'text/vnd.in3d.3dml', @@ -1425,6 +1425,7 @@ abstract class QuestionsanswersHelper 'opf' => 'application/oebps-package+xml', 'opml' => 'text/x-opml', 'oprc' => 'application/vnd.palm', + 'opus' => 'audio/ogg', 'org' => 'application/vnd.lotus-organizer', 'osf' => 'application/vnd.yamaha.openscoreformat', 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', @@ -1886,7 +1887,7 @@ abstract class QuestionsanswersHelper */ // get the extension form file - $extension = \strtolower(\pathinfo($file, \PATHINFO_EXTENSION)); + $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION)); // check if we have the extension listed if (isset(self::$fileExtensionToMimeType[$extension])) { @@ -3454,3 +3455,4 @@ abstract class QuestionsanswersHelper return $default; } } + diff --git a/site/helpers/route.php b/site/helpers/route.php index 87f46ca..9381a3a 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage route.php diff --git a/site/layouts/question_and_answer/details_fullwidth.php b/site/layouts/question_and_answer/details_fullwidth.php index bba1dcd..0582af4 100644 --- a/site/layouts/question_and_answer/details_fullwidth.php +++ b/site/layouts/question_and_answer/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 eccc407..a6dd27f 100644 --- a/site/layouts/question_and_answer/details_rightside.php +++ b/site/layouts/question_and_answer/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 5db8331..af4d11d 100644 --- a/site/layouts/question_and_answer/details_under.php +++ b/site/layouts/question_and_answer/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 180adac..0bf41e4 100644 --- a/site/layouts/question_and_answer/metadata.php +++ b/site/layouts/question_and_answer/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 cf577b9..0d85944 100644 --- a/site/layouts/question_and_answer/publishing.php +++ b/site/layouts/question_and_answer/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage publishing.php diff --git a/site/models/ajax.php b/site/models/ajax.php index b562b2a..b31583c 100644 --- a/site/models/ajax.php +++ b/site/models/ajax.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage ajax.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Ajax Model + * Questionsanswers Ajax List Model */ -class QuestionsanswersModelAjax extends JModelList +class QuestionsanswersModelAjax extends ListModel { protected $app_params; @@ -45,8 +46,22 @@ class QuestionsanswersModelAjax extends JModelList // Used in question_and_answer + /** + * The view persistence details + * + * @var array + * @since 1.0.0 + */ protected $viewid = array(); + /** + * The view details loaded via the session + * + * @input string $call The state key + * + * @return mixed + * @since 1.0.0 + */ protected function getViewID($call = 'table') { if (!isset($this->viewid[$call])) diff --git a/site/models/category.php b/site/models/category.php index f7fd223..e183308 100644 --- a/site/models/category.php +++ b/site/models/category.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage category.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Model for Category + * Questionsanswers List Model for Category */ -class QuestionsanswersModelCategory extends JModelList +class QuestionsanswersModelCategory extends ListModel { /** * Model user data. diff --git a/site/models/downloads.php b/site/models/downloads.php index a74c21a..77f017a 100644 --- a/site/models/downloads.php +++ b/site/models/downloads.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage downloads.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Model for Downloads + * Questionsanswers List Model for Downloads */ -class QuestionsanswersModelDownloads extends JModelList +class QuestionsanswersModelDownloads extends ListModel { /** * Model user data. diff --git a/site/models/forms/question_and_answer.js b/site/models/forms/question_and_answer.js index dfc44ac..4ad7233 100644 --- a/site/models/forms/question_and_answer.js +++ b/site/models/forms/question_and_answer.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.js diff --git a/site/models/question_and_answer.php b/site/models/question_and_answer.php index 0069923..b1af2a9 100644 --- a/site/models/question_and_answer.php +++ b/site/models/question_and_answer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage question_and_answer.php @@ -26,14 +26,15 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\AdminModel; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Question_and_answer Model + * Questionsanswers Question_and_answer Admin Model */ -class QuestionsanswersModelQuestion_and_answer extends JModelAdmin +class QuestionsanswersModelQuestion_and_answer extends AdminModel { /** * The tab layout fields array. diff --git a/site/models/questions_and_answers.php b/site/models/questions_and_answers.php index 987b1cb..92b21c4 100644 --- a/site/models/questions_and_answers.php +++ b/site/models/questions_and_answers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questions_and_answers.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; /** - * Questionsanswers Model for Questions_and_answers + * Questionsanswers List Model for Questions_and_answers */ -class QuestionsanswersModelQuestions_and_answers extends JModelList +class QuestionsanswersModelQuestions_and_answers extends ListModel { /** * Model user data. diff --git a/site/questionsanswers.php b/site/questionsanswers.php index ba11259..3c7cdb9 100644 --- a/site/questionsanswers.php +++ b/site/questionsanswers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage questionsanswers.php diff --git a/site/router.php b/site/router.php index f4961c8..79412a2 100644 --- a/site/router.php +++ b/site/router.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 633e6e1..28f274f 100644 --- a/site/views/category/tmpl/default.php +++ b/site/views/category/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php diff --git a/site/views/category/tmpl/default_qna-table.php b/site/views/category/tmpl/default_qna-table.php index cc30dd3..74d3961 100644 --- a/site/views/category/tmpl/default_qna-table.php +++ b/site/views/category/tmpl/default_qna-table.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 2d5ea1f..a51bd2b 100644 --- a/site/views/category/view.html.php +++ b/site/views/category/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Filesystem\File; /** - * Questionsanswers View class for the Category + * Questionsanswers Html View class for the Category */ -class QuestionsanswersViewCategory extends JViewLegacy +class QuestionsanswersViewCategory extends HtmlView { // Overwriting JView display method function display($tpl = null) @@ -154,12 +155,12 @@ class QuestionsanswersViewCategory extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); } // Load the script to find all uikit components needed. @@ -184,13 +185,13 @@ class QuestionsanswersViewCategory extends JViewLegacy if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); } } } @@ -202,21 +203,21 @@ class QuestionsanswersViewCategory extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', ['version' => 'auto']); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', ['version' => 'auto']); } } // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_questionsanswers/footable-v3/js/footable.min.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('stylesheet', 'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']); + // Add the JavaScript for Footable (adding all functions) + JHtml::_('script', 'media/com_questionsanswers/footable-v3/js/footable.min.js', ['version' => 'auto']); // load the meta description if ($this->params->get('menu-meta_description')) { diff --git a/site/views/downloads/tmpl/default.php b/site/views/downloads/tmpl/default.php index f69aa60..80e554f 100644 --- a/site/views/downloads/tmpl/default.php +++ b/site/views/downloads/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php diff --git a/site/views/downloads/tmpl/default_qna-downloads-table.php b/site/views/downloads/tmpl/default_qna-downloads-table.php index 9755f90..58e6adc 100644 --- a/site/views/downloads/tmpl/default_qna-downloads-table.php +++ b/site/views/downloads/tmpl/default_qna-downloads-table.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 8be6f1a..82436f2 100644 --- a/site/views/downloads/view.html.php +++ b/site/views/downloads/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Filesystem\File; /** - * Questionsanswers View class for the Downloads + * Questionsanswers Html View class for the Downloads */ -class QuestionsanswersViewDownloads extends JViewLegacy +class QuestionsanswersViewDownloads extends HtmlView { // Overwriting JView display method function display($tpl = null) @@ -154,12 +155,12 @@ class QuestionsanswersViewDownloads extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); } // Load the script to find all uikit components needed. @@ -184,13 +185,13 @@ class QuestionsanswersViewDownloads extends JViewLegacy if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); } } } @@ -202,21 +203,21 @@ class QuestionsanswersViewDownloads extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', ['version' => 'auto']); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', ['version' => 'auto']); } } // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_questionsanswers/footable-v3/js/footable.min.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('stylesheet', 'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']); + // Add the JavaScript for Footable (adding all functions) + JHtml::_('script', 'media/com_questionsanswers/footable-v3/js/footable.min.js', ['version' => 'auto']); // load the meta description if ($this->params->get('menu-meta_description')) { diff --git a/site/views/question_and_answer/submitbutton.js b/site/views/question_and_answer/submitbutton.js index 48186f0..c124bf3 100644 --- a/site/views/question_and_answer/submitbutton.js +++ b/site/views/question_and_answer/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @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 afb6a22..0cb4086 100644 --- a/site/views/question_and_answer/tmpl/edit.php +++ b/site/views/question_and_answer/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage edit.php diff --git a/site/views/question_and_answer/view.html.php b/site/views/question_and_answer/view.html.php index bf7dbc7..b8f0a09 100644 --- a/site/views/question_and_answer/view.html.php +++ b/site/views/question_and_answer/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,10 +26,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; + /** - * Question_and_answer View class + * Question_and_answer Html View class */ -class QuestionsanswersViewQuestion_and_answer extends JViewLegacy +class QuestionsanswersViewQuestion_and_answer extends HtmlView { /** * display method of View diff --git a/site/views/questions_and_answers/tmpl/default.php b/site/views/questions_and_answers/tmpl/default.php index 633e6e1..28f274f 100644 --- a/site/views/questions_and_answers/tmpl/default.php +++ b/site/views/questions_and_answers/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default.php diff --git a/site/views/questions_and_answers/tmpl/default_qna-table.php b/site/views/questions_and_answers/tmpl/default_qna-table.php index 77528bf..956b1c9 100644 --- a/site/views/questions_and_answers/tmpl/default_qna-table.php +++ b/site/views/questions_and_answers/tmpl/default_qna-table.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage default_qna-table.php diff --git a/site/views/questions_and_answers/view.html.php b/site/views/questions_and_answers/view.html.php index bc74782..4e254b9 100644 --- a/site/views/questions_and_answers/view.html.php +++ b/site/views/questions_and_answers/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.x - @build 2nd March, 2022 + @version 1.1.x + @build 27th May, 2022 @created 30th January, 2017 @package Questions and Answers @subpackage view.html.php @@ -26,12 +26,13 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Filesystem\File; /** - * Questionsanswers View class for the Questions_and_answers + * Questionsanswers Html View class for the Questions_and_answers */ -class QuestionsanswersViewQuestions_and_answers extends JViewLegacy +class QuestionsanswersViewQuestions_and_answers extends HtmlView { // Overwriting JView display method function display($tpl = null) @@ -154,12 +155,12 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); } // Load the script to find all uikit components needed. @@ -184,13 +185,13 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. if (File::exists(JPATH_ROOT.'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + JHtml::_('script', 'media/com_questionsanswers/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); } } } @@ -202,21 +203,21 @@ class QuestionsanswersViewQuestions_and_answers extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + JHtml::_('stylesheet', 'media/com_questionsanswers/uikit-v3/css/uikit'.$size.'.css', ['version' => 'auto']); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root(true) .'/media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit'.$size.'.js', ['version' => 'auto']); + JHtml::_('script', 'media/com_questionsanswers/uikit-v3/js/uikit-icons'.$size.'.js', ['version' => 'auto']); } } // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_questionsanswers/footable-v3/js/footable.min.js', (QuestionsanswersHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JHtml::_('stylesheet', 'media/com_questionsanswers/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']); + // Add the JavaScript for Footable (adding all functions) + JHtml::_('script', 'media/com_questionsanswers/footable-v3/js/footable.min.js', ['version' => 'auto']); // load the meta description if ($this->params->get('menu-meta_description')) {