Updated the component with the improvements made to JCB

This commit is contained in:
Llewellyn van der Merwe 2018-05-05 21:52:41 +02:00
parent 1306bc04f4
commit e683b47eb8
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
125 changed files with 200 additions and 179 deletions

View File

@ -12,14 +12,14 @@ 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*: 24th April, 2018
+ *Last Build*: 5th May, 2018
+ *Version*: 1.0.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*: **27783**
+ *Line count*: **28377**
+ *File count*: **201**
+ *Folder count*: **62**

View File

@ -12,14 +12,14 @@ 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*: 24th April, 2018
+ *Last Build*: 5th May, 2018
+ *Version*: 1.0.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*: **27783**
+ *Line count*: **28377**
+ *File count*: **201**
+ *Folder count*: **62**

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage admin.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@ -2244,8 +2244,15 @@ abstract class QuestionsanswersHelper
return false;
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -2258,9 +2265,19 @@ abstract class QuestionsanswersHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -34,7 +34,7 @@ COM_QUESTIONSANSWERS_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu"
COM_QUESTIONSANSWERS_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the help document"
COM_QUESTIONSANSWERS_IMPORT_DATA="Import Data"
COM_QUESTIONSANSWERS_IMPORT_DATA_DESC=" Allows users in this group to import data."
COM_QUESTIONSANSWERS_MENU="» Questions and Answers"
COM_QUESTIONSANSWERS_MENU="Questions and Answers"
COM_QUESTIONSANSWERS_MENU_CATEGORY_DESC="Questions and answers category"
COM_QUESTIONSANSWERS_MENU_CATEGORY_OPTION="Q&A Category"
COM_QUESTIONSANSWERS_MENU_CATEGORY_TITLE="Q&A Category"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage publlshing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_rightside.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage adminviewfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage articles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage siteviewfolderlist.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.js

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help_document.php
@ -323,29 +323,29 @@ class QuestionsanswersTableHelp_document extends JTable
$asset->loadByName('com_questionsanswers');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->title;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}
return $this->alias;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php
@ -323,29 +323,16 @@ class QuestionsanswersTableQuestion_and_answer extends JTable
$asset->loadByName('com_questionsanswers');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_footer.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage submitbutton.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage edit.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_batch_footer.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_body.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_foot.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_head.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_toolbar.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_main.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_readme_information.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vast_development_method_notice_board.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage default_vdm.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage view.html.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage A4.print.css

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_QUESTIONSANSWERS</name>
<creationDate>24th April, 2018</creationDate>
<creationDate>5th May, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage script.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage category.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage downloads.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questions_and_answers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage site.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage site.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage download.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage question_and_answer.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage category.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage categoryquestions_and_answers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage headercheck.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage questionsanswers.php
@ -1693,8 +1693,15 @@ abstract class QuestionsanswersHelper
return 'application/octet-stream';
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -1707,9 +1714,19 @@ abstract class QuestionsanswersHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.x
@build 24th April, 2018
@build 5th May, 2018
@created 30th January, 2017
@package Questions and Answers
@subpackage route.php

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