mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-01-27 14:28:30 +00:00
[CS] Codestyle changes done in staging.
This commit is contained in:
parent
e2c472aca8
commit
dbf29cdc71
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks Weblink Controller
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksController extends JControllerLegacy
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblink controller class.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksControllerWeblink extends JControllerForm
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks list controller class.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksControllerWeblinks extends JControllerAdmin
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks helper.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksHelper extends JHelperContent
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks model.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksModelWeblink extends JModelAdmin
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Methods supporting a list of weblink records.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksModelWeblinks extends JModelList
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblink Table class
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksTableWeblink extends JTable
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* View to edit a weblink.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewWeblink extends JViewLegacy
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* View class for a list of weblinks.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewWeblinks extends JViewLegacy
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks Component Controller
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksController extends JControllerLegacy
|
||||
|
@ -10,8 +10,8 @@
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* Weblinks class.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksControllerWeblink extends JControllerForm
|
||||
@ -42,7 +42,6 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
|
||||
if (!parent::add())
|
||||
{
|
||||
// Redirect to the return page.
|
||||
@ -54,7 +53,9 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
@ -87,6 +88,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
@ -116,7 +118,8 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return Boolean True if access level checks pass, false otherwise.
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function cancel($key = 'w_id')
|
||||
@ -133,7 +136,8 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return Boolean True if access level check and checkout passes, false otherwise.
|
||||
* @return boolean True if access level check and checkout passes, false otherwise.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function edit($key = null, $urlVar = 'w_id')
|
||||
@ -151,6 +155,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* @param array $config Configuration array for model. Optional.
|
||||
*
|
||||
* @return object The model.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function getModel($name = 'form', $prefix = '', $config = array('ignore_request' => true))
|
||||
@ -167,6 +172,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = null)
|
||||
@ -194,6 +200,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* If a "return" variable has been passed in the request
|
||||
*
|
||||
* @return string The return URL.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function getReturnPage()
|
||||
@ -230,7 +237,8 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return Boolean True if successful, false otherwise.
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function save($key = null, $urlVar = 'w_id')
|
||||
@ -250,6 +258,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
* Go to a weblink
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function go()
|
||||
@ -299,7 +308,7 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
}
|
||||
|
||||
// Redirect to the URL
|
||||
// TODO: Probably should check for a valid http link
|
||||
// @todo: Probably should check for a valid http link
|
||||
if ($link->url)
|
||||
{
|
||||
$modelLink->hit($id);
|
||||
|
@ -15,8 +15,6 @@ JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/component
|
||||
/**
|
||||
* Weblinks Component Association Helper
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 3.0
|
||||
*/
|
||||
abstract class WeblinksHelperAssociation extends CategoryHelperAssociation
|
||||
|
@ -10,11 +10,8 @@
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Weblinks Component Category Tree
|
||||
* Weblinks Component Category Tree.
|
||||
*
|
||||
* @static
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksCategories extends JCategories
|
||||
|
@ -10,11 +10,8 @@
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Weblink Component HTML Helper
|
||||
* Weblink Component HTML Helper.
|
||||
*
|
||||
* @static
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class JHtmlIcon
|
||||
|
@ -10,11 +10,8 @@
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Weblinks Component Route Helper
|
||||
* Weblinks Component Route Helper.
|
||||
*
|
||||
* @static
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
abstract class WeblinksHelperRoute
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* This models supports retrieving lists of article categories.
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksModelCategories extends JModelList
|
||||
@ -94,18 +92,23 @@ class WeblinksModelCategories extends JModelList
|
||||
$menu = $app->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$params = new JRegistry;
|
||||
|
||||
if ($active)
|
||||
{
|
||||
$params->loadString($active->params);
|
||||
}
|
||||
|
||||
$options = array();
|
||||
$options['countItems'] = $params->get('show_cat_num_links', 1) || !$params->get('show_empty_categories_cat', 0);
|
||||
$categories = JCategories::getInstance('Weblinks', $options);
|
||||
$this->_parent = $categories->get($this->getState('filter.parentId', 'root'));
|
||||
|
||||
if (is_object($this->_parent))
|
||||
{
|
||||
$this->_items = $this->_parent->getChildren();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_items = false;
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Weblinks Component Weblink Model
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksModelCategory extends JModelList
|
||||
|
@ -14,8 +14,6 @@ require_once JPATH_COMPONENT_ADMINISTRATOR.'/models/weblink.php';
|
||||
/**
|
||||
* Weblinks model.
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class WeblinksModelForm extends WeblinksModelWeblink
|
||||
|
@ -14,8 +14,6 @@ JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');
|
||||
/**
|
||||
* Weblinks Component Model for a Weblink record
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksModelWeblink extends JModelItem
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Routing class from com_weblinks
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 3.3
|
||||
*/
|
||||
class WeblinksRouter extends JComponentRouterBase
|
||||
@ -236,7 +234,7 @@ class WeblinksRouter extends JComponentRouterBase
|
||||
->select($db->quoteName('id'))
|
||||
->from('#__weblinks')
|
||||
->where($db->quoteName('catid') . ' = ' . (int) $vars['catid'])
|
||||
->where($db->quoteName('alias') . ' = ' . $db->quote($db->quote(str_replace(':', '-', $segment))));
|
||||
->where($db->quoteName('alias') . ' = ' . $db->quote(str_replace(':', '-', $segment)));
|
||||
$db->setQuery($query);
|
||||
$id = $db->loadResult();
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* Content categories view.
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewCategories extends JViewCategories
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* HTML View class for the WebLinks component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.0
|
||||
*/
|
||||
class WeblinksViewCategory extends JViewCategoryfeed
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* HTML View class for the WebLinks component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewCategory extends JViewCategory
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* HTML Article View class for the Weblinks component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewForm extends JViewLegacy
|
||||
@ -48,6 +46,7 @@ class WeblinksViewForm extends JViewLegacy
|
||||
if ($authorised !== true)
|
||||
{
|
||||
JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,6 @@ defined('_JEXEC') or die;
|
||||
/**
|
||||
* HTML View class for the WebLinks component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class WeblinksViewWeblink extends JViewLegacy
|
||||
|
@ -15,8 +15,6 @@ require_once JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/adapt
|
||||
/**
|
||||
* Smart Search adapter for Joomla Web Links.
|
||||
*
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Finder.Weblinks
|
||||
* @since 2.5
|
||||
*/
|
||||
class PlgFinderWeblinks extends FinderIndexerAdapter
|
||||
|
@ -14,8 +14,6 @@ require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php';
|
||||
/**
|
||||
* Weblinks search plugin.
|
||||
*
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Search.weblinks
|
||||
* @since 1.6
|
||||
*/
|
||||
class PlgSearchWeblinks extends JPlugin
|
||||
|
Loading…
x
Reference in New Issue
Block a user