Updated with JCB v2.9.14

This commit is contained in:
Llewellyn van der Merwe 2019-04-04 13:52:38 +02:00
parent 899ff518c0
commit f2a8e42ab6
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
214 changed files with 11740 additions and 11506 deletions

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018
+ *Last Build*: 4th April, 2019
+ *Version*: 2.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
@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **66852**
+ *Line count*: **66821**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018
+ *Last Build*: 4th April, 2019
+ *Version*: 2.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
@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **66852**
+ *Line count*: **66821**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -115,5 +115,5 @@ class SermondistributorControllerExternal_sources extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerLocal_listings extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerPreachers extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerSermons extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
}
}
}

View File

@ -115,5 +115,5 @@ class SermondistributorControllerStatistics extends JControllerAdmin
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
}
}
}

View File

@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access');
* Sermondistributor component helper.
*/
abstract class SermondistributorHelper
{
{
/**
* The global params
@ -1955,6 +1955,32 @@ abstract class SermondistributorHelper
return date('jS \o\f F Y',$date);
}
/**
* get date based in period past
*/
public static function fancyDynamicDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
}
/**
* Change to nice fancy day time and date
*/
@ -1991,6 +2017,30 @@ abstract class SermondistributorHelper
return date('G:i',$time);
}
/**
* set the date as 2004/05 (for charts)
*/
public static function setYearMonth($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y/m', $date);
}
/**
* set the date as 2004/05/03 (for charts)
*/
public static function setYearMonthDay($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y/m/d', $date);
}
/**
* Check if string is a valid time stamp
*/
@ -2632,7 +2682,7 @@ abstract class SermondistributorHelper
return $open;
}
/**
* Load the Component xml manifest.
* Load the Component xml manifest.
**/
public static function manifest()
{
@ -2641,12 +2691,12 @@ abstract class SermondistributorHelper
}
/**
* Joomla version object
* Joomla version object
**/
protected static $JVersion;
/**
* set/get Joomla version
* set/get Joomla version
**/
public static function jVersion()
{
@ -2659,7 +2709,7 @@ abstract class SermondistributorHelper
}
/**
* Load the Contributors details.
* Load the Contributors details.
**/
public static function getContributors()
{
@ -2769,7 +2819,7 @@ abstract class SermondistributorHelper
}
/**
* Configure the Linkbar.
* Configure the Linkbar.
**/
public static function addSubmenu($submenu)
{
@ -2811,7 +2861,7 @@ abstract class SermondistributorHelper
{
JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_sermondistributor&view=help_documents', $submenu === 'help_documents');
}
}
}
/**
* UIKIT Component Classes
@ -2913,7 +2963,7 @@ abstract class SermondistributorHelper
return $classes;
}
return false;
}
}
/**
* Prepares the xml document
@ -3296,183 +3346,149 @@ abstract class SermondistributorHelper
}
/**
* Get the actions permissions
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
*
* @return object The JObject of permission/authorised actions
*
**/
public static function getActions($view,&$record = null,$views = null)
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'sermondistributor')
{
jimport('joomla.access.access');
$user = JFactory::getUser();
$result = new JObject;
$view = self::safeString($view);
// get the user object
$user = JFactory::getUser();
// load the JObject
$result = new JObject;
// make view name safe (just incase)
$view = self::safeString($view);
if (self::checkString($views))
{
$views = self::safeString($views);
}
// get all actions from component
$actions = JAccess::getActions('com_sermondistributor', 'component');
// set acctions only set in component settiongs
$componentActions = array('core.admin','core.manage','core.options','core.export');
$actions = JAccess::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/"
);
// if non found then return empty JObject
if (empty($actions))
{
return $result;
}
// get created by if not found
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
{
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
}
// set actions only set in component settings
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
// check if we have a target
$checkTarget = false;
if ($target)
{
// convert to an array
if (self::checkString($target))
{
$target = array($target);
}
// check if we are good to go
if (self::checkArray($target))
{
$checkTarget = true;
}
}
// loop the actions and set the permissions
foreach ($actions as $action)
{
// set to use component default
$fallback= true;
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
// check target action filter
if ($checkTarget && self::filterActions($view, $action->name, $target))
{
continue;
}
// set to use component default
$fallback = true;
// reset permission per/action
$permission = false;
$catpermission = false;
// set area
$area = 'comp';
// check if the record has an ID and the action is item related (not a component action)
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) &&
(strpos($action->name, 'core.') !== false || strpos($action->name, $view . '.') !== false))
{
// we are in item
$area = 'item';
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_sermondistributor.'.$view.'.' . (int) $record->id);
if (!$permission) // TODO removed && !is_null($permission)
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
// if no permission found, check edit own
if (!$permission)
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
if ($user->authorise('core.edit.own', 'com_sermondistributor.'.$view.'.' . (int) $record->id))
// the correct target
$coreCheck = (array) explode('.', $action->name);
// check that we have both local and global access
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor.'.$view.'.' . (int) $record->id))
else
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
{
// we are in item
$area = 'category';
// set the core check
$coreCheck = explode('.', $action->name);
$core = $coreCheck[0];
// make sure we use the core. action check for the categories
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
$coreCheck = explode('.',$action->name);
$coreCheck[0] = 'core';
$categoryCheck = implode('.',$coreCheck);
if (strpos($action->name, $view) !== false && strpos($action->name, 'core.') === false )
{
$coreCheck[0] = 'core';
$categoryCheck = implode('.', $coreCheck);
}
else
{
$categoryCheck = $action->name;
}
// The record has a category. Check the category permissions.
$catpermission = $user->authorise($categoryCheck, 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid);
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
if (!$catpermission && !is_null($catpermission))
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
if ($user->authorise('core.edit.own', 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid))
// check that we have both local and global access
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
$user->authorise($core . '.edit.own', 'com_' . $component))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid))
else
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
@ -3481,14 +3497,49 @@ abstract class SermondistributorHelper
// if allowed then fallback on component global settings
if ($fallback)
{
$result->set($action->name, $user->authorise($action->name, 'com_sermondistributor'));
// if item/category blocks access then don't fall back on global
if ((($area === 'item') && !$permission) || (($area === 'category') && !$catpermission))
{
// do not allow
$result->set($action->name, false);
}
// Finally remember the global settings have the final say. (even if item allow)
// The local item permissions can block, but it can't open and override of global permissions.
// Since items are created by users and global permissions is set by system admin.
else
{
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
}
}
}
return $result;
}
/**
* Get any component's model
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
**/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
{
if (strpos($action, $view . '.' . $target) !== false ||
strpos($action, 'core.' . $target) !== false)
{
return false;
break;
}
}
return true;
}
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Sermondistributor', $config = array())
{
@ -3532,9 +3583,9 @@ abstract class SermondistributorHelper
}
/**
* Add to asset Table
* Add to asset Table
*/
public static function setAsset($id,$table)
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
$parent->loadByName('com_sermondistributor');
@ -3566,7 +3617,7 @@ abstract class SermondistributorHelper
$asset->name = $name;
$asset->title = $title;
// get the default asset rules
$rules = self::getDefaultAssetRules('com_sermondistributor',$table);
$rules = self::getDefaultAssetRules('com_sermondistributor', $table, $inherit);
if ($rules instanceof JAccessRules)
{
$asset->rules = (string) $rules;
@ -3594,55 +3645,62 @@ abstract class SermondistributorHelper
}
/**
* Gets the default asset Rules for a component/view.
* Gets the default asset Rules for a component/view.
*/
protected static function getDefaultAssetRules($component,$view)
protected static function getDefaultAssetRules($component, $view, $inherit = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
// if new or inherited
$assetId = 0;
// Only get the actual item rules if not inheriting
if (!$inherit)
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
// check that there is a value
if ($db->getNumRows())
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($view !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count((array)$_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
return $rules;
}
return $result;
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
}
}
return JAccess::getAssetRules(0);
// get asset rules
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($view !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
elseif ($inherit)
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
// return filtered rules
return $rules;
}
}
return $result;
}
/**
@ -3811,11 +3869,11 @@ abstract class SermondistributorHelper
}
/**
* Check if have an json string
* Check if have an json string
*
* @input string The json string to check
* @input string The json string to check
*
* @returns bool true on success
* @returns bool true on success
**/
public static function checkJson($string)
{
@ -3828,11 +3886,11 @@ abstract class SermondistributorHelper
}
/**
* Check if have an object with a length
* Check if have an object with a length
*
* @input object The object to check
* @input object The object to check
*
* @returns bool true on success
* @returns bool true on success
**/
public static function checkObject($object)
{
@ -3844,15 +3902,15 @@ abstract class SermondistributorHelper
}
/**
* Check if have an array with a length
* Check if have an array with a length
*
* @input array The array to check
* @input array The array to check
*
* @returns bool true on success
* @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count((array)$array) > 0)
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -3866,17 +3924,17 @@ abstract class SermondistributorHelper
}
return self::checkArray($array, false);
}
return true;
return $nr;
}
return false;
}
/**
* Check if have a string with a length
* Check if have a string with a length
*
* @input string The string to check
* @input string The string to check
*
* @returns bool true on success
* @returns bool true on success
**/
public static function checkString($string)
{
@ -3888,10 +3946,10 @@ abstract class SermondistributorHelper
}
/**
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
* @returns bool true on success
**/
public static function isConnected()
{
@ -3913,11 +3971,11 @@ abstract class SermondistributorHelper
}
/**
* Merge an array of array's
* Merge an array of array's
*
* @input array The arrays you would like to merge
* @input array The arrays you would like to merge
*
* @returns array on success
* @returns array on success
**/
public static function mergeArrays($arrays)
{
@ -3943,11 +4001,11 @@ abstract class SermondistributorHelper
}
/**
* Shorten a string
* Shorten a string
*
* @input string The you would like to shorten
* @input string The you would like to shorten
*
* @returns string on success
* @returns string on success
**/
public static function shorten($string, $length = 40, $addTip = true)
{
@ -3984,11 +4042,11 @@ abstract class SermondistributorHelper
}
/**
* Making strings safe (various ways)
* Making strings safe (various ways)
*
* @input string The you would like to make safe
* @input string The you would like to make safe
*
* @returns string on success
* @returns string on success
**/
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true, $keepOnlyCharacters = true)
{
@ -4128,11 +4186,11 @@ abstract class SermondistributorHelper
}
/**
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
*
* @input an int
* @returns a string
* @input an int
* @returns a string
**/
public static function numberToString($x)
{
@ -4219,9 +4277,9 @@ abstract class SermondistributorHelper
}
/**
* Random Key
* Random Key
*
* @returns a string
* @returns a string
**/
public static function randomkey($size)
{

View File

@ -120,7 +120,7 @@ COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS="Manual Upda
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the external sources button."
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to submenu of Manual Updater"
COM_SERMONDISTRIBUTOR_MENU="&#187; Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU="Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_DESC="All categories that are published"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_OPTION="Categories"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_TITLE="Categories"

View File

@ -33,16 +33,14 @@ $fields = $displayData->get('fields') ?: array(
'note_auto_externalsource'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'description',
'externalsources'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,16 +33,14 @@ $fields = $displayData->get('fields') ?: array(
'apicronjob_note'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -37,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -37,20 +36,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'title',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'content'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -37,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'size'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -32,16 +32,14 @@ $fields = $displayData->get('fields') ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -37,20 +36,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -34,20 +34,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,12 +39,20 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=preacher&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_sermondistributor&view=sermon&layout=edit".$ref;
$new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref;
// set the create new and close URL
$close_new = "index.php?option=com_sermondistributor&view=sermon&layout=edit";
$close_new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// load the action object
$can = SermondistributorHelper::getActions('sermon');

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,10 +39,18 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=series&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_sermondistributor&view=sermon&layout=edit".$ref;
$new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref;
// load the action object
$can = SermondistributorHelper::getActions('sermon');

View File

@ -27,15 +27,20 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias',
'preacher'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required',
'auto_sermons'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -40,16 +40,14 @@ $fields = $displayData->get('fields') ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,8 +39,16 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=sermon&refid=" . $id : "";
}
?>
<div class="form-vertical">

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'filename',
'sermon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -34,20 +34,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -193,7 +193,7 @@ class SermondistributorModelExternal_source extends JModelAdmin
}
return $item;
}
}
/**
* Method to get the record form.
@ -482,7 +482,7 @@ class SermondistributorModelExternal_source extends JModelAdmin
}
}
return parent::validate($form, $data, $group);
}
}
/**
* Method to get the unique fields of this table.
@ -772,7 +772,7 @@ class SermondistributorModelExternal_source extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -904,7 +904,7 @@ class SermondistributorModelExternal_source extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the filetypes string to JSON string.
if (isset($data['filetypes']))

View File

@ -104,7 +104,7 @@ class SermondistributorModelExternal_sources extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -144,7 +144,7 @@ class SermondistributorModelExternal_sources extends JModelList
$item->filetypes = $filetypesNames;
}
}
}
}
// set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
@ -161,7 +161,7 @@ class SermondistributorModelExternal_sources extends JModelList
$item->build = $this->selectionTranslation($item->build, 'build');
}
}
// return items
return $items;
@ -427,7 +427,7 @@ class SermondistributorModelExternal_sources extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -44,9 +44,9 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views';

View File

@ -44,9 +44,9 @@ class JFormFieldArticles extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -151,9 +151,9 @@ class JFormFieldExternalsource extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -44,9 +44,9 @@ class JFormFieldExternalsourcefiles extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// set the default
$options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_THE_LOCAL_LISTING_OF_THE_MANUAL_EXTERNAL_SOURCE_FOLDERS_IS_EMPTY'));

View File

@ -44,9 +44,9 @@ class JFormFieldLocalfiles extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get local folder
$localfolder = JComponentHelper::getParams('com_sermondistributor')->get('localfolder', JPATH_ROOT.'/images');

View File

@ -44,9 +44,9 @@ class JFormFieldPreachers extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -44,9 +44,9 @@ class JFormFieldSeries extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -151,9 +151,9 @@ class JFormFieldSermon extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -44,9 +44,9 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_SITE.'/views';

View File

@ -257,6 +257,7 @@ function vvvvvwj(update_method_vvvvvwj)
if (update_method_vvvvvwj == 2)
{
jQuery('#jform_update_timer').closest('.control-group').show();
// add required attribute to update_timer field
if (jform_vvvvvwjvwd_required)
{
updateFieldRequired('update_timer',0);
@ -265,11 +266,11 @@ function vvvvvwj(update_method_vvvvvwj)
jQuery('#jform_update_timer').addClass('required');
jform_vvvvvwjvwd_required = false;
}
}
else
{
jQuery('#jform_update_timer').closest('.control-group').hide();
// remove required attribute from update_timer field
if (!jform_vvvvvwjvwd_required)
{
updateFieldRequired('update_timer',1);
@ -389,6 +390,7 @@ function vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm)
if (externalsources && update_method)
{
jQuery('#jform_oauthtoken').closest('.control-group').show();
// add required attribute to oauthtoken field
if (jform_vvvvvwmvwe_required)
{
updateFieldRequired('oauthtoken',0);
@ -397,11 +399,11 @@ function vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm)
jQuery('#jform_oauthtoken').addClass('required');
jform_vvvvvwmvwe_required = false;
}
}
else
{
jQuery('#jform_oauthtoken').closest('.control-group').hide();
// remove required attribute from oauthtoken field
if (!jform_vvvvvwmvwe_required)
{
updateFieldRequired('oauthtoken',1);

View File

@ -117,6 +117,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_DESCRIPTION"
class="btn-group btn-group-yesno"
default=""
required="true">
<!-- Option Set. -->
<option value="1">
@ -202,7 +203,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION</option>
@ -225,6 +227,7 @@
name="folder"
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_DESCRIPTION"
default=""
id="folder"
class="folders"
select="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_SELECT"
@ -302,6 +305,7 @@
name="sharedurl"
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_DESCRIPTION"
default=""
id="sharedurl"
class="sharedurls"
select="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_SELECT"
@ -316,6 +320,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_LABEL"
size="40"
maxlength="120"
default=""
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_DESCRIPTION"
class="text_area span12"
required="false"
@ -336,6 +341,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_LABEL"
size="250"
maxlength="250"
default=""
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_DESCRIPTION"
class="text_area"
required="true"

View File

@ -58,6 +58,7 @@ function vvvvvwx(location_vvvvvwx)
if (location_vvvvvwx == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field
if (jform_vvvvvwxvwf_required)
{
updateFieldRequired('admin_view',0);
@ -66,11 +67,11 @@ function vvvvvwx(location_vvvvvwx)
jQuery('#jform_admin_view').addClass('required');
jform_vvvvvwxvwf_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field
if (!jform_vvvvvwxvwf_required)
{
updateFieldRequired('admin_view',1);
@ -89,6 +90,7 @@ function vvvvvwy(location_vvvvvwy)
if (location_vvvvvwy == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field
if (jform_vvvvvwyvwg_required)
{
updateFieldRequired('site_view',0);
@ -97,11 +99,11 @@ function vvvvvwy(location_vvvvvwy)
jQuery('#jform_site_view').addClass('required');
jform_vvvvvwyvwg_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field
if (!jform_vvvvvwyvwg_required)
{
updateFieldRequired('site_view',1);
@ -133,6 +135,7 @@ function vvvvvwz(type_vvvvvwz)
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvvwzvwh_required)
{
updateFieldRequired('url',0);
@ -141,11 +144,11 @@ function vvvvvwz(type_vvvvvwz)
jQuery('#jform_url').addClass('required');
jform_vvvvvwzvwh_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvvwzvwh_required)
{
updateFieldRequired('url',1);
@ -188,6 +191,7 @@ function vvvvvxa(type_vvvvvxa)
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvvxavwi_required)
{
updateFieldRequired('article',0);
@ -196,11 +200,11 @@ function vvvvvxa(type_vvvvvxa)
jQuery('#jform_article').addClass('required');
jform_vvvvvxavwi_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvvxavwi_required)
{
updateFieldRequired('article',1);
@ -243,6 +247,7 @@ function vvvvvxb(type_vvvvvxb)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
// add required attribute to content field
if (jform_vvvvvxbvwj_required)
{
updateFieldRequired('content',0);
@ -251,11 +256,11 @@ function vvvvvxb(type_vvvvvxb)
jQuery('#jform_content').addClass('required');
jform_vvvvvxbvwj_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
// remove required attribute from content field
if (!jform_vvvvvxbvwj_required)
{
updateFieldRequired('content',1);
@ -285,6 +290,7 @@ function vvvvvxc(target_vvvvvxc)
if (target_vvvvvxc == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
if (jform_vvvvvxcvwk_required)
{
updateFieldRequired('groups',0);
@ -293,11 +299,11 @@ function vvvvvxc(target_vvvvvxc)
jQuery('#jform_groups').addClass('required');
jform_vvvvvxcvwk_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
if (!jform_vvvvvxcvwk_required)
{
updateFieldRequired('groups',1);

View File

@ -127,7 +127,8 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_DESCRIPTION"
class="list_class"
multiple="false"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option>
@ -154,6 +155,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group"
default=""
required="true">
<!-- Option Set. -->
<option value="1">
@ -169,6 +171,7 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION"
class="list_class"
multiple="false"
default=""
required="true"
button="false"
/>
@ -180,6 +183,7 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION"
class="list_class"
multiple="false"
default=""
required="true"
button="false"
/>
@ -217,6 +221,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_LABEL"
size="60"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_DESCRIPTION"
class="text_area"
required="true"
@ -233,6 +238,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group"
default=""
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -100,7 +100,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SELECT_AN_OPTION</option>

View File

@ -138,6 +138,7 @@
label="COM_SERMONDISTRIBUTOR_SERIES_SCRIPTURE_LABEL"
size="90"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_SERIES_SCRIPTURE_DESCRIPTION"
class="text_area"
readonly="false"

View File

@ -79,6 +79,7 @@ function vvvvvvv(source_vvvvvvv)
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
// add required attribute to build field
if (jform_vvvvvvvvvw_required)
{
updateFieldRequired('build',0);
@ -87,11 +88,11 @@ function vvvvvvv(source_vvvvvvv)
jQuery('#jform_build').addClass('required');
jform_vvvvvvvvvw_required = false;
}
}
else
{
jQuery('#jform_build').closest('.control-group').hide();
// remove required attribute from build field
if (!jform_vvvvvvvvvw_required)
{
updateFieldRequired('build',1);
@ -207,6 +208,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
// add required attribute to manual_files field
if (jform_vvvvvvyvvx_required)
{
updateFieldRequired('manual_files',0);
@ -215,12 +217,12 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
jQuery('#jform_manual_files').addClass('required');
jform_vvvvvvyvvx_required = false;
}
jQuery('.note_manual_externalsource').closest('.control-group').show();
}
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
// remove required attribute from manual_files field
if (!jform_vvvvvvyvvx_required)
{
updateFieldRequired('manual_files',1);
@ -287,6 +289,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
// add required attribute to manual_files field
if (jform_vvvvvvzvvy_required)
{
updateFieldRequired('manual_files',0);
@ -295,12 +298,12 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
jQuery('#jform_manual_files').addClass('required');
jform_vvvvvvzvvy_required = false;
}
jQuery('.note_manual_externalsource').closest('.control-group').show();
}
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
// remove required attribute from manual_files field
if (!jform_vvvvvvzvvy_required)
{
updateFieldRequired('manual_files',1);
@ -355,6 +358,7 @@ function vvvvvwa(source_vvvvvwa)
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
// add required attribute to local_files field
if (jform_vvvvvwavvz_required)
{
updateFieldRequired('local_files',0);
@ -363,11 +367,11 @@ function vvvvvwa(source_vvvvvwa)
jQuery('#jform_local_files').addClass('required');
jform_vvvvvwavvz_required = false;
}
}
else
{
jQuery('#jform_local_files').closest('.control-group').hide();
// remove required attribute from local_files field
if (!jform_vvvvvwavvz_required)
{
updateFieldRequired('local_files',1);
@ -410,6 +414,7 @@ function vvvvvwb(source_vvvvvwb)
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvvwbvwa_required)
{
updateFieldRequired('url',0);
@ -418,11 +423,11 @@ function vvvvvwb(source_vvvvvwb)
jQuery('#jform_url').addClass('required');
jform_vvvvvwbvwa_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvvwbvwa_required)
{
updateFieldRequired('url',1);

View File

@ -162,6 +162,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_CATID_LABEL"
extension="com_sermondistributor.sermons"
required="false"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox"
/>
@ -189,7 +190,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option>
@ -267,7 +269,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_AN_OPTION</option>
@ -309,6 +312,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_URL_LABEL"
size="10"
maxlength="50"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_URL_DESCRIPTION"
class="text_area"
required="true"
@ -324,6 +328,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_LABEL"
size="90"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_DESCRIPTION"
class="text_area"
readonly="false"

View File

@ -108,7 +108,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
return $item;
}
}
/**
* Method to get the record form.
@ -395,7 +395,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
return parent::validate($form, $data, $group);
}
}
/**
* Method to get the unique fields of this table.
@ -680,7 +680,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -812,7 +812,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the groups string to JSON string.
if (isset($data['groups']))

View File

@ -108,7 +108,7 @@ class SermondistributorModelHelp_documents extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -148,7 +148,7 @@ class SermondistributorModelHelp_documents extends JModelList
$item->groups = $groupsNames;
}
}
}
}
// set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
@ -161,7 +161,7 @@ class SermondistributorModelHelp_documents extends JModelList
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
// return items
return $items;
@ -392,7 +392,7 @@ class SermondistributorModelHelp_documents extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -145,7 +145,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin
}
return $item;
}
}
/**
* Method to get the record form.
@ -500,7 +500,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin
}
return $data;
}
}
/**
* Method to get the unique fields of this table.
@ -790,7 +790,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -922,7 +922,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Get the basic encryption key.
$basickey = SermondistributorHelper::getCryptKey('basic');

View File

@ -108,7 +108,7 @@ class SermondistributorModelLocal_listings extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -128,7 +128,7 @@ class SermondistributorModelLocal_listings extends JModelList
}
}
}
}
// set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
@ -139,7 +139,7 @@ class SermondistributorModelLocal_listings extends JModelList
$item->build = $this->selectionTranslation($item->build, 'build');
}
}
// return items
return $items;
@ -339,7 +339,7 @@ class SermondistributorModelLocal_listings extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -100,7 +100,7 @@ class SermondistributorModelManual_updater extends JModelList
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect('index.php?option=com_sermondistributor');
return false;
}
}
// load parent items
$items = parent::getItems();
@ -132,7 +132,7 @@ class SermondistributorModelManual_updater extends JModelList
$item->oauthtoken = rtrim($basic->decryptString($item->oauthtoken), "\0");
}
}
}
}
// return items
return $items;
@ -151,5 +151,5 @@ class SermondistributorModelManual_updater extends JModelList
return $this->uikitComp;
}
return false;
}
}
}

View File

@ -243,7 +243,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
return $value;
}
}
/**
* Method to get the record form.
@ -496,7 +496,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
return $data;
}
}
/**
* Method to get the unique fields of this table.
@ -781,7 +781,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -913,7 +913,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))

View File

@ -96,7 +96,7 @@ class SermondistributorModelPreachers extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -116,7 +116,7 @@ class SermondistributorModelPreachers extends JModelList
}
}
}
}
// return items
return $items;
@ -289,7 +289,7 @@ class SermondistributorModelPreachers extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -243,7 +243,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
return $value;
}
}
/**
* Method to get the record form.
@ -496,7 +496,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
return $data;
}
}
/**
* Method to get the unique fields of this table.
@ -781,7 +781,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -913,7 +913,7 @@ class SermondistributorModelSeries extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))

View File

@ -92,7 +92,7 @@ class SermondistributorModelSeries_list extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -112,7 +112,7 @@ class SermondistributorModelSeries_list extends JModelList
}
}
}
}
// return items
return $items;
@ -285,7 +285,7 @@ class SermondistributorModelSeries_list extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -206,7 +206,7 @@ class SermondistributorModelSermon extends JModelAdmin
return $items;
}
return false;
}
}
/**
* Method to get the record form.
@ -495,7 +495,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
return parent::validate($form, $data, $group);
}
}
/**
* Method to get the unique fields of this table.
@ -803,7 +803,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -951,7 +951,7 @@ class SermondistributorModelSermon extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the local_files string to JSON string.
if (isset($data['local_files']))

View File

@ -124,7 +124,7 @@ class SermondistributorModelSermons extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -144,7 +144,7 @@ class SermondistributorModelSermons extends JModelList
}
}
}
}
// set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
@ -157,7 +157,7 @@ class SermondistributorModelSermons extends JModelList
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
// return items
return $items;
@ -420,7 +420,7 @@ class SermondistributorModelSermons extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -102,7 +102,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
return $item;
}
}
/**
* Method to get the record form.
@ -355,7 +355,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
return $data;
}
}
/**
* Method to get the unique fields of this table.
@ -645,7 +645,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->cleanCache();
return $newIds;
}
}
/**
* Batch move items to a new category
@ -777,7 +777,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))

View File

@ -108,7 +108,7 @@ class SermondistributorModelStatistics extends JModelList
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
{
// check in items
$this->checkInNow();
@ -128,7 +128,7 @@ class SermondistributorModelStatistics extends JModelList
}
}
}
}
// return items
return $items;
@ -328,7 +328,7 @@ class SermondistributorModelStatistics extends JModelList
return $headers;
}
return false;
}
}
/**
* Method to get a store id based on model configuration state.

View File

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`website` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -19,9 +19,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`short_description` VARCHAR(255) NOT NULL DEFAULT '',
`source` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -64,9 +64,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
KEY `idx_link_type` (`link_type`),
KEY `idx_alias` (`alias`),
KEY `idx_build` (`build`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`scripture` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -102,9 +102,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -113,7 +113,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -123,7 +123,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`preacher` INT(11) NOT NULL DEFAULT 0,
`series` INT(11) NOT NULL DEFAULT 0,
`sermon` INT(11) NOT NULL DEFAULT 0,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -135,9 +135,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -148,7 +148,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
KEY `idx_sermon` (`sermon`),
KEY `idx_preacher` (`preacher`),
KEY `idx_series` (`series`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -165,7 +165,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`sharedurl` TEXT NOT NULL,
`update_method` TINYINT NOT NULL DEFAULT 0,
`update_timer` INT(1) NOT NULL DEFAULT 0,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -187,7 +187,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
KEY `idx_build` (`build`),
KEY `idx_dropboxoptions` (`dropboxoptions`),
KEY `idx_permissiontype` (`permissiontype`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -198,7 +198,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`name` VARCHAR(255) NOT NULL DEFAULT '',
`size` INT(50) NOT NULL DEFAULT 0,
`url` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -217,7 +217,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
KEY `idx_name` (`name`),
KEY `idx_build` (`build`),
KEY `idx_key` (`key`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -234,7 +234,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -246,9 +246,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -261,7 +261,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
KEY `idx_article` (`article`),
KEY `idx_target` (`target`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -50,7 +50,7 @@ class SermondistributorTableExternal_source extends JTable
parent::__construct('#__sermondistributor_external_source', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.external_source'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.external_source'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTableExternal_source extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -50,7 +50,7 @@ class SermondistributorTableHelp_document extends JTable
parent::__construct('#__sermondistributor_help_document', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.help_document'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.help_document'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTableHelp_document extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -50,7 +50,7 @@ class SermondistributorTableLocal_listing extends JTable
parent::__construct('#__sermondistributor_local_listing', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.local_listing'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.local_listing'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTableLocal_listing extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -50,7 +50,7 @@ class SermondistributorTablePreacher extends JTable
parent::__construct('#__sermondistributor_preacher', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.preacher'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.preacher'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTablePreacher extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -50,7 +50,7 @@ class SermondistributorTableSeries extends JTable
parent::__construct('#__sermondistributor_series', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.series'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.series'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTableSeries extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -53,7 +53,7 @@ class SermondistributorTableSermon extends JTable
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
}
public function bind($array, $ignore = '')
@ -236,7 +236,7 @@ class SermondistributorTableSermon extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -50,7 +50,7 @@ class SermondistributorTableStatistic extends JTable
parent::__construct('#__sermondistributor_statistic', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.statistic'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.statistic'));
}
public function bind($array, $ignore = '')
@ -233,7 +233,7 @@ class SermondistributorTableStatistic extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('external_source, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewExternal_source extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('external_source',$this->item);
$this->canDo = SermondistributorHelper::getActions('external_source', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
@ -210,7 +212,7 @@ class SermondistributorViewExternal_source extends JViewLegacy
$this->document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW' : 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EDIT'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/external_source.css", (SermondistributorHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// Add Ajax Token
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
$this->document->addScript(JURI::root() . $this->script, (SermondistributorHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_sermondistributor/views/external_source/submitbutton.js", (SermondistributorHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
JText::script('view not acceptable. Error');

View File

@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
?>
<tr>

View File

@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
?>
<tr>

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