Merge remote-tracking branch 'upstream/master' into phpcs

This commit is contained in:
Yves Hoppe 2016-07-30 19:32:37 +02:00
commit 778a84e568
48 changed files with 1259 additions and 612 deletions

View File

@ -29,19 +29,12 @@ If you find any new bugs, or want to raise any type of support issue, please use
## Release Procedure
This is the procedure and checklist for creating a new package.
This is the procedure and checklist for creating a new package:
* Update the version number in `build.ini`.
* Run `phing set-version`.
* Pun `phing` to make the new package for the version.
* Run `phing tag`.
* Push the commits and tags up to Github.
* Go to the releases page on Github.
* Click on the new tag.
- Click the `Edit Tag` button.
- Fill in the title and description for the release.
- Attach the zip-file for the package to the release. Wait for the file to complete uploading!
- Click the `Publish Release` button.
* Update the version number in `jorobo.ini`
* Modify `jorobo.ini`, add your GitHub token and add ` Release` after `Package`
* Run `robo build` to make the new package and auto-upload and release it on GitHub.
* Go to the releases page on GitHub, review the Changelog and change the status from Pre-Release to Stable.
* Create a new `<update>` tag in the `manifest.xml` file.
- Change the `<version>` tag to the new version.
- Change the `<downloadurl>` tag to match the URL of the new release.

View File

@ -15,7 +15,7 @@
"joomla-projects/joomla-browser": "v3.6.0",
"codegyre/robo": "~0.5",
"joomla-projects/robo": "dev-master",
"joomla-projects/selenium-server-standalone": "v2.53.0.1",
"joomla-projects/selenium-server-standalone": "v2.53.1",
"fzaninotto/faker": "^1.5",
"joomla-projects/jorobo": "0.4",
"Behat/Gherkin": "^4.4.1"

387
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "87c538127e912beb7f81120234148278",
"content-hash": "9f0da75ef3fec4dd00045e1882077fb2",
"hash": "50cba84cd1ef0c67853e0f620724ba96",
"content-hash": "0cc9ac9fe4280ae049d92e46bec772e5",
"packages": [],
"packages-dev": [
{
@ -68,16 +68,16 @@
},
{
"name": "codeception/codeception",
"version": "2.2.1",
"version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7"
"reference": "8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/f137636f0c185e7d4a495b9cea70c1afae27dfc7",
"reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6",
"reference": "8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6",
"shasum": ""
},
"require": {
@ -90,6 +90,8 @@
"php": ">=5.4.0 <8.0",
"phpunit/php-code-coverage": ">=2.1.3",
"phpunit/phpunit": ">4.8.20 <5.5",
"sebastian/comparator": "~1.1",
"sebastian/diff": "^1.4",
"symfony/browser-kit": ">=2.7 <4.0",
"symfony/console": ">=2.7 <4.0",
"symfony/css-selector": ">=2.7 <4.0",
@ -153,19 +155,19 @@
"functional testing",
"unit testing"
],
"time": "2016-06-03 12:44:06"
"time": "2016-06-29 00:59:28"
},
{
"name": "codegyre/robo",
"version": "0.6.0",
"source": {
"type": "git",
"url": "https://github.com/Codegyre/Robo.git",
"url": "https://github.com/consolidation-org/Robo.git",
"reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codegyre/Robo/zipball/d18185f0494c854d36aa5ee0ad931ee23bbef552",
"url": "https://api.github.com/repos/consolidation-org/Robo/zipball/d18185f0494c854d36aa5ee0ad931ee23bbef552",
"reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552",
"shasum": ""
},
@ -324,19 +326,20 @@
},
{
"name": "facebook/webdriver",
"version": "1.1.1",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/facebook/php-webdriver.git",
"reference": "1c98108ba3eb435b681655764de11502a0653705"
"reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705",
"reference": "1c98108ba3eb435b681655764de11502a0653705",
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/0b889d7de7461439f8a3bbcca46e0f696cb27986",
"reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.3.19"
},
"require-dev": {
@ -363,7 +366,7 @@
"selenium",
"webdriver"
],
"time": "2015-12-31 15:58:49"
"time": "2016-06-04 00:02:34"
},
{
"name": "fzaninotto/faker",
@ -444,6 +447,7 @@
],
"description": "Composer installable Coding Standards Definition.",
"homepage": "https://github.com/GreenCape/coding-standards",
"abandoned": "greencape/coding-standards",
"time": "2015-07-03 12:01:28"
},
{
@ -561,16 +565,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "1.3.0",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "31382fef2889136415751badebbd1cb022a4ed72"
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72",
"reference": "31382fef2889136415751badebbd1cb022a4ed72",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"shasum": ""
},
"require": {
@ -586,7 +590,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@ -615,7 +619,7 @@
"stream",
"uri"
],
"time": "2016-04-13 19:56:01"
"time": "2016-06-24 23:00:38"
},
{
"name": "henrikbjorn/lurker",
@ -1469,16 +1473,16 @@
},
{
"name": "joomla-projects/selenium-server-standalone",
"version": "v2.53.0.1",
"version": "v2.53.1",
"source": {
"type": "git",
"url": "https://github.com/joomla-projects/selenium-server-standalone.git",
"reference": "4c9428e1450de6a9fa956f3bd726351a9b281b53"
"reference": "24bc596a89fe0f6e524c72a7950c09a4927a4020"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/4c9428e1450de6a9fa956f3bd726351a9b281b53",
"reference": "4c9428e1450de6a9fa956f3bd726351a9b281b53",
"url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/24bc596a89fe0f6e524c72a7950c09a4927a4020",
"reference": "24bc596a89fe0f6e524c72a7950c09a4927a4020",
"shasum": ""
},
"bin": [
@ -1501,7 +1505,7 @@
"selenium",
"testing"
],
"time": "2016-05-30 15:21:57"
"time": "2016-07-04 17:23:12"
},
{
"name": "joomla/compat",
@ -1920,38 +1924,87 @@
"time": "2016-03-10 15:15:04"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "2.0.4",
"name": "phpdocumentor/reflection-common",
"version": "1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"phpDocumentor": [
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2015-12-27 11:43:31"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.2.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.4"
},
"type": "library",
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
@ -1963,10 +2016,58 @@
"authors": [
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
"email": "me@mikevanriel.com"
}
],
"time": "2015-02-03 12:10:50"
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-06-10 09:48:41"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^5.2||^4.8.24"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"time": "2016-06-10 07:14:17"
},
{
"name": "phploc/phploc",
@ -2152,32 +2253,32 @@
},
{
"name": "phpspec/prophecy",
"version": "v1.6.0",
"version": "v1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972"
"reference": "58a8137754bc24b25740d4281399a4a3596058e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972",
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0",
"reference": "58a8137754bc24b25740d4281399a4a3596058e0",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "~2.0",
"sebastian/comparator": "~1.1",
"sebastian/recursion-context": "~1.0"
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
"sebastian/recursion-context": "^1.0"
},
"require-dev": {
"phpspec/phpspec": "~2.0"
"phpspec/phpspec": "^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5.x-dev"
"dev-master": "1.6.x-dev"
}
},
"autoload": {
@ -2210,7 +2311,7 @@
"spy",
"stub"
],
"time": "2016-02-15 07:46:21"
"time": "2016-06-07 08:13:47"
},
{
"name": "phpunit/php-code-coverage",
@ -2800,16 +2901,16 @@
},
{
"name": "sebastian/exporter",
"version": "1.2.1",
"version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": ""
},
"require": {
@ -2817,12 +2918,13 @@
"sebastian/recursion-context": "~1.0"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
"dev-master": "1.3.x-dev"
}
},
"autoload": {
@ -2862,7 +2964,7 @@
"export",
"exporter"
],
"time": "2015-06-21 07:55:53"
"time": "2016-06-17 09:04:28"
},
{
"name": "sebastian/finder-facade",
@ -2905,16 +3007,16 @@
},
{
"name": "sebastian/git",
"version": "2.1.2",
"version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/git.git",
"reference": "607dcc6003502acdd0e6199b60ba954ce00f3004"
"reference": "5100bc50cd9e70f424c643618e142214225024f3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/git/zipball/607dcc6003502acdd0e6199b60ba954ce00f3004",
"reference": "607dcc6003502acdd0e6199b60ba954ce00f3004",
"url": "https://api.github.com/repos/sebastianbergmann/git/zipball/5100bc50cd9e70f424c643618e142214225024f3",
"reference": "5100bc50cd9e70f424c643618e142214225024f3",
"shasum": ""
},
"require": {
@ -2946,7 +3048,7 @@
"keywords": [
"git"
],
"time": "2016-03-12 23:31:06"
"time": "2016-06-15 09:30:19"
},
{
"name": "sebastian/global-state",
@ -3215,16 +3317,16 @@
},
{
"name": "symfony/browser-kit",
"version": "v3.1.0",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22"
"reference": "dcf41ed026b0499254385b5c88f03247b2ba010b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/b645a9b23d6c0eeba5ac823fa87bf010db9aff22",
"reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/dcf41ed026b0499254385b5c88f03247b2ba010b",
"reference": "dcf41ed026b0499254385b5c88f03247b2ba010b",
"shasum": ""
},
"require": {
@ -3268,20 +3370,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2016-03-04 07:56:56"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/config",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "edbbcf33cffa2a85104fc80de8dc052cc51596bb"
"reference": "0926e69411eba491803dbafb9f1f233e2ced58d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/edbbcf33cffa2a85104fc80de8dc052cc51596bb",
"reference": "edbbcf33cffa2a85104fc80de8dc052cc51596bb",
"url": "https://api.github.com/repos/symfony/config/zipball/0926e69411eba491803dbafb9f1f233e2ced58d0",
"reference": "0926e69411eba491803dbafb9f1f233e2ced58d0",
"shasum": ""
},
"require": {
@ -3321,20 +3423,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2016-04-20 18:52:26"
"time": "2016-06-29 05:31:50"
},
{
"name": "symfony/console",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "48221d3de4dc22d2cd57c97e8b9361821da86609"
"reference": "c392a6ec72f2122748032c2ad6870420561ffcfa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/48221d3de4dc22d2cd57c97e8b9361821da86609",
"reference": "48221d3de4dc22d2cd57c97e8b9361821da86609",
"url": "https://api.github.com/repos/symfony/console/zipball/c392a6ec72f2122748032c2ad6870420561ffcfa",
"reference": "c392a6ec72f2122748032c2ad6870420561ffcfa",
"shasum": ""
},
"require": {
@ -3381,20 +3483,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2016-04-26 12:00:47"
"time": "2016-06-29 07:02:14"
},
{
"name": "symfony/css-selector",
"version": "v3.1.0",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "e17f386efef7258ac671c24e727673abd086b0cf"
"reference": "2851e1932d77ce727776154d659b232d061e816a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e17f386efef7258ac671c24e727673abd086b0cf",
"reference": "e17f386efef7258ac671c24e727673abd086b0cf",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/2851e1932d77ce727776154d659b232d061e816a",
"reference": "2851e1932d77ce727776154d659b232d061e816a",
"shasum": ""
},
"require": {
@ -3434,20 +3536,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2016-03-04 07:56:56"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/dependency-injection",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "bd04588c087651ceffdc45d40dc4de05af9c7c52"
"reference": "2dd85de8216079d1360b2b14988cd5cdbbb49063"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bd04588c087651ceffdc45d40dc4de05af9c7c52",
"reference": "bd04588c087651ceffdc45d40dc4de05af9c7c52",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2dd85de8216079d1360b2b14988cd5cdbbb49063",
"reference": "2dd85de8216079d1360b2b14988cd5cdbbb49063",
"shasum": ""
},
"require": {
@ -3497,20 +3599,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2016-05-09 18:12:35"
"time": "2016-06-29 05:31:50"
},
{
"name": "symfony/dom-crawler",
"version": "v3.1.0",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3"
"reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/12aa63fd41b060d2bee9a34623d29eda70bc8fe3",
"reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
"reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
"shasum": ""
},
"require": {
@ -3553,20 +3655,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2016-05-13 15:49:09"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "a158f13992a3147d466af7a23b564ac719a4ddd8"
"reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a158f13992a3147d466af7a23b564ac719a4ddd8",
"reference": "a158f13992a3147d466af7a23b564ac719a4ddd8",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
"reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
"shasum": ""
},
"require": {
@ -3613,20 +3715,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2016-05-03 18:59:18"
"time": "2016-06-29 05:29:29"
},
{
"name": "symfony/filesystem",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "dee379131dceed90a429e951546b33edfe7dccbb"
"reference": "7258ddd6f987053f21fa43d03430580ba54e6096"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/dee379131dceed90a429e951546b33edfe7dccbb",
"reference": "dee379131dceed90a429e951546b33edfe7dccbb",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/7258ddd6f987053f21fa43d03430580ba54e6096",
"reference": "7258ddd6f987053f21fa43d03430580ba54e6096",
"shasum": ""
},
"require": {
@ -3662,20 +3764,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2016-04-12 18:01:21"
"time": "2016-06-29 05:31:50"
},
{
"name": "symfony/finder",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "ca24cf2cd4e3826f571e0067e535758e73807aa1"
"reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/ca24cf2cd4e3826f571e0067e535758e73807aa1",
"reference": "ca24cf2cd4e3826f571e0067e535758e73807aa1",
"url": "https://api.github.com/repos/symfony/finder/zipball/bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d",
"reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d",
"shasum": ""
},
"require": {
@ -3711,7 +3813,7 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2016-03-10 10:53:53"
"time": "2016-06-29 05:29:29"
},
{
"name": "symfony/polyfill-mbstring",
@ -3830,16 +3932,16 @@
},
{
"name": "symfony/process",
"version": "v2.8.6",
"version": "v2.8.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "1276bd9be89be039748cf753a2137f4ef149cd74"
"reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/1276bd9be89be039748cf753a2137f4ef149cd74",
"reference": "1276bd9be89be039748cf753a2137f4ef149cd74",
"url": "https://api.github.com/repos/symfony/process/zipball/89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
"reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
"shasum": ""
},
"require": {
@ -3875,20 +3977,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2016-04-14 15:22:22"
"time": "2016-06-29 05:29:29"
},
{
"name": "symfony/yaml",
"version": "v3.1.0",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a"
"reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
"url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de",
"reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de",
"shasum": ""
},
"require": {
@ -3924,7 +4026,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2016-05-26 21:46:24"
"time": "2016-06-29 05:41:56"
},
{
"name": "theseer/fdomdocument",
@ -4026,6 +4128,55 @@
"templating"
],
"time": "2016-05-30 09:11:59"
},
{
"name": "webmozart/assert",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2015-08-24 13:29:44"
}
],
"aliases": [],

