mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-09-28 21:19:07 +00:00
Compare commits
No commits in common. "master" and "3.9.0-rc1" have entirely different histories.
18
README.md
18
README.md
@ -1,12 +1,10 @@
|
|||||||
# Weblinks for Joomla!
|
# Weblinks for Joomla! Travis:
|
||||||
|
|
||||||
Build Status
|
Travis: [![Travis Build Status](https://travis-ci.org/joomla-extensions/weblinks.svg?branch=master)](https://travis-ci.org/joomla-extensions/weblinks)
|
||||||
---------------------
|
|
||||||
| Drone-CI |
|
|
||||||
| ------------- |
|
|
||||||
| [![Build Status](https://ci.joomla.org/api/badges/joomla-extensions/weblinks/status.svg)](https://ci.joomla.org/joomla-extensions/weblinks) |
|
|
||||||
|
|
||||||
Weblinks for Joomla! provides a component and accompanying extensions to create a directory of weblinks.
|
Drone: [![Drone Build Status](http://213.160.72.75/api/badges/joomla-extensions/weblinks/status.svg)](http://213.160.72.75/joomla-extensions/weblinks)
|
||||||
|
|
||||||
|
This repo is meant to hold the decoupled com_weblinks component and related code.
|
||||||
|
|
||||||
# How to test a PR
|
# How to test a PR
|
||||||
|
|
||||||
@ -223,7 +221,7 @@ skipClone = false
|
|||||||
cmsPath = tests/joomla-cms3
|
cmsPath = tests/joomla-cms3
|
||||||
|
|
||||||
; If you want to clone a different branch, you can set it here
|
; If you want to clone a different branch, you can set it here
|
||||||
branch = 3.10-dev
|
branch = staging
|
||||||
|
|
||||||
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
|
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
|
||||||
localUser =
|
localUser =
|
||||||
@ -260,13 +258,13 @@ The tests in Weblinks Extension use Codeception Testing Framework, if you want t
|
|||||||
This is not required, and if in doubt you can just skip this section, but there may be some specific use cases when you need (or want) to override the default behaviour of RoboFile.php. To do this, copy `RoboFile.dist.ini` to `RoboFile.ini` and add options in INI format, one per line, e.g.
|
This is not required, and if in doubt you can just skip this section, but there may be some specific use cases when you need (or want) to override the default behaviour of RoboFile.php. To do this, copy `RoboFile.dist.ini` to `RoboFile.ini` and add options in INI format, one per line, e.g.
|
||||||
|
|
||||||
skipClone = true
|
skipClone = true
|
||||||
cmsPath = tests/joomla
|
cmsPath = tests/joomla-cms3
|
||||||
|
|
||||||
The currently available options are as follows:
|
The currently available options are as follows:
|
||||||
|
|
||||||
* `skipClone`: set to `true` to avoid the cms repo being deleted and re-cloned at each test execution. Useful to save time and bandwidth while you're debugging your test environment. But please be aware that if you don't refresh the repo you'll have to manually check the `installation` folder is present and the `configuration.php` is not.
|
* `skipClone`: set to `true` to avoid the cms repo being deleted and re-cloned at each test execution. Useful to save time and bandwidth while you're debugging your test environment. But please be aware that if you don't refresh the repo you'll have to manually check the `installation` folder is present and the `configuration.php` is not.
|
||||||
* `cmsPath`: set to the local path (absolute or relative) where you'd like the test website to be installed. Default is `tests/joomla-cms3`.
|
* `cmsPath`: set to the local path (absolute or relative) where you'd like the test website to be installed. Default is `tests/joomla-cms3`.
|
||||||
* `branch`: set to whatever existing branch from the `joomla-cms` project if you want to clone that specific branch. Default is `3.10-dev`.
|
* `branch`: set to whatever existing branch from the `joomla-cms` project if you want to clone that specific branch. Default is `staging`.
|
||||||
|
|
||||||
## Additional options
|
## Additional options
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ skipClone = false
|
|||||||
cmsPath = tests/joomla
|
cmsPath = tests/joomla
|
||||||
|
|
||||||
; If you want to clone a different branch, you can set it here
|
; If you want to clone a different branch, you can set it here
|
||||||
branch = 3.10-dev
|
branch = staging
|
||||||
|
|
||||||
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
|
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
|
||||||
localUser = www-data
|
localUser = www-data
|
||||||
|
@ -398,7 +398,7 @@ class RoboFile extends Tasks
|
|||||||
*/
|
*/
|
||||||
private function buildGitCloneCommand()
|
private function buildGitCloneCommand()
|
||||||
{
|
{
|
||||||
$branch = empty($this->configuration->branch) ? '3.10-dev' : $this->configuration->branch;
|
$branch = empty($this->configuration->branch) ? 'staging' : $this->configuration->branch;
|
||||||
|
|
||||||
return "git" . $this->executableExtension . " clone -b $branch --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/cache";
|
return "git" . $this->executableExtension . " clone -b $branch --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/cache";
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
"php": ">=5.6",
|
"php": ">=5.6",
|
||||||
"codeception/codeception": "^3",
|
"codeception/codeception": "^3",
|
||||||
"phpunit/phpunit": "^5.7.27",
|
"phpunit/phpunit": "^5.7.27",
|
||||||
"joomla-projects/joomla-browser": "^3.9",
|
"joomla-projects/joomla-browser": "v3.9.0",
|
||||||
"consolidation/robo": "^1.0.0",
|
"consolidation/robo": "^1.0.0",
|
||||||
"joomla-projects/joomla-testing-robo": "~1.0",
|
"joomla-projects/joomla-testing-robo": "~1.0",
|
||||||
"joomla-projects/selenium-server-standalone": "^3.14",
|
"joomla-projects/selenium-server-standalone": "v3.14.0",
|
||||||
"fzaninotto/faker": "^1.6",
|
"fzaninotto/faker": "^1.6",
|
||||||
"joomla-projects/jorobo": "~0.7",
|
"joomla-projects/jorobo": "~0.7",
|
||||||
"behat/gherkin": "^4.4.1"
|
"behat/gherkin": "^4.4.1"
|
||||||
|
2052
composer.lock
generated
2052
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
extension = weblinks
|
extension = weblinks
|
||||||
version = 3.9.0
|
version = 3.7.0
|
||||||
source = src
|
source = src
|
||||||
target = package
|
target = package
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ text = "
|
|||||||
* @package Joomla.Administrator
|
* @package Joomla.Administrator
|
||||||
* @subpackage Weblinks
|
* @subpackage Weblinks
|
||||||
*
|
*
|
||||||
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
|
* @copyright Copyright (C) 2005 - ##YEAR## Open Source Matters, Inc. All rights reserved.
|
||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
"
|
"
|
||||||
|
44
manifest.xml
44
manifest.xml
@ -11,48 +11,6 @@
|
|||||||
<downloads>
|
<downloads>
|
||||||
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/weblinks/3-7-0/pkg-weblinks-3.7.0.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/weblinks/3-7-0/pkg-weblinks-3.7.0.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<targetplatform name="joomla" version="3.[678]" />
|
<targetplatform name="joomla" version="3.[6789]" />
|
||||||
</update>
|
|
||||||
<update>
|
|
||||||
<name>Weblinks Extension Package</name>
|
|
||||||
<description>Joomla! CMS Weblinks Package</description>
|
|
||||||
<element>pkg_weblinks</element>
|
|
||||||
<type>package</type>
|
|
||||||
<version>3.9.0</version>
|
|
||||||
<client>site</client>
|
|
||||||
<infourl title="Weblinks Extension Package">https://github.com/joomla-extensions/weblinks/releases/tag/3.9.0</infourl>
|
|
||||||
<downloads>
|
|
||||||
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/weblinks/3-9-0/pkg-weblinks-3.9.0.zip</downloadurl>
|
|
||||||
</downloads>
|
|
||||||
<sha512>99baa8a622da239b2a0b84414836c494e68b5ff2d1eba2030fccc9d929645a45f7a2459ce2261846a10922f4b77bc6e0f26d34adc1afffb62e51fe45e8f44b53</sha512>
|
|
||||||
<targetplatform name="joomla" version="((3\.(9|10))|(4\.[01234]))" />
|
|
||||||
</update>
|
|
||||||
<update>
|
|
||||||
<name>Weblinks Extension Package</name>
|
|
||||||
<description>Joomla! CMS Weblinks Package</description>
|
|
||||||
<element>pkg_weblinks</element>
|
|
||||||
<type>package</type>
|
|
||||||
<version>4.0.1</version>
|
|
||||||
<client>site</client>
|
|
||||||
<infourl title="Weblinks Extension Package">https://github.com/joomla-extensions/weblinks/releases/tag/4.0.1</infourl>
|
|
||||||
<downloads>
|
|
||||||
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/weblinks/4-0-1/pkg-weblinks-4.0.1.zip</downloadurl>
|
|
||||||
</downloads>
|
|
||||||
<sha512>8e6ac146d9bf907971a25728f4ed6cfad900ab51d1bf33a157f11b42bfcb8b7dfbc6c21c9eeebfe2cf572220db33f73fa29807f3d350220ed4e73b09866dcdad</sha512>
|
|
||||||
<targetplatform name="joomla" version="((4\.[01234])|(5\.0))" />
|
|
||||||
</update>
|
|
||||||
<update>
|
|
||||||
<name>Weblinks Extension Package</name>
|
|
||||||
<description>Joomla! CMS Weblinks Package</description>
|
|
||||||
<element>pkg_weblinks</element>
|
|
||||||
<type>package</type>
|
|
||||||
<version>4.3.1</version>
|
|
||||||
<client>site</client>
|
|
||||||
<infourl title="Weblinks Extension Package">https://github.com/joomla-extensions/weblinks/releases/tag/4.3.1</infourl>
|
|
||||||
<downloads>
|
|
||||||
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/weblinks/4-3-1/pkg-weblinks-4.3.1.zip</downloadurl>
|
|
||||||
</downloads>
|
|
||||||
<sha512>cbc02c3a4d915b2a4b69d5b425cb22b93c2dadd72829e1dac8f3cd55c2deb4ab4cb244ca75a956dd335c861daa2a17a769390e7cab90988501c16417afefb72f</sha512>
|
|
||||||
<targetplatform name="joomla" version="((4\.[34])|(5\.[01234]))" />
|
|
||||||
</update>
|
</update>
|
||||||
</updates>
|
</updates>
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"config:base",
|
|
||||||
":preserveSemverRanges",
|
|
||||||
":disableMajorUpdates"
|
|
||||||
],
|
|
||||||
"versioning": "semver",
|
|
||||||
"dependencyDashboard": true,
|
|
||||||
"lockFileMaintenance": { "enabled": true },
|
|
||||||
"composerIgnorePlatformReqs": ["ext-*", "lib-*"],
|
|
||||||
"rangeStrategy": "update-lockfile",
|
|
||||||
"baseBranches": ["master", "4.0-dev"],
|
|
||||||
"constraints": {
|
|
||||||
"composer": "> 2.3",
|
|
||||||
"npm": "> 8.0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -146,17 +146,14 @@ class WeblinksHelper extends JHelperContent
|
|||||||
{
|
{
|
||||||
$item->count_published = $weblink->count;
|
$item->count_published = $weblink->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($weblink->state == 0)
|
if ($weblink->state == 0)
|
||||||
{
|
{
|
||||||
$item->count_unpublished = $weblink->count;
|
$item->count_unpublished = $weblink->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($weblink->state == 2)
|
if ($weblink->state == 2)
|
||||||
{
|
{
|
||||||
$item->count_archived = $weblink->count;
|
$item->count_archived = $weblink->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($weblink->state == -2)
|
if ($weblink->state == -2)
|
||||||
{
|
{
|
||||||
$item->count_trashed = $weblink->count;
|
$item->count_trashed = $weblink->count;
|
||||||
|
@ -65,8 +65,7 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
function jSelectWeblink_" . $this->id . "(id, title, catid, object, url, language) {
|
function jSelectWeblink_" . $this->id . "(id, title, catid, object, url, language) {
|
||||||
window.processModalSelect('Weblink', '" . $this->id . "', id, title, catid, object, url, language);
|
window.processModalSelect('Weblink', '" . $this->id . "', id, title, catid, object, url, language);
|
||||||
}
|
}
|
||||||
"
|
");
|
||||||
);
|
|
||||||
$scriptSelect[$this->id] = true;
|
$scriptSelect[$this->id] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +94,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
->from($db->quoteName('#__weblinks'))
|
->from($db->quoteName('#__weblinks'))
|
||||||
->where($db->quoteName('id') . ' = ' . (int) $value);
|
->where($db->quoteName('id') . ' = ' . (int) $value);
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$title = $db->loadResult();
|
$title = $db->loadResult();
|
||||||
@ -105,7 +103,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
JError::raiseWarning(500, $e->getMessage());
|
JError::raiseWarning(500, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = empty($title) ? JText::_('COM_WEBLINKS_SELECT_A_WEBLINK') : htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
|
$title = empty($title) ? JText::_('COM_WEBLINKS_SELECT_A_WEBLINK') : htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
|
||||||
|
|
||||||
// The current weblink display field.
|
// The current weblink display field.
|
||||||
@ -125,7 +122,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
. '<span class="icon-file" aria-hidden="true"></span> ' . JText::_('JSELECT')
|
. '<span class="icon-file" aria-hidden="true"></span> ' . JText::_('JSELECT')
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// New weblink button
|
// New weblink button
|
||||||
if ($allowNew)
|
if ($allowNew)
|
||||||
{
|
{
|
||||||
@ -139,7 +135,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
. '<span class="icon-new" aria-hidden="true"></span> ' . JText::_('JACTION_CREATE')
|
. '<span class="icon-new" aria-hidden="true"></span> ' . JText::_('JACTION_CREATE')
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit weblink button
|
// Edit weblink button
|
||||||
if ($allowEdit)
|
if ($allowEdit)
|
||||||
{
|
{
|
||||||
@ -153,7 +148,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
. '<span class="icon-edit" aria-hidden="true"></span> ' . JText::_('JACTION_EDIT')
|
. '<span class="icon-edit" aria-hidden="true"></span> ' . JText::_('JACTION_EDIT')
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear weblink button
|
// Clear weblink button
|
||||||
if ($allowClear)
|
if ($allowClear)
|
||||||
{
|
{
|
||||||
@ -165,7 +159,6 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
. '<span class="icon-remove" aria-hidden="true"></span>' . JText::_('JCLEAR')
|
. '<span class="icon-remove" aria-hidden="true"></span>' . JText::_('JCLEAR')
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '</span>';
|
$html .= '</span>';
|
||||||
|
|
||||||
// Select weblink modal
|
// Select weblink modal
|
||||||
@ -243,12 +236,10 @@ class JFormFieldModal_Weblink extends JFormField
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: class='required' for client side validation.
|
// Note: class='required' for client side validation.
|
||||||
$class = $this->required ? ' class="required modal-value"' : '';
|
$class = $this->required ? ' class="required modal-value"' : '';
|
||||||
$html .= '<input type="hidden" id="' . $this->id . '_id" ' . $class . ' data-required="' . (int) $this->required . '" name="' . $this->name
|
$html .= '<input type="hidden" id="' . $this->id . '_id" ' . $class . ' data-required="' . (int) $this->required . '" name="' . $this->name
|
||||||
. '" data-text="' . htmlspecialchars(JText::_('COM_WEBLINKS_SELECT_A_WEBLINK', true), ENT_COMPAT, 'UTF-8') . '" value="' . $value . '" />';
|
. '" data-text="' . htmlspecialchars(JText::_('COM_WEBLINKS_SELECT_A_WEBLINK', true), ENT_COMPAT, 'UTF-8') . '" value="' . $value . '" />';
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,12 +155,6 @@ class WeblinksModelWeblink extends JModelAdmin
|
|||||||
$form->setFieldAttribute('publish_down', 'filter', 'unset');
|
$form->setFieldAttribute('publish_down', 'filter', 'unset');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow to change the created_by user if not allowed to access com_users.
|
|
||||||
if (!JFactory::getUser()->authorise('core.manage', 'com_users'))
|
|
||||||
{
|
|
||||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,8 +153,7 @@ class Com_WeblinksInstallerScript
|
|||||||
. $db->quote('com_weblinks.weblink') . ', '
|
. $db->quote('com_weblinks.weblink') . ', '
|
||||||
. $db->quote(
|
. $db->quote(
|
||||||
'{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"},
|
'{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"},
|
||||||
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'
|
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
|
||||||
) . ', '
|
|
||||||
. $db->quote('') . ', '
|
. $db->quote('') . ', '
|
||||||
. $db->quote(
|
. $db->quote(
|
||||||
'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias",
|
'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias",
|
||||||
@ -162,8 +161,7 @@ class Com_WeblinksInstallerScript
|
|||||||
"core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params",
|
"core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params",
|
||||||
"core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"url",
|
"core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"url",
|
||||||
"core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc",
|
"core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc",
|
||||||
"core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}'
|
"core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}') . ', '
|
||||||
) . ', '
|
|
||||||
. $db->quote('WeblinksHelperRoute::getWeblinkRoute') . ', '
|
. $db->quote('WeblinksHelperRoute::getWeblinkRoute') . ', '
|
||||||
. $db->quote(
|
. $db->quote(
|
||||||
'{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml",
|
'{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml",
|
||||||
@ -172,8 +170,7 @@ class Com_WeblinksInstallerScript
|
|||||||
"ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},
|
"ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},
|
||||||
{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},
|
{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},
|
||||||
{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},
|
{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},
|
||||||
{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}'
|
{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}')
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
@ -192,8 +189,7 @@ class Com_WeblinksInstallerScript
|
|||||||
. $db->quote('com_weblinks.category') . ', '
|
. $db->quote('com_weblinks.category') . ', '
|
||||||
. $db->quote('
|
. $db->quote('
|
||||||
{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},
|
{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},
|
||||||
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'
|
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
|
||||||
) . ', '
|
|
||||||
. $db->quote('') . ', '
|
. $db->quote('') . ', '
|
||||||
. $db->quote('
|
. $db->quote('
|
||||||
{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias",
|
{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias",
|
||||||
@ -202,8 +198,7 @@ class Com_WeblinksInstallerScript
|
|||||||
"core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language",
|
"core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language",
|
||||||
"core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey",
|
"core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey",
|
||||||
"core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"},
|
"core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"},
|
||||||
"special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}'
|
"special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}') . ', '
|
||||||
) . ', '
|
|
||||||
. $db->quote('WeblinksHelperRoute::getCategoryRoute') . ', '
|
. $db->quote('WeblinksHelperRoute::getCategoryRoute') . ', '
|
||||||
. $db->quote('
|
. $db->quote('
|
||||||
{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml",
|
{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml",
|
||||||
@ -214,8 +209,7 @@ class Com_WeblinksInstallerScript
|
|||||||
"displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id",
|
"displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id",
|
||||||
"displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id",
|
"displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id",
|
||||||
"displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id",
|
"displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id",
|
||||||
"displayColumn":"title"}]}'
|
"displayColumn":"title"}]}')
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
|
@ -38,7 +38,7 @@ class WeblinksTableWeblink extends JTable
|
|||||||
// Set the published column alias
|
// Set the published column alias
|
||||||
$this->setColumnAlias('published', 'state');
|
$this->setColumnAlias('published', 'state');
|
||||||
|
|
||||||
if (version_compare(JVERSION, '4.0', '<') == 1)
|
if (version_compare(JVERSION, '4.0', '<' ) == 1)
|
||||||
{
|
{
|
||||||
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
||||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
||||||
@ -130,7 +130,6 @@ class WeblinksTableWeblink extends JTable
|
|||||||
if (trim($this->title) == '')
|
if (trim($this->title) == '')
|
||||||
{
|
{
|
||||||
$this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_TITLE'));
|
$this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_TITLE'));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ if ($saveOrder)
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="has-context">
|
<td class="nowrap has-context">
|
||||||
<?php if ($item->checked_out) : ?>
|
<?php if ($item->checked_out) : ?>
|
||||||
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'weblinks.', $canCheckin); ?>
|
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'weblinks.', $canCheckin); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -47,7 +47,6 @@ class WeblinksViewWeblinks extends JViewLegacy
|
|||||||
if (count($errors = $this->get('Errors')))
|
if (count($errors = $this->get('Errors')))
|
||||||
{
|
{
|
||||||
JError::raiseError(500, implode("\n", $errors));
|
JError::raiseError(500, implode("\n", $errors));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ class WeblinksModelCategory extends JModelList
|
|||||||
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
||||||
$query->where('(a.title LIKE ' . $search . ')');
|
$query->where('(a.title LIKE ' . $search . ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If grouping by subcategory, add the subcategory list ordering clause.
|
// If grouping by subcategory, add the subcategory list ordering clause.
|
||||||
if ($this->getState('category.group', 0))
|
if ($this->getState('category.group', 0))
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ class WeblinksRouter extends JComponentRouterBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Are we dealing with an weblink that is attached to a menu item?
|
// Are we dealing with an weblink that is attached to a menu item?
|
||||||
if (isset($query['view']) && ($mView == $query['view']) && isset($query['id']) && ($mId == (int) $query['id']))
|
if (isset($query['view']) && ($mView == $query['view']) and (isset($query['id'])) and ($mId == (int) $query['id']))
|
||||||
{
|
{
|
||||||
unset($query['view']);
|
unset($query['view']);
|
||||||
unset($query['catid']);
|
unset($query['catid']);
|
||||||
@ -74,7 +74,7 @@ class WeblinksRouter extends JComponentRouterBase
|
|||||||
return $segments;
|
return $segments;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($view) && ($view == 'category' || $view == 'weblink'))
|
if (isset($view) and ($view == 'category' or $view == 'weblink'))
|
||||||
{
|
{
|
||||||
if ($mId != (int) $query['id'] || $mView != $view)
|
if ($mId != (int) $query['id'] || $mView != $view)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,6 @@ class WeblinksViewCategories extends JViewCategories
|
|||||||
if (count($errors = $this->get('Errors')))
|
if (count($errors = $this->get('Errors')))
|
||||||
{
|
{
|
||||||
JError::raiseWarning(500, implode("\n", $errors));
|
JError::raiseWarning(500, implode("\n", $errors));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) :
|
|||||||
<?php echo JHtml::_('content.prepare', $child->description, '', 'com_weblinks.category'); ?>
|
<?php echo JHtml::_('content.prepare', $child->description, '', 'com_weblinks.category'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($this->params->get('show_cat_num_links') == 1) :?>
|
<?php if ($this->params->get('show_cat_num_links') == 1) :?>
|
||||||
<dl class="weblink-count"><dt>
|
<dl class="weblink-count"><dt>
|
||||||
<?php echo JText::_('COM_WEBLINKS_NUM'); ?></dt>
|
<?php echo JText::_('COM_WEBLINKS_NUM'); ?></dt>
|
||||||
<dd><?php echo $child->numitems; ?></dd>
|
<dd><?php echo $child->numitems; ?></dd>
|
||||||
|
@ -44,7 +44,7 @@ class WeblinksViewCategory extends JViewCategory
|
|||||||
|
|
||||||
$temp = new JRegistry;
|
$temp = new JRegistry;
|
||||||
$temp->loadString($item->params);
|
$temp->loadString($item->params);
|
||||||
$item->params = clone $this->params;
|
$item->params = clone($this->params);
|
||||||
$item->params->merge($temp);
|
$item->params->merge($temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class ModWeblinksHelper
|
|||||||
|
|
||||||
$model->setState(
|
$model->setState(
|
||||||
'list.select',
|
'list.select',
|
||||||
'a.*, c.description AS c_description, c.published AS c_published,' . $case_when1 . ',' . $case_when2
|
'a.*, c.description AS c_description, c.published AS c_published,' . $case_when1 . ',' . $case_when2 . ',' . 'DATE_FORMAT(a.created, "%Y-%m-%d") AS created'
|
||||||
);
|
);
|
||||||
|
|
||||||
$model->setState('filter.c.published', 1);
|
$model->setState('filter.c.published', 1);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
<authorEmail>admin@joomla.org</authorEmail>
|
<authorEmail>admin@joomla.org</authorEmail>
|
||||||
<authorUrl>www.joomla.org</authorUrl>
|
<authorUrl>www.joomla.org</authorUrl>
|
||||||
<version>##VERSION##</version>
|
<version>3.7.0</version>
|
||||||
<description>PLG_EDITORS-XTD_WEBLINK_XML_DESCRIPTION</description>
|
<description>PLG_EDITORS-XTD_WEBLINK_XML_DESCRIPTION</description>
|
||||||
<files>
|
<files>
|
||||||
##FILES##
|
##FILES##
|
||||||
|
@ -139,7 +139,7 @@ class PlgFinderWeblinks extends FinderIndexerAdapter
|
|||||||
public function onFinderAfterSave($context, $row, $isNew)
|
public function onFinderAfterSave($context, $row, $isNew)
|
||||||
{
|
{
|
||||||
// We only want to handle web links here. We need to handle front end and back end editing.
|
// We only want to handle web links here. We need to handle front end and back end editing.
|
||||||
if ($context == 'com_weblinks.weblink' || $context == 'com_weblinks.form')
|
if ($context == 'com_weblinks.weblink' || $context == 'com_weblinks.form' )
|
||||||
{
|
{
|
||||||
// Check if the access levels are different.
|
// Check if the access levels are different.
|
||||||
if (!$isNew && $this->old_access != $row->access)
|
if (!$isNew && $this->old_access != $row->access)
|
||||||
|
@ -175,12 +175,12 @@ class PlgSearchWeblinks extends JPlugin
|
|||||||
$case_when1 .= $c_id . ' END as catslug';
|
$case_when1 .= $c_id . ' END as catslug';
|
||||||
|
|
||||||
$query->select('a.title AS title, a.created AS created, a.url, a.description AS text, ' . $case_when . "," . $case_when1)
|
$query->select('a.title AS title, a.created AS created, a.url, a.description AS text, ' . $case_when . "," . $case_when1)
|
||||||
->select($query->concatenate(array($db->quote($searchWeblinks), 'c.title'), " / ") . ' AS section')
|
->select($query->concatenate(array($db->quote($searchWeblinks), 'c.title'), " / ") . ' AS section')
|
||||||
->select('\'1\' AS browsernav')
|
->select('\'1\' AS browsernav')
|
||||||
->from('#__weblinks AS a')
|
->from('#__weblinks AS a')
|
||||||
->join('INNER', '#__categories as c ON c.id = a.catid')
|
->join('INNER', '#__categories as c ON c.id = a.catid')
|
||||||
->where('(' . $where . ') AND a.state IN (' . implode(',', $state) . ') AND c.published = 1 AND c.access IN (' . $groups . ')')
|
->where('(' . $where . ') AND a.state IN (' . implode(',', $state) . ') AND c.published = 1 AND c.access IN (' . $groups . ')')
|
||||||
->order($order);
|
->order($order);
|
||||||
|
|
||||||
// Filter by language.
|
// Filter by language.
|
||||||
if (JFactory::getApplication()->isClient('site') && JLanguageMultilang::isEnabled())
|
if (JFactory::getApplication()->isClient('site') && JLanguageMultilang::isEnabled())
|
||||||
|
Loading…
Reference in New Issue
Block a user