From 77d2b1fbf9abc5a1740b7a867290857c8f6dfc97 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Sun, 3 Jul 2016 12:07:25 +0200 Subject: [PATCH] View and router frontend CS (#231) * Update view.html.php * Update default_items.php * Update default.php * Update view.html.php * Update edit.php * Update router.php * Update router.php * Update default_items.php * Update view.html.php * Update view.html.php --- src/components/com_weblinks/router.php | 18 ++- .../views/category/tmpl/default.php | 2 +- .../views/category/tmpl/default_items.php | 106 ++++++++---------- .../com_weblinks/views/form/tmpl/edit.php | 2 +- .../com_weblinks/views/form/view.html.php | 13 ++- .../com_weblinks/views/weblink/view.html.php | 14 ++- 6 files changed, 90 insertions(+), 65 deletions(-) diff --git a/src/components/com_weblinks/router.php b/src/components/com_weblinks/router.php index caf3c54..4ce8641 100644 --- a/src/components/com_weblinks/router.php +++ b/src/components/com_weblinks/router.php @@ -259,7 +259,11 @@ class WeblinksRouter extends JComponentRouterBase /** * Weblinks router functions * - * These functions are proxys for the new router interface + * @param array &$query An array of URL arguments + * + * @return array The URL arguments to use to assemble the subsequent URL. + * + * Note. These functions are proxies for the new router interface * for old SEF extensions. * * @deprecated 4.0 Use Class based routers instead @@ -271,6 +275,18 @@ function WeblinksBuildRoute(&$query) return $router->build($query); } +/** + * Weblinks router functions + * + * @param array $segments The segments of the URL to parse. + * + * @return array The URL attributes to be used by the application. + * + * Note. These functions are proxies for the new router interface + * for old SEF extensions. + * + * @deprecated 4.0 Use Class based routers instead + */ function WeblinksParseRoute($segments) { $router = new WeblinksRouter; diff --git a/src/components/com_weblinks/views/category/tmpl/default.php b/src/components/com_weblinks/views/category/tmpl/default.php index 41c604d..b557540 100644 --- a/src/components/com_weblinks/views/category/tmpl/default.php +++ b/src/components/com_weblinks/views/category/tmpl/default.php @@ -9,6 +9,6 @@ defined('_JEXEC') or die; -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers'); +JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); $this->subtemplatename = 'items'; echo JLayoutHelper::render('joomla.content.category_default', $this); diff --git a/src/components/com_weblinks/views/category/tmpl/default_items.php b/src/components/com_weblinks/views/category/tmpl/default_items.php index 319dabc..6566f47 100644 --- a/src/components/com_weblinks/views/category/tmpl/default_items.php +++ b/src/components/com_weblinks/views/category/tmpl/default_items.php @@ -25,8 +25,8 @@ $canCreate = $user->authorise('core.create', 'com_weblinks'); $canEditState = $user->authorise('core.edit.state', 'com_weblinks'); $n = count($this->items); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); ?> items)) : ?> @@ -34,9 +34,9 @@ $listDirn = $this->escape($this->state->get('list.direction'));
- params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) :?> + params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) : ?>
- params->get('filter_field') != 'hide') :?> + params->get('filter_field') != 'hide') : ?>
@@ -54,12 +54,11 @@ $listDirn = $this->escape($this->state->get('list.direction'));
- - params); ?> - params->get('show_pagination')) : ?>