View File

@ -2,3 +2,36 @@ extension = weblinks
version = 3.5.0
source = src
target = package
; Create a pre-release of the extension on GitHub
; Add your personal GitHub access tocken
; and add Release to the target (separated by space) above
[github]
remote = origin
branch = develop
token =
owner = joomla-extensions
repository = weblinks
changelog_source = commits
; Automatic upload of the built extension package to an FTP server
[ftp]
host =
port = 21
user =
password =
ssl = false
target = /
; Adds / replaces copyright headers at the beginning of files in the source folder
[header]
files = php,js
exclude =
text = "
/**
* @package Weblinks
*
* @copyright Copyright (C) 2005 - ##YEAR## Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
"

View File

@ -11,6 +11,6 @@
<downloads>
<downloadurl type="full" format="zip">https://github.com/joomla-extensions/weblinks/releases/download/3.5.0/pkg-weblinks-3.5.0.zip</downloadurl>
</downloads>
<targetplatform name="joomla" version="3.[456789]" />
<targetplatform name="joomla" version="3.[56789]" />
</update>
</updates>

View File

@ -5,6 +5,19 @@
description="COM_WEBLINKS_COMPONENT_DESC"
>
<field
name="captcha"
type="plugins"
label="COM_WEBLINKS_FIELD_CAPTCHA_LABEL"
description="COM_WEBLINKS_FIELD_CAPTCHA_DESC"
default=""
folder="captcha"
filter="cmd"
>
<option value="">JOPTION_USE_DEFAULT</option>
<option value="0">JOPTION_DO_NOT_USE</option>
</field>
<field name="target" type="list"
default="0"
description="COM_WEBLINKS_FIELD_TARGET_DESC"

View File

@ -20,7 +20,8 @@ class WeblinksController extends JControllerLegacy
* Method to display a view.
*
* @param boolean $cacheable If true, the view output will be cached
* @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
* @param array $urlparams An array of safe url parameters and their variable types,
* for valid values see {@link JFilterInput::clean()}.
*
* @return JControllerLegacy This object to support chaining.
*

View File

@ -39,4 +39,57 @@ class WeblinksHelper extends JHelperContent
$vName == 'categories'
);
}
/**
* Adds Count Items for WebLinks Category Manager.
*
* @param stdClass[] &$items The weblinks category objects.
*
* @return stdClass[] The weblinks category objects.
*
* @since 3.6.0
*/
public static function countItems(&$items)
{
$db = JFactory::getDbo();
foreach ($items as $item)
{
$item->count_trashed = 0;
$item->count_archived = 0;
$item->count_unpublished = 0;
$item->count_published = 0;
$query = $db->getQuery(true)
->select('state, COUNT(*) AS count')
->from($db->qn('#__weblinks'))
->where($db->qn('catid') . ' = ' . (int) $item->id)
->group('state');
$db->setQuery($query);
$weblinks = $db->loadObjectList();
foreach ($weblinks as $weblink)
{
if ($weblink->state == 1)
{
$item->count_published = $weblink->count;
}
elseif ($weblink->state == 0)
{
$item->count_unpublished = $weblink->count;
}
elseif ($weblink->state == 2)
{
$item->count_archived = $weblink->count;
}
elseif ($weblink->state == -2)
{
$item->count_trashed = $weblink->count;
}
}
}
return $items;
}
}

View File

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="filter">
<field
name="search"
type="text"
label="COM_WEBLINKS_FILTER_SEARCH_LABEL"
description="COM_WEBLINKS_FILTER_SEARCH_DESC"
hint="JSEARCH_FILTER"
/>
<field
name="published"
type="status"
label="JOPTION_FILTER_PUBLISHED"
description="JOPTION_FILTER_PUBLISHED_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<field
name="category_id"
type="category"
label="JOPTION_FILTER_CATEGORY"
description="JOPTION_FILTER_CATEGORY_DESC"
extension="com_weblinks"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_CATEGORY</option>
</field>
<field
name="access"
type="accesslevel"
label="JOPTION_FILTER_ACCESS"
description="JOPTION_FILTER_ACCESS_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_ACCESS</option>
</field>
<field
name="language"
type="contentlanguage"
label="JOPTION_FILTER_LANGUAGE"
description="JOPTION_FILTER_LANGUAGE_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_LANGUAGE</option>
<option value="*">JALL</option>
</field>
<field
name="tag"
type="tag"
label="JOPTION_FILTER_TAG"
description="JOPTION_FILTER_TAG_DESC"
mode="nested"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_TAG</option>
</field>
<field
name="level"
type="integer"
label="JOPTION_FILTER_LEVEL"
description="JOPTION_FILTER_LEVEL_DESC"
first="1"
last="10"
step="1"
languages="*"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_MAX_LEVELS</option>
</field>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
onchange="this.form.submit();"
default="a.title ASC"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.state ASC">JSTATUS_ASC</option>
<option value="a.state DESC">JSTATUS_DESC</option>
<option value="a.title ASC">JGLOBAL_TITLE_ASC</option>
<option value="a.title DESC">JGLOBAL_TITLE_DESC</option>
<option value="category_title ASC">JCATEGORY_ASC</option>
<option value="category_title DESC">JCATEGORY_DESC</option>
<option value="access_level ASC">JGRID_HEADING_ACCESS_ASC</option>
<option value="access_level DESC">JGRID_HEADING_ACCESS_DESC</option>
<option value="a.hits ASC">JGLOBAL_HITS_ASC</option>
<option value="a.hits DESC">JGLOBAL_HITS_DESC</option>
<option value="language_title ASC">JGRID_HEADING_LANGUAGE_ASC</option>
<option value="language_title DESC">JGRID_HEADING_LANGUAGE_DESC</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>
<field
name="limit"
type="limitbox"
class="input-mini"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>

View File

@ -19,7 +19,7 @@ class WeblinksModelWeblinks extends JModelList
/**
* Constructor.
*
* @param array An optional associative array of configuration settings.
* @param array $config An optional associative array of configuration settings.
*
* @see JControllerLegacy
* @since 1.6
@ -34,18 +34,23 @@ class WeblinksModelWeblinks extends JModelList
'alias', 'a.alias',
'checked_out', 'a.checked_out',
'checked_out_time', 'a.checked_out_time',
'catid', 'a.catid', 'category_title',
'state', 'a.state',
'access', 'a.access', 'access_level',
'catid', 'a.catid', 'category_id',
'c.title', 'category_title',
'state', 'a.state', 'published',
'access', 'a.access',
'ag.title', 'access_level',
'created', 'a.created',
'created_by', 'a.created_by',
'ordering', 'a.ordering',
'featured', 'a.featured',
'language', 'a.language',
'l.title', 'language_title',
'hits', 'a.hits',
'publish_up', 'a.publish_up',
'publish_down', 'a.publish_down',
'url', 'a.url',
'tag',
'level', 'c.level',
);
}
@ -55,38 +60,31 @@ class WeblinksModelWeblinks extends JModelList
/**
* Method to auto-populate the model state.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @note Calling getState in this method will result in recursion.
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
protected function populateState($ordering = 'a.title', $direction = 'asc')
{
// Load the filter state.
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$accessId = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', null, 'int');
$this->setState('filter.access', $accessId);
$published = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string');
$this->setState('filter.state', $published);
$categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', '');
$this->setState('filter.category_id', $categoryId);
$language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
$this->setState('filter.language', $language);
$tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');
$this->setState('filter.tag', $tag);
$this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string'));
$this->setState('filter.access', $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'cmd'));
$this->setState('filter.published', $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string'));
$this->setState('filter.category_id', $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', '', 'cmd'));
$this->setState('filter.language', $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '', 'string'));
$this->setState('filter.tag', $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '', 'string'));
$this->setState('filter.level', $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', '', 'cmd'));
// Load the parameters.
$params = JComponentHelper::getParams('com_weblinks');
$this->setState('params', $params);
// List state information.
parent::populateState('a.title', 'asc');
parent::populateState($ordering, $direction);
}
/**
@ -107,9 +105,11 @@ class WeblinksModelWeblinks extends JModelList
// Compile the store id.
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.state');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.category_id');
$id .= ':' . $this->getState('filter.language');
$id .= ':' . $this->getState('filter.tag');
$id .= ':' . $this->getState('filter.level');
return parent::getStoreId($id);
}
@ -136,47 +136,48 @@ class WeblinksModelWeblinks extends JModelList
'a.hits, a.state, a.access, a.ordering, a.language, a.publish_up, a.publish_down'
)
);
$query->from($db->quoteName('#__weblinks') . ' AS a');
$query->from($db->quoteName('#__weblinks', 'a'));
// Join over the language
$query->select('l.title AS language_title, l.image AS language_image')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');
$query->select($db->quoteName('l.title', 'language_title'))
->select($db->quoteName('l.image', 'language_image'))
->join('LEFT', $db->quoteName('#__languages', 'l') . ' ON ' . $db->qn('l.lang_code') . ' = ' . $db->qn('a.language'));
// Join over the users for the checked out user.
$query->select('uc.name AS editor')
->join('LEFT', '#__users AS uc ON uc.id=a.checked_out');
$query->select($db->quoteName('uc.name', 'editor'))
->join('LEFT', $db->quoteName('#__users', 'uc') . ' ON ' . $db->qn('uc.id') . ' = ' . $db->qn('a.checked_out'));
// Join over the asset groups.
$query->select('ag.title AS access_level')
->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
$query->select($db->quoteName('ag.title', 'access_level'))
->join('LEFT', $db->quoteName('#__viewlevels', 'ag') . ' ON ' . $db->qn('ag.id') . ' = ' . $db->qn('a.access'));
// Join over the categories.
$query->select('c.title AS category_title')
->join('LEFT', '#__categories AS c ON c.id = a.catid');
->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON ' . $db->qn('c.id') . ' = ' . $db->qn('a.catid'));
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
$query->where($db->quoteName('a.access') . ' = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.admin'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
$query->where($db->quoteName('a.access') . ' IN (' . $groups . ')');
}
// Filter by published state
$published = $this->getState('filter.state');
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.state = ' . (int) $published);
$query->where($db->quoteName('a.state') . ' = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.state IN (0, 1))');
$query->where('(' . $db->quoteName('a.state') . ' IN (0, 1))');
}
// Filter by category.
@ -184,7 +185,13 @@ class WeblinksModelWeblinks extends JModelList
if (is_numeric($categoryId))
{
$query->where('a.catid = ' . (int) $categoryId);
$query->where($db->quoteName('a.catid') . ' = ' . (int) $categoryId);
}
// Filter on the level.
if ($level = $this->getState('filter.level'))
{
$query->where($db->quoteName('c.level') . ' <= ' . (int) $level);
}
// Filter by search in title
@ -194,19 +201,19 @@ class WeblinksModelWeblinks extends JModelList
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')');
$query->where('(' . $db->quoteName('a.title') . ' LIKE ' . $search . ' OR ' . $db->quoteName('a.alias') . ' LIKE ' . $search . ')');
}
}
// Filter on the language.
if ($language = $this->getState('filter.language'))
{
$query->where('a.language = ' . $db->quote($language));
$query->where($db->quoteName('a.language') . ' = ' . $db->quote($language));
}
$tagId = $this->getState('filter.tag');
@ -223,8 +230,8 @@ class WeblinksModelWeblinks extends JModelList
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering');
$orderDirn = $this->state->get('list.direction');
$orderCol = $this->state->get('list.ordering', 'a.title');
$orderDirn = $this->state->get('list.direction', 'ASC');
if ($orderCol == 'a.ordering' || $orderCol == 'category_title')
{

View File

@ -151,11 +151,26 @@ class Com_WeblinksInstallerScript
$query->values(
$db->quote('Weblink') . ', '
. $db->quote('com_weblinks.weblink') . ', '
. $db->quote('{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
. $db->quote(
'{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"},
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
. $db->quote('') . ', '
. $db->quote('{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"hits","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_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}') . ', '
. $db->quote(
'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias",
"core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"hits",
"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_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc",
"core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}') . ', '
. $db->quote('WeblinksHelperRoute::getWeblinkRoute') . ', '
. $db->quote('{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","featured","images"], "ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"], "convertToInt":["publish_up", "publish_down", "featured", "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}')
. $db->quote(
'{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml",
"hideFields":["asset_id","checked_out","checked_out_time","version","featured","images"], "ignoreChanges":["modified_by",
"modified", "checked_out", "checked_out_time", "version", "hits"], "convertToInt":["publish_up", "publish_down", "featured",
"ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},
{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},
{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},
{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}')
);
$db->setQuery($query);
@ -172,11 +187,29 @@ class Com_WeblinksInstallerScript
$query->values(
$db->quote('Weblinks Category') . ', '
. $db->quote('com_weblinks.category') . ', '
. $db->quote('{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
. $db->quote('
{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},
"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', '
. $db->quote('') . ', '
. $db->quote('{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "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_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"}}') . ', '
. $db->quote('
{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias",
"core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description",
"core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access",
"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_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"}}') . ', '
. $db->quote('WeblinksHelperRoute::getCategoryRoute') . ', '
. $db->quote('{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}')
. $db->quote('
{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml",
"hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"],
"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version",
"hits", "path"],"convertToInt":["publish_up", "publish_down"],
"displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id",
"displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id",
"displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id",
"displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id",
"displayColumn":"title"}]}')
);
$db->setQuery($query);

View File

@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `#__weblinks` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT 0,
`title` varchar(250) NOT NULL DEFAULT '',
`alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`url` varchar(250) NOT NULL DEFAULT '',
`description` text NOT NULL,
`hits` int(11) NOT NULL DEFAULT 0,
@ -48,4 +48,4 @@ CREATE TABLE IF NOT EXISTS `#__weblinks` (
KEY `idx_featured_catid` (`featured`,`catid`),
KEY `idx_language` (`language`),
KEY `idx_xreference` (`xreference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -0,0 +1,25 @@
# Conversion to utf8mb4
--
-- Step 1.1: Enlarge columns to avoid data loss on later conversion to utf8mb4
--
ALTER TABLE `#__weblinks` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
--
-- Step 1.2: Convert table to utf8mb4 chracter set with utf8mb4_unicode_ci collation
--
ALTER TABLE `#__weblinks` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
--
-- Step 1.3: Set collation to utf8mb4_bin for formerly utf8_bin collated columns
--
ALTER TABLE `#__weblinks` MODIFY `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
--
-- Step 1.4: Set default character set and collation for all tables
--
ALTER TABLE `#__weblinks` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -45,7 +45,7 @@ class WeblinksTableWeblink extends JTable
/**
* Overload the store method for the Weblinks table.
*
* @param boolean Toggle whether null values should be updated.
* @param boolean $updateNulls Toggle whether null values should be updated.
*
* @return boolean True on success, false on failure.
*
@ -122,7 +122,7 @@ class WeblinksTableWeblink extends JTable
return false;
}
// check for valid name
// Check for valid name
if (trim($this->title) == '')
{
$this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_TITLE'));

View File

@ -9,20 +9,17 @@
defined('_JEXEC') or die;
$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
?>
<div class="tab-pane" id="params-<?php echo $name;?>">
<?php
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;
?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label; ?></div>
<div class="controls"><?php echo $field->input; ?></div>
</div>
<?php endforeach; ?>
$fieldSets = $this->form->getFieldsets('params'); ?>
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<div class="tab-pane" id="params-<?php echo $name; ?>">
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<?php echo '<p class="alert alert-info">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; ?>
<?php endif; ?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label; ?></div>
<div class="controls"><?php echo $field->input; ?></div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>

View File

@ -23,40 +23,48 @@ class WeblinksViewWeblink extends JViewLegacy
protected $form;
/**
* Display the view
* Display the view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = ($this->item->id == 0);
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
$user = JFactory::getUser();
$isNew = ($this->item->id == 0);
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
// Since we don't track these assets at the item level, use the category id.
$canDo = JHelperContent::getActions('com_weblinks', 'category', $this->item->catid);
$canDo = JHelperContent::getActions('com_weblinks', 'category', $this->item->catid);
JToolbarHelper::title($isNew ? JText::_('COM_WEBLINKS_MANAGER_WEBLINK_NEW') : JText::_('COM_WEBLINKS_MANAGER_WEBLINK_EDIT'), 'link weblinks');

View File

@ -9,7 +9,7 @@
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
@ -26,64 +26,17 @@ if ($saveOrder)
$saveOrderingUrl = 'index.php?option=com_weblinks&task=weblinks.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'weblinkList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
$sortFields = $this->getSortFields();
JFactory::getDocument()->addScriptDeclaration('
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != "' . $listOrder . '")
{
dirn = "asc";
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, "");
};
');
?>
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&view=weblinks'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_WEBLINKS_SEARCH_IN_TITLE');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_WEBLINKS_SEARCH_IN_TITLE'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.getElementById('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
</select>
</div>
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder);?>
</select>
</div>
</div>
<?php endif;?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<div class="clearfix"> </div>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
@ -94,34 +47,34 @@ JFactory::getDocument()->addScriptDeclaration('
<thead>
<tr>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="hidden-phone center">
<th width="1%" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" style="min-width:55px" class="nowrap center">
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
<th width="1%" class="nowrap center">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap center hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="10">
<td colspan="8">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
@ -135,7 +88,7 @@ JFactory::getDocument()->addScriptDeclaration('
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || $item->checked_out == 0;
$canChange = $user->authorise('core.edit.state', 'com_weblinks.category.' . $item->catid) && $canCheckin;
?>
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid?>">
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid; ?>">
<td class="order nowrap center hidden-phone">
<?php
$iconClass = '';
@ -152,30 +105,40 @@ JFactory::getDocument()->addScriptDeclaration('
<i class="icon-menu"></i>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering;?>" class="width-20 text-area-order " />
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
<?php endif; ?>
</td>
<td class="center hidden-phone">
<td class="center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'weblinks.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'weblinks.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
<?php // Create dropdown items and render the dropdown list.
if ($canChange)
{
JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'weblinks');
JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'weblinks');
echo JHtml::_('actionsdropdown.render', $this->escape($item->title));
}
?>
</div>
</td>
<td class="nowrap has-context">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'weblinks.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_weblinks&task=weblink.edit&id='.(int) $item->id); ?>">
<a href="<?php echo JRoute::_('index.php?option=com_weblinks&task=weblink.edit&id=' . (int) $item->id); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
<span class="small">
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
</span>
<div class="small">
<?php echo $this->escape($item->category_title); ?>
<?php echo JText::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?>
</div>
</td>
<td class="small hidden-phone">
@ -185,9 +148,9 @@ JFactory::getDocument()->addScriptDeclaration('
<?php echo $item->hits; ?>
</td>
<td class="small nowrap hidden-phone">
<?php if ($item->language == '*'):?>
<?php if ($item->language == '*') : ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php else : ?>
<?php echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . '&nbsp;' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
@ -205,8 +168,6 @@ JFactory::getDocument()->addScriptDeclaration('
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>

View File

@ -9,7 +9,7 @@
defined('_JEXEC') or die;
$published = $this->state->get('filter.state');
$published = $this->state->get('filter.published');
?>
<div class="modal hide fade" id="collapseModal">
<div class="modal-header">

View File

@ -23,15 +23,19 @@ class WeblinksViewWeblinks extends JViewLegacy
protected $state;
/**
* Display the view
* Display the view.
*
* @return void
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
WeblinksHelper::addSubmenu('weblinks');
@ -50,6 +54,8 @@ class WeblinksViewWeblinks extends JViewLegacy
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
@ -84,7 +90,7 @@ class WeblinksViewWeblinks extends JViewLegacy
JToolbarHelper::checkin('weblinks.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete'))
if ($state->get('filter.published') == -2 && $canDo->get('core.delete'))
{
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH');
}
@ -113,39 +119,6 @@ class WeblinksViewWeblinks extends JViewLegacy
}
JToolbarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS');
JHtmlSidebar::setAction('index.php?option=com_weblinks&view=weblinks');
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_state',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_CATEGORY'),
'filter_category_id',
JHtml::_('select.options', JHtml::_('category.options', 'com_weblinks'), 'value', 'text', $this->state->get('filter.category_id'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_LANGUAGE'),
'filter_language',
JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_TAG'),
'filter_tag',
JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))
);
}
/**

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<extension type="component" version="3.5" method="upgrade">
<name>com_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -21,6 +21,8 @@ COM_WEBLINKS_ERROR_UNIQUE_ALIAS="Another web link from this category has the sam
COM_WEBLINKS_FIELD_ALIAS_DESC="The alias is for internal use only. Leave this blank and Joomla will fill in a default value from the title. It has to be unique for each web link in the same category."
COM_WEBLINKS_FIELD_CATEGORY_DESC="Choose a category for this Web link."
COM_WEBLINKS_FIELD_CATEGORYCHOOSE_DESC="Please choose a Web Links category to display."
COM_WEBLINKS_FIELD_CAPTCHA_DESC="Select the captcha plugin that will be used in the web link submit form. You may need to enter required information for your captcha plugin in the Plugin Manager.<br />If 'Use Default' is selected, make sure a captcha plugin is selected in Global Configuration."
COM_WEBLINKS_FIELD_CAPTCHA_LABEL="Allow Captcha on Web Link"
COM_WEBLINKS_FIELD_CONFIG_CAT_SHOWNUMBERS_DESC="Show/Hide the number of Web Links in each Category."
COM_WEBLINKS_FIELD_CONFIG_CAT_SHOWNUMBERS_LABEL="# Web Links"
COM_WEBLINKS_FIELD_CONFIG_COUNTCLICKS_DESC="If set to yes, the number of times the link has been clicked will be recorded."
@ -79,6 +81,8 @@ COM_WEBLINKS_FIELD_WIDTH_LABEL="Width"
COM_WEBLINKS_FIELDSET_IMAGES="Images"
COM_WEBLINKS_FIELDSET_OPTIONS="Options"
COM_WEBLINKS_FILTER_CATEGORY="Filter Category"
COM_WEBLINKS_FILTER_SEARCH_DESC="Search in web link title and alias. Prefix with ID: to search for an web link ID."
COM_WEBLINKS_FILTER_SEARCH_LABEL="Search Web Links"
COM_WEBLINKS_FILTER_STATE="Filter State"
COM_WEBLINKS_FLOAT_DESC="Controls placement of the image."
COM_WEBLINKS_FLOAT_LABEL="Image Float"

View File

@ -20,8 +20,8 @@ class WeblinksController extends JControllerLegacy
* Method to display a view.
*
* @param boolean $cacheable If true, the view output will be cached
* @param array $urlparams An array of safe url parameters and their variable types,
* for valid values see {@link JFilterInput::clean()}.
* @param array $urlparams An array of safe url parameters and their variable types,
* for valid values see {@link JFilterInput::clean()}.
*
* @return WeblinksController This object to support chaining.
*
@ -29,8 +29,8 @@ class WeblinksController extends JControllerLegacy
*/
public function display($cacheable = false, $urlparams = false)
{
$cacheable = true; // Huh? Why not just put that in the constructor?
$user = JFactory::getUser();
// Huh? Why not just put that in the constructor?
$cacheable = true;
// Set the default view name and format from the Request.
// Note we are using w_id to avoid collisions with the router and the return page.
@ -45,12 +45,12 @@ class WeblinksController extends JControllerLegacy
}
$safeurlparams = array(
'id' => 'INT',
'limit' => 'UINT',
'limitstart' => 'UINT',
'filter_order' => 'CMD',
'filter_order_Dir' => 'CMD',
'lang' => 'CMD'
'id' => 'INT',
'limit' => 'UINT',
'limitstart' => 'UINT',
'filter_order' => 'CMD',
'filter_order_Dir' => 'CMD',
'lang' => 'CMD'
);
// Check for edit form.

View File

@ -227,11 +227,21 @@ class WeblinksControllerWeblink extends JControllerForm
*/
public function save($key = null, $urlVar = 'w_id')
{
// Get the application
$app = JFactory::getApplication();
// Get the data from POST
$data = $this->input->post->get('jform', array(), 'array');
// Save the data in the session.
$app->setUserState('com_weblinks.edit.weblink.data', $data);
$result = parent::save($key, $urlVar);
// If ok, redirect to the return page.
if ($result)
{
// Flush the data from the session
$app->setUserState('com_weblinks.edit.weblink.data', null);
$this->setRedirect($this->getReturnPage());
}

View File

@ -10,6 +10,7 @@
defined('_JEXEC') or die;
JLoader::register('WeblinksHelper', JPATH_ADMINISTRATOR . '/components/com_weblinks/helpers/weblinks.php');
JLoader::register('WeblinksHelperRoute', JPATH_SITE . '/components/com_weblinks/helpers/route.php');
JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php');
/**
@ -31,11 +32,9 @@ abstract class WeblinksHelperAssociation extends CategoryHelperAssociation
*/
public static function getAssociations($id = 0, $view = null)
{
jimport('helper.route', JPATH_COMPONENT_SITE);
$jinput = JFactory::getApplication()->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
if ($view == 'category' || $view == 'categories')
{

View File

@ -63,7 +63,7 @@ class JHtmlIcon
$url = WeblinksHelperRoute::getFormRoute($weblink->id, base64_encode($uri));
$icon = $weblink->state ? 'edit.png' : 'edit_unpublished.png';
$text = JHtml::_('image', 'system/'.$icon, JText::_('JGLOBAL_EDIT'), null, true);
$text = JHtml::_('image', 'system/' . $icon, JText::_('JGLOBAL_EDIT'), null, true);
if ($weblink->state == 0)
{

View File

@ -21,18 +21,20 @@ abstract class WeblinksHelperRoute
protected static $lang_lookup = array();
/**
* @param integer The route of the weblink
* Get the route of the weblink
*
* @param integer $id Web link ID
* @param integer $catid Category ID
* @param string $language Language
*
* @return string
*/
public static function getWeblinkRoute($id, $catid, $language = 0)
{
$needles = array(
'weblink' => array((int) $id)
);
$needles = array('weblink' => array((int) $id));
// Create the link
$link = 'index.php?option=com_weblinks&view=weblink&id='. $id;
$link = 'index.php?option=com_weblinks&view=weblink&id=' . $id;
if ($catid > 1)
{
@ -67,6 +69,8 @@ abstract class WeblinksHelperRoute
}
/**
* Ge the form route
*
* @param integer $id The id of the weblink.
* @param string $return The return page variable.
*
@ -77,7 +81,7 @@ abstract class WeblinksHelperRoute
// Create the link.
if ($id)
{
$link = 'index.php?option=com_weblinks&task=weblink.edit&w_id='. $id;
$link = 'index.php?option=com_weblinks&task=weblink.edit&w_id=' . $id;
}
else
{
@ -86,13 +90,15 @@ abstract class WeblinksHelperRoute
if ($return)
{
$link .= '&return='.$return;
$link .= '&return=' . $return;
}
return $link;
}
/**
* Get the Category Route
*
* @param JCategoryNode|string|integer $catid JCategoryNode object or category ID
* @param integer $language Language code
*
@ -120,7 +126,7 @@ abstract class WeblinksHelperRoute
$needles = array();
// Create the link
$link = 'index.php?option=com_weblinks&view=category&id='.$id;
$link = 'index.php?option=com_weblinks&view=category&id=' . $id;
$catids = array_reverse($category->getPath());
$needles['category'] = $catids;
@ -139,7 +145,7 @@ abstract class WeblinksHelperRoute
if ($item = self::_findItem($needles))
{
$link .= '&Itemid='.$item;
$link .= '&Itemid=' . $item;
}
}
@ -147,6 +153,8 @@ abstract class WeblinksHelperRoute
}
/**
* Do a language lookup
*
* @return void
*/
protected static function buildLanguageLookup()
@ -169,6 +177,13 @@ abstract class WeblinksHelperRoute
}
}
/**
* Find items per given $needles
*
* @params array $needles
*
* @return void
*/
protected static function _findItem($needles = null)
{
$app = JFactory::getApplication();
@ -208,7 +223,7 @@ abstract class WeblinksHelperRoute
if (isset($item->query['id']))
{
// here it will become a bit tricky
// Here it will become a bit tricky
// language != * can override existing entries
// language == * cannot override existing entries
if (!isset(self::$lookup[$language][$view][$item->query['id']]) || $item->language != '*')

View File

@ -40,6 +40,11 @@ class WeblinksModelCategories extends JModelList
*
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
@ -54,8 +59,8 @@ class WeblinksModelCategories extends JModelList
$params = $app->getParams();
$this->setState('params', $params);
$this->setState('filter.published', 1);
$this->setState('filter.access', true);
$this->setState('filter.published', 1);
$this->setState('filter.access', true);
}
/**
@ -72,18 +77,18 @@ class WeblinksModelCategories extends JModelList
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':'.$this->getState('filter.extension');
$id .= ':'.$this->getState('filter.published');
$id .= ':'.$this->getState('filter.access');
$id .= ':'.$this->getState('filter.parentId');
$id .= ':' . $this->getState('filter.extension');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.parentId');
return parent::getStoreId($id);
}
/**
* redefine the function an add some properties to make the styling more easy
* Redefine the function and add some properties to make the styling more easy
*
* @return mixed An array of data items on success, false on failure.
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
@ -117,12 +122,18 @@ class WeblinksModelCategories extends JModelList
return $this->_items;
}
/**
* Get the parent
*
* @return mixed An array of data items on success, false on failure.
*/
public function getParent()
{
if (!is_object($this->_parent))
{
$this->getItems();
}
return $this->_parent;
}
}

View File

@ -36,7 +36,7 @@ class WeblinksModelCategory extends JModelList
/**
* Constructor.
*
* @param array An optional associative array of configuration settings.
* @param array $config An optional associative array of configuration settings.
*
* @see JControllerLegacy
* @since 1.6
@ -121,9 +121,20 @@ class WeblinksModelCategory extends JModelList
// Filter by category.
if ($categoryId = $this->getState('category.id'))
{
$query->where('a.catid = ' . (int) $categoryId)
->join('LEFT', '#__categories AS c ON c.id = a.catid')
->where('c.access IN (' . $groups . ')');
// Group by subcategory
if ($this->getState('category.group', 0))
{
$query->select('c.title AS category_title')
->where('c.parent_id = ' . (int) $categoryId)
->join('LEFT', '#__categories AS c ON c.id = a.catid')
->where('c.access IN (' . $groups . ')');
}
else
{
$query->where('a.catid = ' . (int) $categoryId)
->join('LEFT', '#__categories AS c ON c.id = a.catid')
->where('c.access IN (' . $groups . ')');
}
// Filter by published category
$cpublished = $this->getState('filter.c.published');
@ -141,7 +152,6 @@ class WeblinksModelCategory extends JModelList
->join('LEFT', '#__users AS uam ON uam.id = a.modified_by');
// Filter by state
$state = $this->getState('filter.state');
if (is_numeric($state))
@ -149,7 +159,7 @@ class WeblinksModelCategory extends JModelList
$query->where('a.state = ' . (int) $state);
}
// do not show trashed links on the front-end
// Do not show trashed links on the front-end
$query->where('a.state != -2');
// Filter by start and end dates.
@ -176,12 +186,20 @@ class WeblinksModelCategory extends JModelList
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.title LIKE ' . $search . ')');
}
// If grouping by subcategory, add the subcategory list ordering clause.
if($this->getState('category.group', 0))
{
$query->order(
$db->escape($this->getState('category.ordering', 'c.lft')) . ' ' .
$db->escape($this->getState('category.direction', 'ASC'))
);
}
// Add the list ordering clause.
$query->order(
$db->escape(
$this->getState('list.ordering', 'a.ordering')) . ' ' . $db->escape($this->getState('list.direction', 'ASC')
)
$db->escape($this->getState('list.ordering', 'a.ordering')) . ' ' .
$db->escape($this->getState('list.direction', 'ASC'))
);
return $query;
@ -192,6 +210,11 @@ class WeblinksModelCategory extends JModelList
*
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
@ -234,7 +257,7 @@ class WeblinksModelCategory extends JModelList
if ((!$user->authorise('core.edit.state', 'com_weblinks')) && (!$user->authorise('core.edit', 'com_weblinks')))
{
// limit to published for people who can't edit or edit.state.
// Limit to published for people who can't edit or edit.state.
$this->setState('filter.state', 1);
// Filter by start and end dates.
@ -301,8 +324,6 @@ class WeblinksModelCategory extends JModelList
/**
* Get the parent category
*
* @param integer An optional category id. If not supplied, the model state 'category.id' will be used.
*
* @return mixed An array of categories or false if an error occurs.
*/
public function getParent()
@ -311,40 +332,46 @@ class WeblinksModelCategory extends JModelList
{
$this->getCategory();
}
return $this->_parent;
}
/**
* Get the sibling (adjacent) categories.
* Get the leftsibling (adjacent) categories.
*
* @return mixed An array of categories or false if an error occurs.
*/
function &getLeftSibling()
public function &getLeftSibling()
{
if (!is_object($this->_item))
{
$this->getCategory();
}
return $this->_leftsibling;
}
function &getRightSibling()
/**
* Get the rightsibling (adjacent) categories.
*
* @return mixed An array of categories or false if an error occurs.
*/
public function &getRightSibling()
{
if (!is_object($this->_item))
{
$this->getCategory();
}
return $this->_rightsibling;
}
/**
* Get the child categories.
*
* @param integer An optional category id. If not supplied, the model state 'category.id' will be used.
*
* @return mixed An array of categories or false if an error occurs.
*/
function &getChildren()
public function &getChildren()
{
if (!is_object($this->_item))
{

View File

@ -43,6 +43,8 @@ class WeblinksModelForm extends WeblinksModelWeblink
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()

View File

@ -89,6 +89,15 @@
size="45"
labelclass="control-label" />
<field
name="captcha"
type="captcha"
label="COM_WEBLINKS_CAPTCHA_LABEL"
description="COM_WEBLINKS_CAPTCHA_DESC"
validate="captcha"
namespace="weblink"
/>
</fieldset>
<fields name="metadata">
<fieldset name="jmetadata"

View File

@ -32,6 +32,8 @@ class WeblinksModelWeblink extends JModelItem
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
@ -50,7 +52,7 @@ class WeblinksModelWeblink extends JModelItem
/**
* Method to get an object.
*
* @param integer The id of the object to get.
* @param integer $id The id of the object to get.
*
* @return mixed Object on success, false on failure.
*/
@ -96,9 +98,9 @@ class WeblinksModelWeblink extends JModelItem
/**
* Returns a reference to the a Table object, always creating it.
*
* @param type The table type to instantiate
* @param string A prefix for the table class name. Optional.
* @param array Configuration array for model. Optional.
* @param string $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*

View File

@ -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;

View File

@ -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);

View File

@ -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'));
?>
<?php if (empty($this->items)) : ?>
@ -34,9 +34,9 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php else : ?>
<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
<?php if ($this->params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) :?>
<?php if ($this->params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) : ?>
<fieldset class="filters btn-toolbar">
<?php if ($this->params->get('filter_field') != 'hide') :?>
<?php if ($this->params->get('filter_field') != 'hide') : ?>
<div class="btn-group">
<label class="filter-search-lbl element-invisible" for="filter-search"><?php echo JText::_('COM_WEBLINKS_FILTER_LABEL') . '&#160;'; ?></label>
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('COM_WEBLINKS_FILTER_SEARCH_DESC'); ?>" placeholder="<?php echo JText::_('COM_WEBLINKS_FILTER_SEARCH_DESC'); ?>" />
@ -54,12 +54,11 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</fieldset>
<?php endif; ?>
<ul class="category list-striped list-condensed">
<?php foreach ($this->items as $i => $item) : ?>
<?php if (in_array($item->access, $this->user->getAuthorisedViewLevels())) : ?>
<?php if ($this->items[$i]->state == 0) : ?>
<li class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<?php else: ?>
<?php else : ?>
<li class="cat-list-row<?php echo $i % 2; ?>" >
<?php endif; ?>
<?php if ($this->params->get('show_link_hits', 1)) : ?>
@ -84,48 +83,47 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php echo '<img src="' . $this->params->get('link_icons') . '" alt="' . JText::_('COM_WEBLINKS_LINK') . '" />'; ?>
<?php endif; ?>
<?php endif; ?>
<?php // Compute the correct link ?>
<?php $menuclass = 'category' . $this->pageclass_sfx; ?>
<?php $link = $item->link; ?>
<?php $width = $item->params->get('width'); ?>
<?php $height = $item->params->get('height'); ?>
<?php if ($width == null || $height == null) : ?>
<?php $width = 600; ?>
<?php $height = 500; ?>
<?php endif; ?>
<?php if ($this->items[$i]->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php
// Compute the correct link
$menuclass = 'category' . $this->pageclass_sfx;
$link = $item->link;
$width = $item->params->get('width');
$height = $item->params->get('height');
if ($width == null || $height == null)
{
$width = 600;
$height = 500;
}
if ($this->items[$i]->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
switch ($item->params->get('target', $this->params->get('target')))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . '</a>';
break;
<?php switch ($item->params->get('target', $this->params->get('target')))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . '';
echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" .
$this->escape($item->title) . '</a>';
break;
case 3:
// Open in a modal window
JHtml::_('behavior.modal', 'a.modal');
echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' .
$this->escape($item->title) . ' </a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . '';
echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" .
$this->escape($item->title) . '</a>';
break;
case 3:
// Open in a modal window
JHtml::_('behavior.modal', 'a.modal');
echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' .
$this->escape($item->title) . ' </a>';
break;
default:
// Open in parent window
echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . ' </a>';
break;
}
default:
// Open in parent window
echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . ' </a>';
break;
}
?>
</div>
<?php $tagsData = $item->tags->getItemTags('com_weblinks.weblink', $item->id); ?>
@ -133,38 +131,32 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($tagsData); ?>
<?php endif; ?>
<?php if (($this->params->get('show_link_description')) and ($item->description != '')) : ?>
<?php $images = json_decode($item->images); ?>
<?php if (isset($images->image_first) and !empty($images->image_first)) : ?>
<?php $imgfloat = (empty($images->float_first)) ? $this->params->get('float_first') : $images->float_first; ?>
<div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>"> <img
<?php if ($images->image_first_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_first_caption) .'"';
endif; ?>
<?php if ($images->image_first_caption) : ?>
<?php echo 'class="caption" title="' . htmlspecialchars($images->image_first_caption) . '"'; ?>
<?php endif; ?>
src="<?php echo htmlspecialchars($images->image_first); ?>" alt="<?php echo htmlspecialchars($images->image_first_alt); ?>"/> </div>
<?php endif; ?>
<?php if (isset($images->image_second) and !empty($images->image_second)) : ?>
<?php $imgfloat = (empty($images->float_second)) ? $this->params->get('float_second') : $images->float_second; ?>
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
<?php if ($images->image_second_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_second_caption) .'"';
endif; ?>
<?php if ($images->image_second_caption) : ?>
<?php echo 'class="caption" title="' . htmlspecialchars($images->image_second_caption) . '"'; ?>
<?php endif; ?>
src="<?php echo htmlspecialchars($images->image_second); ?>" alt="<?php echo htmlspecialchars($images->image_second_alt); ?>"/> </div>
<?php endif; ?>
<?php echo $item->description; ?>
<?php endif; ?>
</li>
<?php endif;?>
<?php endforeach; ?>
</ul>
<?php // Code to add a link to submit a weblink. ?>
<?php /* if ($canCreate) : // TODO This is not working due to some problem in the router, I think. Ref issue #23685 ?>
<?php echo JHtml::_('icon.create', $item, $item->params); ?>
<?php endif; */ ?>
<?php if ($this->params->get('show_pagination')) : ?>
<div class="pagination">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>

View File

@ -14,6 +14,18 @@ JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.modal', 'a.modal_jform_contenthistory');
$captchaEnabled = false;
$captchaSet = $this->params->get('captcha', JFactory::getApplication()->get('captcha', '0'));
foreach (JPluginHelper::getPlugin('captcha') as $plugin)
{
if ($captchaSet === $plugin->name)
{
$captchaEnabled = true;
break;
}
}
// Create shortcut to parameters.
$params = $this->state->get('params');
?>
@ -34,7 +46,32 @@ $params = $this->state->get('params');
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&view=form&w_id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&view=form&w_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('alias'); ?>
<?php echo $this->form->renderField('catid'); ?>
<?php echo $this->form->renderField('url'); ?>
<?php echo $this->form->renderField('tags'); ?>
<?php if ($params->get('save_history', 0)) : ?>
<?php echo $this->form->renderField('version_note'); ?>
<?php endif; ?>
<?php if ($this->user->authorise('core.edit.state', 'com_weblinks.weblink')) : ?>
<?php echo $this->form->renderField('state'); ?>
<?php endif; ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo $this->form->renderField('description'); ?>
<hr class="hr-condensed" />
<?php if ($captchaEnabled) : ?>
<div class="btn-group">
<?php echo $this->form->renderField('captcha'); ?>
</div>
<?php endif; ?>
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
@ -53,23 +90,6 @@ $params = $this->state->get('params');
<?php endif; ?>
</div>
<hr class="hr-condensed" />
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('alias'); ?>
<?php echo $this->form->renderField('catid'); ?>
<?php echo $this->form->renderField('url'); ?>
<?php echo $this->form->renderField('tags'); ?>
<?php if ($params->get('save_history', 0)) : ?>
<?php echo $this->form->renderField('version_note'); ?>
<?php endif; ?>
<?php if ($this->user->authorise('core.edit.state', 'com_weblinks.weblink')) : ?>
<?php echo $this->form->renderField('state'); ?>
<?php endif; ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo $this->form->renderField('description'); ?>
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>

View File

@ -24,9 +24,18 @@ class WeblinksViewForm extends JViewLegacy
protected $state;
/**
* Display the view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$user = JFactory::getUser();
// Get the application
$app = JFactory::getApplication();
// Get model data.
$this->state = $this->get('State');
@ -40,7 +49,7 @@ class WeblinksViewForm extends JViewLegacy
}
else
{
$authorised = $user->authorise('core.edit', 'com_weblinks.category.'.$this->item->catid);
$authorised = $user->authorise('core.edit', 'com_weblinks.category.' . $this->item->catid);
}
if ($authorised !== true)
@ -52,6 +61,12 @@ class WeblinksViewForm extends JViewLegacy
if (!empty($this->item))
{
// Override the base weblink data with any data in the session.
$temp = (array) $app->getUserState('com_weblinks.edit.weblink.data', array());
foreach ($temp as $k => $v)
{
$this->item->$k = $v;
}
$this->form->bind($this->item);
}
@ -66,7 +81,7 @@ class WeblinksViewForm extends JViewLegacy
// Create a shortcut to the parameters.
$params = &$this->state->params;
//Escape strings for HTML output
// Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$this->params = $params;
@ -78,6 +93,8 @@ class WeblinksViewForm extends JViewLegacy
/**
* Prepares the document
*
* @return void
*/
protected function _prepareDocument()
{

View File

@ -20,25 +20,33 @@ class WeblinksViewWeblink extends JViewLegacy
protected $item;
/**
* Display the view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
// Get some data from the models
$item = $this->get('Item');
$item = $this->get('Item');
if ($this->getLayout() == 'edit')
{
$this->_displayEdit($tpl);
return;
}
if ($item->url)
{
// redirects to url if matching id found
// Redirects to url if matching id found
JFactory::getApplication()->redirect($item->url);
}
else
{
//TODO create proper error handling
// @TODO create proper error handling
JFactory::getApplication()->redirect(JRoute::_('index.php'), JText::_('COM_WEBLINKS_ERROR_WEBLINK_NOT_FOUND'), 'notice');
}
}

View File

@ -3,6 +3,8 @@
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM
COM_WEBLINKS_CAPTCHA_LABEL="Captcha"
COM_WEBLINKS_CAPTCHA_DESC="Please complete the security check."
COM_WEBLINKS_CONTENT_TYPE_WEBLINK="Web Link"
COM_WEBLINKS_CONTENT_TYPE_CATEGORY="Web Links Category"
COM_WEBLINKS_DEFAULT_PAGE_TITLE="Web Links"

View File

@ -5,6 +5,16 @@
MOD_WEBLINKS="Web Links"
MOD_WEBLINKS_FIELD_CATEGORY_DESC="Choose the Web Links category to display."
MOD_WEBLINKS_FIELD_GROUPBY_DESC="If set to yes, weblinks will be grouped by subcategories."
MOD_WEBLINKS_FIELD_GROUPBY_LABEL="Group By Subcategories"
MOD_WEBLINKS_FIELD_GROUPBYSHOWTITLE_DESC="If set to yes, will show groups titles (valid only if grouping)."
MOD_WEBLINKS_FIELD_GROUPBYSHOWTITLE_LABEL="Show Group Title"
MOD_WEBLINKS_FIELD_GROUPBYORDERING_DESC="Ordering for the subcategories (valid only if grouping)."
MOD_WEBLINKS_FIELD_GROUPBYORDERING_LABEL="Group Ordering"
MOD_WEBLINKS_FIELD_GROUPBYDIRECTION_DESC="Direction for the subcategories (valid only if grouping)."
MOD_WEBLINKS_FIELD_GROUPBYDIRECTION_LABEL="Group Ordering Direction"
MOD_WEBLINKS_FIELD_COLUMNS_DESC="When grouping by subcategories, split into # columns."
MOD_WEBLINKS_FIELD_COLUMNS_LABEL="Columns"
MOD_WEBLINKS_FIELD_COUNT_DESC="Number of Web Links to display."
MOD_WEBLINKS_FIELD_COUNT_LABEL="Count"
MOD_WEBLINKS_FIELD_COUNTCLICKS_DESC="If set to yes, the number of times the link has been clicked will be recorded."

View File

@ -57,6 +57,9 @@ class ModWeblinksHelper
$catid = (int) $params->get('catid', 0);
$model->setState('category.id', $catid);
$model->setState('category.group', $params->get('groupby', 0));
$model->setState('category.ordering', $params->get('groupby_ordering', 'c.lft'));
$model->setState('category.direction', $params->get('groupby_direction', 'ASC'));
// Create query object
$db = JFactory::getDbo();

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1" client="site" method="upgrade">
<extension type="module" version="3.5" client="site" method="upgrade">
<name>mod_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>
@ -20,141 +20,204 @@
<fields name="params">
<fieldset name="basic">
<field
name="catid"
type="category"
extension="com_weblinks"
required="true"
label="JCATEGORY"
description="MOD_WEBLINKS_FIELD_CATEGORY_DESC" />
name="catid"
type="category"
extension="com_weblinks"
required="true"
label="JCATEGORY"
description="MOD_WEBLINKS_FIELD_CATEGORY_DESC" />
<field
name="count"
type="text"
default="5"
label="MOD_WEBLINKS_FIELD_COUNT_LABEL"
description="MOD_WEBLINKS_FIELD_COUNT_DESC" />
<field
name="ordering"
type="list"
default="title"
label="MOD_WEBLINKS_FIELD_ORDERING_LABEL"
description="MOD_WEBLINKS_FIELD_ORDERING_DESC">
name="groupby"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="MOD_WEBLINKS_FIELD_GROUPBY_LABEL"
description="MOD_WEBLINKS_FIELD_GROUPBY_DESC">
<option
value="title">JGLOBAL_TITLE</option>
value="1">JYES</option>
<option
value="order">MOD_WEBLINKS_FIELD_VALUE_ORDER</option>
<option
value="hits">MOD_WEBLINKS_FIELD_VALUE_HITS</option>
value="0">JNO</option>
</field>
<field
name="direction"
type="list"
default="asc"
label="MOD_WEBLINKS_FIELD_ORDERDIRECTION_LABEL"
description="MOD_WEBLINKS_FIELD_ORDERDIRECTION_DESC">
name="groupby_showtitle"
type="radio"
class="btn-group btn-group-yesno"
default="1"
label="MOD_WEBLINKS_FIELD_GROUPBYSHOWTITLE_LABEL"
description="MOD_WEBLINKS_FIELD_GROUPBYSHOWTITLE_DESC">
<option
value="asc">MOD_WEBLINKS_FIELD_VALUE_ASCENDING</option>
value="1">JYES</option>
<option
value="desc">MOD_WEBLINKS_FIELD_VALUE_DESCENDING</option>
value="0">JNO</option>
</field>
<field
name="target"
type="list"
default="3"
label="MOD_WEBLINKS_FIELD_TARGET_LABEL"
description="MOD_WEBLINKS_FIELD_TARGET_DESC">
name="groupby_ordering"
type="list"
default="c.lft"
label="MOD_WEBLINKS_FIELD_GROUPBYORDERING_LABEL"
description="MOD_WEBLINKS_FIELD_GROUPBYORDERING_DESC">
<option
value="1">JBROWSERTARGET_NEW</option>
value="c.title">JGLOBAL_TITLE</option>
<option
value="2">JBROWSERTARGET_POPUP</option>
<option
value="3">JBROWSERTARGET_PARENT</option>
value="c.lft">MOD_WEBLINKS_FIELD_VALUE_ORDER</option>
</field>
<field
name="follow"
type="list"
default="0"
label="MOD_WEBLINKS_FIELD_FOLLOW_LABEL"
description="MOD_WEBLINKS_FIELD_FOLLOW_DESC">
name="groupby_direction"
type="list"
default="asc"
label="MOD_WEBLINKS_FIELD_GROUPBYDIRECTION_LABEL"
description="MOD_WEBLINKS_FIELD_GROUPBYDIRECTION_DESC">
<option
value="follow">MOD_WEBLINKS_FIELD_VALUE_FOLLOW</option>
value="asc">MOD_WEBLINKS_FIELD_VALUE_ASCENDING</option>
<option
value="nofollow">MOD_WEBLINKS_FIELD_VALUE_NOFOLLOW</option>
value="desc">MOD_WEBLINKS_FIELD_VALUE_DESCENDING</option>
</field>
<field
name="description"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="MOD_WEBLINKS_FIELD_DESCRIPTION_LABEL"
description="MOD_WEBLINKS_FIELD_DESCRIPTION_DESC">
name="groupby_columns"
type="list"
default="3"
label="MOD_WEBLINKS_FIELD_COLUMNS_LABEL"
description="MOD_WEBLINKS_FIELD_COLUMNS_DESC">
<option
value="1">JSHOW</option>
value="1">1</option>
<option
value="2">2</option>
<option
value="0">JHIDE</option>
value="3">3</option>
<option
value="4">4</option>
<option
value="6">6</option>
</field>
<field
name="hits"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="MOD_WEBLINKS_FIELD_HITS_LABEL"
description="MOD_WEBLINKS_FIELD_HITS_DESC">
name="count"
type="text"
default="5"
label="MOD_WEBLINKS_FIELD_COUNT_LABEL"
description="MOD_WEBLINKS_FIELD_COUNT_DESC" />
<field
name="ordering"
type="list"
default="title"
label="MOD_WEBLINKS_FIELD_ORDERING_LABEL"
description="MOD_WEBLINKS_FIELD_ORDERING_DESC">
<option
value="1">JSHOW</option>
value="title">JGLOBAL_TITLE</option>
<option
value="0">JHIDE</option>
value="order">MOD_WEBLINKS_FIELD_VALUE_ORDER</option>
<option
value="hits">MOD_WEBLINKS_FIELD_VALUE_HITS</option>
</field>
<field
name="direction"
type="list"
default="asc"
label="MOD_WEBLINKS_FIELD_ORDERDIRECTION_LABEL"
description="MOD_WEBLINKS_FIELD_ORDERDIRECTION_DESC">
<option
value="asc">MOD_WEBLINKS_FIELD_VALUE_ASCENDING</option>
<option
value="desc">MOD_WEBLINKS_FIELD_VALUE_DESCENDING</option>
</field>
<field
name="target"
type="list"
default="3"
label="MOD_WEBLINKS_FIELD_TARGET_LABEL"
description="MOD_WEBLINKS_FIELD_TARGET_DESC">
<option
value="1">JBROWSERTARGET_NEW</option>
<option
value="2">JBROWSERTARGET_POPUP</option>
<option
value="3">JBROWSERTARGET_PARENT</option>
</field>
<field
name="follow"
type="list"
default="0"
label="MOD_WEBLINKS_FIELD_FOLLOW_LABEL"
description="MOD_WEBLINKS_FIELD_FOLLOW_DESC">
<option
value="follow">MOD_WEBLINKS_FIELD_VALUE_FOLLOW</option>
<option
value="nofollow">MOD_WEBLINKS_FIELD_VALUE_NOFOLLOW</option>
</field>
<field
name="description"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="MOD_WEBLINKS_FIELD_DESCRIPTION_LABEL"
description="MOD_WEBLINKS_FIELD_DESCRIPTION_DESC">
<option
value="1">JSHOW</option>
<option
value="0">JHIDE</option>
</field>
<field
name="hits"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="MOD_WEBLINKS_FIELD_HITS_LABEL"
description="MOD_WEBLINKS_FIELD_HITS_DESC">
<option
value="1">JSHOW</option>
<option
value="0">JHIDE</option>
</field>
<field
name="count_clicks"
type="list"
class="chzn-color"
default="0"
label="MOD_WEBLINKS_FIELD_COUNTCLICKS_LABEL"
description="MOD_WEBLINKS_FIELD_COUNTCLICKS_DESC">
name="count_clicks"
type="list"
class="chzn-color"
default="0"
label="MOD_WEBLINKS_FIELD_COUNTCLICKS_LABEL"
description="MOD_WEBLINKS_FIELD_COUNTCLICKS_DESC">
<option
value="">JGLOBAL_USE_GLOBAL</option>
<option
value="">JGLOBAL_USE_GLOBAL</option>
value="0">JNO</option>
<option
value="0">JNO</option>
<option
value="1">JYES</option>
value="1">JYES</option>
</field>
</fieldset>
<fieldset
name="advanced">
name="advanced">
<field
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
<field
name="moduleclass_sfx"
type="textarea" rows="3"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
name="moduleclass_sfx"
type="textarea" rows="3"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
<field
name="cache"
type="list"
default="1"
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC">
name="cache"
type="list"
default="1"
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC">
<option
value="1">JGLOBAL_USE_GLOBAL</option>
value="1">JGLOBAL_USE_GLOBAL</option>
<option
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
</field>
<field
name="cache_time"
type="text"
default="900"
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
name="cache_time"
type="text"
default="900"
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
<field
name="cachemode"
type="hidden"
default="static">
name="cachemode"
type="hidden"
default="static">
<option
value="static"></option>
value="static"></option>
</field>
</fieldset>
</fields>

View File

@ -9,47 +9,120 @@
defined('_JEXEC') or die;
?>
<ul class="weblinks<?php echo $moduleclass_sfx; ?>">
<?php
foreach ($list as $item) :
?>
<li>
<?php
$link = $item->link;
<?php
if($params->get('groupby', 0)) :
switch ($params->get('target', 3))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
$cats = array();
$cols = $params->get('groupby_columns', 3);
case 2:
// Open in a popup window
echo "<a href=\"#\" onclick=\"window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">" .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
foreach ($list as $l)
$cats[] = array('catid' => $l->catid, 'title' => $l->category_title);
default:
// Open in parent window
echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
}
$cats = array_values(array_map('unserialize', array_unique(array_map('serialize', $cats))));
if ($params->get('description', 0))
{
echo nl2br($item->description);
}
foreach ($cats as $k => $cat) :
if ($params->get('hits', 0))
{
echo '(' . $item->hits . ' ' . JText::_('MOD_WEBLINKS_HITS') . ')';
}
?>
</li>
<?php
endforeach;
?>
</ul>
$items = array();
foreach ($list as $item)
if ($item->catid == $cat['catid'])
$items[] = $item;
?>
<?php if($cols > 1) : ?>
<?php if($k % $cols == 0) : ?>
<div class="row row-fluid">
<?php endif; ?>
<div class="span<?php echo (12 / $cols); ?>">
<?php endif; ?>
<?php if($params->get('groupby_showtitle', 1)) : ?>
<h4><?php echo htmlspecialchars($cat['title']); ?></h4>
<?php endif; ?>
<ul class="weblinks<?php echo $moduleclass_sfx; ?>">
<?php foreach ($items as $item) : ?>
<li>
<?php
$link = $item->link;
switch ($item->params->get('target', 3))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
echo "<a href=\"#\" onclick=\"window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">" .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
default:
// Open in parent window
echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
}
if ($params->get('description', 0))
{
echo nl2br($item->description);
}
if ($params->get('hits', 0))
{
echo '(' . $item->hits . ' ' . JText::_('MOD_WEBLINKS_HITS') . ')';
}
?>
</li>
<?php endforeach; ?>
</ul>
<?php if($cols > 1) : ?>
</div>
<?php if(($k + 1) % $cols == 0 || $k == count($cats) - 1) : ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php else : ?>
<ul class="weblinks<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<li>
<?php
$link = $item->link;
switch ($item->params->get('target', 3))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
echo "<a href=\"#\" onclick=\"window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">" .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
default:
// Open in parent window
echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' .
htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
break;
}
if ($params->get('description', 0))
{
echo nl2br($item->description);
}
if ($params->get('hits', 0))
{
echo '(' . $item->hits . ' ' . JText::_('MOD_WEBLINKS_HITS') . ')';
}
?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.0" method="upgrade">
<extension type="package" version="3.5" method="upgrade">
<name>pkg_weblinks</name>
<packagename>weblinks</packagename>
<creationDate>December 2012</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="finder" method="upgrade">
<extension version="3.5" type="plugin" group="finder" method="upgrade">
<name>plg_finder_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="search" method="upgrade">
<extension version="3.5" type="plugin" group="search" method="upgrade">
<name>plg_search_weblinks</name>
<author>Joomla! Project</author>
<creationDate>##DATE##</creationDate>

View File

@ -185,6 +185,6 @@ class AdministratorCategoriesCest
$I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks');
$I->clickToolbarButton('New');
$I->waitForText('Web Links: New Category', '30', ['css' => 'h1']);
$I->verifyAvailableTabs(['Category', 'Publishing', 'Permissions', 'Options']);
$I->verifyAvailableTabs(['Category', 'Options', 'Publishing', 'Permissions']);
}
}

View File

@ -20,8 +20,9 @@ class AdministratorSmartSearchCest
/**
* Before the tests proper, switch the WYSIWYG editor off. This is to make it easier to create test content.
*/
public function administratorDisableEditor(\Step\Acceptance\weblink $I)
public function administratorDisableEditor(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Disable the editor before the tests proper');
@ -59,8 +60,9 @@ class AdministratorSmartSearchCest
/**
* Before the tests proper, the Weblinks Smart Search plugin must be enabled.
*/
public function administratorEnableSmartsearchWeblinksPlugin(\Step\Acceptance\weblink $I)
public function administratorEnableSmartsearchWeblinksPlugin(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Enabling the Smart Search Weblinks plugin');
@ -79,8 +81,9 @@ class AdministratorSmartSearchCest
/**
* Purge the index.
*/
public function administratorPurgeIndex(\Step\Acceptance\weblink $I)
public function administratorPurgeIndex(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Purging the index');
@ -96,8 +99,9 @@ class AdministratorSmartSearchCest
$I->see('All items have been successfully deleted', ['class' => 'alert-message']);
}
public function administratorCreateWeblink(\Step\Acceptance\weblink $I)
public function administratorCreateWeblink(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->doAdministratorLogin();
$I->createWeblink($this->title, $this->url);
@ -106,8 +110,9 @@ class AdministratorSmartSearchCest
/**
* Index the current content.
*/
public function administratorRunTheIndexer(\Step\Acceptance\weblink $I)
public function administratorRunTheIndexer(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Smart Search Indexer');
@ -125,8 +130,9 @@ class AdministratorSmartSearchCest
/**
* After the tests, the Smart Search content plugin must be disabled, ready for the next test.
*/
public function administratorDisableContentPlugin(\Step\Acceptance\weblink $I)
public function administratorDisableContentPlugin(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Disabling the Smart Search content plugin, ready for the next test run');
@ -145,8 +151,9 @@ class AdministratorSmartSearchCest
/**
* After the tests, the Smart Search content plugin must be disabled, ready for the next test.
*/
public function administratorDisableSmartsearchWeblinksPlugin(\Step\Acceptance\weblink $I)
public function administratorDisableSmartsearchWeblinksPlugin(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->am('Administrator');
$I->wantToTest('Disabling the Smart Search content plugin, ready for the next test run');
@ -162,8 +169,9 @@ class AdministratorSmartSearchCest
$I->waitForText('Plugin successfully disabled', 30, ['class' => 'alert-message']);
}
public function cleanUp(\Step\Acceptance\weblink $I)
public function cleanUp(\Step\Acceptance\weblink $I, $scenario)
{
$scenario->skip('Temporarilly skipped, see: https://github.com/joomla-extensions/weblinks/issues/239');
$I->doAdministratorLogin();
$I->administratorDeleteWeblink($this->title);

View File

@ -99,7 +99,9 @@ class AdministratorWeblinksCest
$I->amOnPage('administrator/index.php?option=com_weblinks');
$I->waitForText('Web Links','30',['css' => 'h1']);
$I->expectTo('see weblinks page');
$I->selectOptionInChosen('- Select Status -', 'Trashed');
$I->click('Search Tools');
$I->wait(2);
$I->selectOptionInChosenById('filter_published', 'Trashed');
$I->amGoingTo('Search the just saved weblink');
$I->searchForItem($this->title);
$I->waitForText('Web Links','30',['css' => 'h1']);