diff --git a/.github/get-classic-admin-theme.sh b/.github/get-classic-admin-theme.sh index bca4ce09b..038e6a6cc 100644 --- a/.github/get-classic-admin-theme.sh +++ b/.github/get-classic-admin-theme.sh @@ -6,7 +6,7 @@ REPO="textpattern-classic-admin-theme"; EXTRACT="textpattern/admin-themes/classic"; -TAG="main"; +TAG="4.9.x"; if [ ! -z "$1" ]; then TAG="$1"; fi diff --git a/.github/get-default-theme.sh b/.github/get-default-theme.sh index b885165ae..91ff36046 100644 --- a/.github/get-default-theme.sh +++ b/.github/get-default-theme.sh @@ -6,7 +6,7 @@ REPO="textpattern-default-theme"; EXTRACT="textpattern/setup/themes"; -TAG="main"; +TAG="4.9.x"; if [ ! -z "$1" ]; then TAG="$1"; fi diff --git a/.github/get-hive-admin-theme.sh b/.github/get-hive-admin-theme.sh index a4a7aa0d9..b0739820a 100644 --- a/.github/get-hive-admin-theme.sh +++ b/.github/get-hive-admin-theme.sh @@ -7,7 +7,7 @@ EXTRACT1="textpattern/admin-themes"; EXTRACT2="sites/site1/admin/setup"; -TAG="main"; +TAG="4.9.x"; if [ ! -z "$1" ]; then TAG="$1"; fi diff --git a/.github/get-pophelp.sh b/.github/get-pophelp.sh index 96881edf8..00d6d60c5 100644 --- a/.github/get-pophelp.sh +++ b/.github/get-pophelp.sh @@ -6,7 +6,7 @@ REPO="pophelp"; EXTRACT="textpattern/lang"; -TAG="main"; +TAG="4.9.x"; if [ ! -z "$1" ]; then TAG="$1"; fi diff --git a/.github/get-textpacks.sh b/.github/get-textpacks.sh index 688d9a6c1..19c13ebb1 100644 --- a/.github/get-textpacks.sh +++ b/.github/get-textpacks.sh @@ -6,7 +6,7 @@ REPO="textpacks"; EXTRACT="textpattern/lang"; -TAG="main"; +TAG="4.9.x"; if [ ! -z "$1" ]; then TAG="$1"; fi diff --git a/.gitignore b/.gitignore index b8f29353c..a19789916 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ Icon? ehthumbs.db Thumbs.db /images/* -/images/!.gitignore +/images/!.htaccess /files/* /files/!.htaccess /themes/* diff --git a/HISTORY.txt b/HISTORY.txt index 8b4096132..5667a7002 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,12 +1,22 @@ +Changes in 5.0.0 (upcoming) + +* Vendors: jQuery 4.0.0. +* Vendors: jQuery Migrate 4.0.2. +* Vendors: jQuery UI 1.14.2. + Changes in 4.9.1 (upcoming) * Changed: (Article)Image tags only output dimensions on demand. * Changed: skips empty images/thumbnails. * Changed: Valueless width/height/crop behaviour in (Article)Image tags. * Changed: Thumb path now permits virtual/multiple host setups too. -* Fixed: PHP 5.6 support. Thanks, pinalgirkar. +* Fixed: Fatal error with UNIXTIME() changes in MariaDB 11.8+. * Fixed: Dynamic thumbnail MIME detection (thanks, rezozero/ambroisemaupate). +* Fixed: PHP 5.6 support (thanks, pinalgirkar). * Fixed: Correct admin theme file scaffold for dynamic thumbnails. +* Fixed: Duplicate action only available for existing content. +* Fixed: Assets created without a timestamp use time of creation, not epoch. +* Vendors: jQuery UI 1.14.2. Changes in 4.9.0 (21 Dec 2025) diff --git a/package.json b/package.json index 07af311cf..c6c59d694 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "textpattern", "title": "Textpattern CMS", - "version": "4.9.1-dev", + "version": "5.0.0-dev", "description": "A flexible, elegant, fast and easy-to-use content management system written in PHP.", "author": "Team Textpattern", "homepage": "https://textpattern.com/", @@ -29,8 +29,9 @@ "dependencies": { "blueimp-file-upload": "10.32.0", "dompurify": "3.3.1", - "jquery": "3.7.1", - "jquery-ui": "1.14.1", + "jquery": "4.0.0", + "jquery-migrate": "4.0.2", + "jquery-ui": "1.14.2", "prismjs": "1.30.0" }, "eslintConfig": { @@ -61,6 +62,7 @@ "copy:blueimp-file-upload": "uglifyjs -c -m -o textpattern/vendors/blueimp/fileupload/jquery.fileupload.js node_modules/blueimp-file-upload/js/jquery.fileupload.js", "copy:dompurify": "rimraf textpattern/vendors/cure53/DOMPurify/purify.js && cp node_modules/dompurify/dist/purify.min.js textpattern/vendors/cure53/DOMPurify/purify.js", "copy:jquery": "rimraf textpattern/vendors/jquery/jquery/jquery.js && cp node_modules/jquery/dist/jquery.min.js textpattern/vendors/jquery/jquery/jquery.js", + "copy:jquery-migrate": "rimraf textpattern/vendors/jquery/jquery-migrate/*.* && cp node_modules/jquery-migrate/dist/*.* textpattern/vendors/jquery/jquery-migrate/ && cp node_modules/jquery-migrate/LICENSE.txt textpattern/vendors/jquery/jquery-migrate/", "copy:jquery-ui": "rimraf textpattern/vendors/jquery/jquery-ui/jquery-ui.js && cp node_modules/jquery-ui/dist/jquery-ui.min.js textpattern/vendors/jquery/jquery-ui/jquery-ui.js", "copy:prismjs": "uglifyjs -c -m -o textpattern/vendors/PrismJS/prism/prism.js node_modules/prismjs/prism.js node_modules/prismjs/components/prism-markup-templating.js node_modules/prismjs/components/prism-bash.js node_modules/prismjs/components/prism-json.js node_modules/prismjs/components/prism-markdown.js node_modules/prismjs/components/prism-php.js node_modules/prismjs/components/prism-textile.js", "copy:textile": "sh .github/copy-textile.sh", diff --git a/rpc/TXP_RPCServer.php b/rpc/TXP_RPCServer.php index 9537c81dc..64e3879f9 100644 --- a/rpc/TXP_RPCServer.php +++ b/rpc/TXP_RPCServer.php @@ -533,7 +533,7 @@ function blogger_getPost($params) return new IXR_Error(100, gTxt('bad_login')); } - $rs = $txp->getArticleID($postid, 'ID, Body, AuthorId, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) as uPosted'); + $rs = $txp->getArticleID($postid, 'ID, Body, AuthorId, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) as uPosted'); if (!$rs) { return new IXR_Error(205, gTxt('problem_retrieving_article')); @@ -579,7 +579,7 @@ function blogger_getRecentPosts($params) return new IXR_Error(100, gTxt('bad_login')); } - $articles = $txp->getArticleList('ID, Body, AuthorId, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) as uPosted', "Section='" . doSlash($blogid) . "'", '0', $numberOfPosts, false); + $articles = $txp->getArticleList('ID, Body, AuthorId, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) as uPosted', "Section='" . doSlash($blogid) . "'", '0', $numberOfPosts, false); if (false === $articles) { return new IXR_Error(207, gTxt('problem_getting_articles')); @@ -610,7 +610,7 @@ function metaWeblog_getPost($params) return new IXR_Error(100, gTxt('bad_login')); } - $rs = $txp->getArticleID($postid, 'ID, Title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, url_title, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) as uPosted'); + $rs = $txp->getArticleID($postid, 'ID, Title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, url_title, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) as uPosted'); if (!$rs) { return new IXR_Error(205, gTxt('problem_retrieving_article')); @@ -707,7 +707,7 @@ function metaWeblog_getRecentPosts($params) } $articles = $txp->getArticleList( - 'ID, Title, url_title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, AuthorID, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) as uPosted, Status', + 'ID, Title, url_title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, AuthorID, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) as uPosted, Status', "Section='" . doSlash($blogid) . "'", '0', $numberOfPosts, false ); @@ -739,7 +739,7 @@ function mt_getRecentPostTitles($params) return new IXR_Error(100, gTxt('bad_login')); } - $articles = $txp->getArticleList('ID, Title, AuthorID, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) as uPosted', "Section='" . doSlash($blogid) . "'", '0', $numberOfPosts, false); + $articles = $txp->getArticleList('ID, Title, AuthorID, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) as uPosted', "Section='" . doSlash($blogid) . "'", '0', $numberOfPosts, false); if (false === $articles) { return new IXR_Error(207, gTxt('problem_getting_articles')); diff --git a/textpattern/admin-themes/classic/checksums.txt b/textpattern/admin-themes/classic/checksums.txt index 02a6b4e5e..a646e9c27 100644 --- a/textpattern/admin-themes/classic/checksums.txt +++ b/textpattern/admin-themes/classic/checksums.txt @@ -1 +1 @@ -/admin-themes/classic/classic.php: 57033bb3fe97d5db855bf330392af50f91dbaa86551fce01 \ No newline at end of file +/admin-themes/classic/classic.php: d2b431c640a1f32cd00139925db2922f670790cf0f0a0608 \ No newline at end of file diff --git a/textpattern/admin-themes/hive/checksums.txt b/textpattern/admin-themes/hive/checksums.txt index 1ae26816d..53b87acac 100644 --- a/textpattern/admin-themes/hive/checksums.txt +++ b/textpattern/admin-themes/hive/checksums.txt @@ -1,4 +1,4 @@ -/admin-themes/hive/hive.php: 96fb3301d96c0e340676705976a3cc681958feacf5f02399 +/admin-themes/hive/hive.php: f1439e28434f706aedea7cc225fc7adf79cd377eb0e9735a /admin-themes/hive/assets/js/autosize.js: a443b43bc89d5b153e3b396a7e47be86e31728231a0f2520 /admin-themes/hive/assets/js/main.js: 6d3e72e69025f84d2b6a0abc5dcda677acf341029c3c0548 /admin-themes/hive/assets/js/darkmode.js: 80f48c67e4a78adff48c38700ecf120c43d07d7a6a4900e7 \ No newline at end of file diff --git a/textpattern/admin-themes/hiveneutral/checksums.txt b/textpattern/admin-themes/hiveneutral/checksums.txt index 57332ac08..692a8154f 100644 --- a/textpattern/admin-themes/hiveneutral/checksums.txt +++ b/textpattern/admin-themes/hiveneutral/checksums.txt @@ -1,4 +1,4 @@ -/admin-themes/hiveneutral/hiveneutral.php: 49736f03617375dde9355895823f63e4d09eaacc1cf5b173 +/admin-themes/hiveneutral/hiveneutral.php: 8a82f7bd5ea878dbd6154d26bf944473999383233ced0d6a /admin-themes/hiveneutral/assets/js/autosize.js: a443b43bc89d5b153e3b396a7e47be86e31728231a0f2520 /admin-themes/hiveneutral/assets/js/main.js: 6d3e72e69025f84d2b6a0abc5dcda677acf341029c3c0548 /admin-themes/hiveneutral/assets/js/darkmode.js: 80f48c67e4a78adff48c38700ecf120c43d07d7a6a4900e7 \ No newline at end of file diff --git a/textpattern/checksums.txt b/textpattern/checksums.txt index a39a606c3..1fdaa89d6 100644 --- a/textpattern/checksums.txt +++ b/textpattern/checksums.txt @@ -106,13 +106,13 @@ /vendors/Textpattern/Skin/CommonBase.php: 58892b016c4d7172cf83b26d15e465d8e9affaf0c3b2ae4b /vendors/Textpattern/Skin/AssetInterface.php: 42729ab7c1eba7ef4f784cc1b967a8badf397ca85c2a1066 /vendors/Textpattern/Skin/CssInterface.php: 41dccdbd6d9c3732b6c6f06dfecb2809bbd0b693eed45f67 -/vendors/Textpattern/Skin/Skin.php: f852d13c3d5bcc536047aa7c34385e4c158c58a26f27790a +/vendors/Textpattern/Skin/Skin.php: 7cdeec5a11e3b29e99ac0514005e1546e388d7ddd63bdded /vendors/Textpattern/Skin/CommonInterface.php: 5ed3dfb842cad07a9071e595a888a179435decabd9539a9e /vendors/Textpattern/Skin/Page.php: 0b1175ef0be465ffc1d881e9f90a7a0b4c395649b9f98e10 /vendors/Textpattern/Skin/Form.php: fb9847d54210cec2d719a84872008581687b63118d361c6b /vendors/Textpattern/Skin/Css.php: 2071740b0da8f7be7170943dc358d0550e515f49a72e8623 /vendors/Textpattern/Skin/SkinInterface.php: 46831dd41ebddc8859b8c1ade3d6587471e76c88bd751f2e -/vendors/Textpattern/L10n/Lang.php: 7ce77e592b3acaa7fc27465c08f45189ec2af98da1829333 +/vendors/Textpattern/L10n/Lang.php: 148e4172e5ddbed35013ccee1ba028d0733a4ed81a4ae454 /vendors/Textpattern/L10n/Locale.php: 3a1f57eab1173ff5c991bda0ffd76a2fec4b5208c8ce83b9 /vendors/Textpattern/Password/Hash.php: cf5568a4c42ba3dd74ce816f1e58c0e3cc9006cbc8a522a4 /vendors/Textpattern/Password/Adapter/PasswordHash.php: 0e30ff987d048fbc5a530e2023c56e6855b80fa63c53239e @@ -148,17 +148,21 @@ /vendors/Textpattern/Module/Help/HelpAdmin.php: 7c7c70e9eb2cb15022b9eebbe099487191ee53bbc5a591bf /vendors/Textpattern/Date/Timezone.php: b8c44c2dfaffab16715200f861afb2567ecc291f7fc62d31 /vendors/Textpattern/Textfilter/Registry.php: 3ec65a8be5432ad3dd521cee445d250ad0f121ca408423ef -/vendors/Textpattern/Textfilter/Plain.php: f4484253854547bc96a5064380e66f8a3bbd3960b9c16b07 +/vendors/Textpattern/Textfilter/Plain.php: 6b119bb35b848081016dea8f8d9efd18c28b40ba346ced47 /vendors/Textpattern/Textfilter/Constraint.php: 15b779cd445661449415d7fb995d1e475b9feacde4ef2670 /vendors/Textpattern/Textfilter/Base.php: e9045ea12803103b5486a293c934dc88c29578be4e18dfd2 -/vendors/Textpattern/Textfilter/Nl2Br.php: a31cfdd94ba7bad12cc0e1aa147d9ac72ead26c14edd1d76 +/vendors/Textpattern/Textfilter/Nl2Br.php: 5817785c3f2411d532c17b00865bbd6684603f2130cd8d86 /vendors/Textpattern/Textfilter/Textile.php: 434e374d740a371f4bca0ea96fc4cfd78eb258da85538ca1 /vendors/Textpattern/Textfilter/TextfilterInterface.php: e6aa36fa4f1e238a3a63c49f223bb3327765718fde2fb64a -/vendors/Textpattern/Plugin/Plugin.php: 2696918bcc7bac669db6b08cd4f4154e2986053cdef0024b +/vendors/Textpattern/Plugin/Plugin.php: 4a9831c651274397002752360ab124dc13aeb1ad5fa9bcd1 /vendors/Textpattern/Admin/Paginator.php: 6a586fb44f9a8dd46f41a279227c424e22ff89a5042885b8 -/vendors/Textpattern/Admin/Theme.php: 93f51cc4c9f555dd0005f7442ef083a4a7bb9cebda2b68ed +/vendors/Textpattern/Admin/Theme.php: ec8a3cecb5be8e24980b675aea046d14302b05d750e50984 /vendors/Textpattern/Admin/Tools.php: fe9f63e9ee6a3c3f8290126dc7ac6a2a3aa25b5c14656d3c /vendors/Textpattern/Admin/Table.php: 6519449c9cf1c83cadbc7c195b40704e8fac6028e12963be +/vendors/Textpattern/Meta/Field.php: a8ff83805e01c833a9ea10e2dcca8b7d157c8871ea86d58d +/vendors/Textpattern/Meta/ContentType.php: 5051036baa76639d78d320a170322e8ab277584d97758deb +/vendors/Textpattern/Meta/FieldSet.php: bc4c0426f348e733fed454f6c5d28dce248513e1bf34f7cb +/vendors/Textpattern/Meta/DataType.php: ccb7dbe821d206b6710b987a9210b5414d380c6222033dc3 /vendors/Textpattern/Server/Files.php: 5691ca3546abd2508373997a6958bc3ea365438f3b9f3930 /vendors/Textpattern/Server/Config.php: bcb130c022395642b6bf106eefb8fbbd9c69a21750460afe /vendors/Textpattern/Search/Method.php: c85aeaed494563924272f6b5bb01e26053f52ef5f3d58c98 @@ -179,24 +183,24 @@ /vendors/Textpattern/Type/TypeInterface.php: 846159bc1a54070b6189a21d586b398d5d72dbc6aee87dee /vendors/Textpattern/Type/StringType.php: d539fb0343c046aa13efdd5c58555571d0a67106a5e90a8b /vendors/Textpattern/Http/Request.php: 65d0efaca63598fa2780006d3d03eb6617bacb10267cc930 -/vendors/Textpattern/DB/Core.php: 608a321c5e3545a2650e01acf8a1143554566bc01d6d0485 +/vendors/Textpattern/DB/Core.php: 2c8deb4249ccecc842115f087095b1db798d529b4d6c315a /vendors/Textpattern/Textpack/Parser.php: 3fe2d12cb42081eefa143c2560a706aa42a43b1b80bfab2e /vendors/Textpattern/Textpack/StringInterface.php: 3ed4339ac24ea5aaa7e01827c5bc6fc08451ddc19bd04892 /vendors/Textpattern/Textpack/String/Iterator.php: 76e2d21dd8292848ae2bb1dcff2cc43480fa4312e228b558 /vendors/Textpattern/Filter/FilterCallable.php: dc00b706e51f3d1a51b4331f350ea0ecdda798c1429cfea4 /vendors/Textpattern/Filter/StringFilter.php: 7fa8fe74e5f7c97e26c14989ec1c068e02d467c6305f10a9 /vendors/Textpattern/Filter/Exception.php: 569c38f56ec40cfdb2332969a7ff1884821814894f8e04cd -/vendors/Textpattern/Import/TxpXML.php: dc2f2cda98c365596bba2eb56fc99784c6a68361ff275183 +/vendors/Textpattern/Import/TxpXML.php: 561ae4fc260c7c4530c6314a7a72c988e9542ad1fef0f321 /vendors/Textpattern/Tag/Registry.php: c436845bd9d064a6e672ce5db36beacc45f3ca2763d97b30 -/vendors/Textpattern/Tag/Syntax/Link.php: 006ef0978d2d8fbc3cab9466cae56a39d641851ecefb5cbe +/vendors/Textpattern/Tag/Syntax/Link.php: def425c5ef47ead810553ded56d85179b440a7663711c494 /vendors/Textpattern/Tag/Syntax/Pagination.php: a78af75e87222d1561bf71f435a3295a21d57c7dcce96ad7 /vendors/Textpattern/Tag/Syntax/File.php: 092255edbd0d478b677744a9d943474575420971a71cdb39 /vendors/Textpattern/Tag/Syntax/Partial.php: 511a6ede0b08ed82956847e0ccae867dbce90f08854a0922 /vendors/Textpattern/Tag/Syntax/Search.php: 6e78a8edbbf512d7adb0574880df8ea86449ed4ed2cf8cb2 /vendors/Textpattern/Tag/Syntax/Privacy.php: 01320a0f9f74c993fffc1c3ddd77b94f5462793ffca187aa /vendors/Textpattern/Tag/Syntax/Authors.php: bde24d053f291924dc02f631ae8e853136eb58a7bc961878 -/vendors/Textpattern/Tag/Syntax/Comment.php: 5816abb0fbec57c3115332bdaafb0b99fa505077cc04ba6b -/vendors/Textpattern/Tag/Syntax/Image.php: a7bd98d74d9f942342cee3b222e8e88edb118c07f48c4f35 +/vendors/Textpattern/Tag/Syntax/Comment.php: c47c2b19df3449badaa4d04613ce93c0330ca1881eec03f2 +/vendors/Textpattern/Tag/Syntax/Image.php: 5c53928cc844883ba8adf633322880ceca0178ba757e49e1 /vendors/Txp.php: 48b9fbc44647e9d11a2ad39dca90ca7812b5a188bff78098 /vendors/composer/autoload_namespaces.php: f462232d64dc8dc3a8aaf4e199bb7c93441bd031e1f1ace8 /vendors/composer/ClassLoader.php: c768e7a2094b365687414aa6d3be7abf552f1ae0b2032848 @@ -214,28 +218,29 @@ /vendors/Netcarver/Textile/DataBag.php: dac3873b32d536fae065d27d85fe4982f953ab2495ae23ba /vendors/Netcarver/Textile/Tag.php: 8e83699fc4c1e99ff17a2ebc2ef7c32ed002eea4a1f7c3f9 /vendors/blueimp/fileupload/jquery.fileupload.js: b59cbb40e462c3e14cb8f6b3427e2aafee07090c08f00b1d -/vendors/lencioni/SLIR/SLIR.php: 6fb86d81a05ef3115fb11390c0e4950365bb56a2021c525b +/vendors/lencioni/SLIR/SLIR.php: 7cfe4ad54a6ac794e0acb4b155caa037deefdfbcdd6136e0 /vendors/lencioni/SLIR/icc/JPEG_ICC.php: 3cb67de5afd3a716278930bf5745a45fc2aa55780822ceb7 -/vendors/lencioni/SLIR/libs/SLIRImage.php: 474c2d0817f8a7ac09071a2beaaae61670add6ca8c1fa706 -/vendors/lencioni/SLIR/libs/gd/SLIRGDImage.php: 9910fb83419558cdc5363dbc0fc97efaf4acca9c7236fa60 -/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperTopcentered.php: 63a043edfeff79b2251b1ca227f06d0832dcbe2f607d7356 -/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperCentered.php: 6b2201da2cb84ac8cefd70c87cc2c39bd6cc0966682480e4 -/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropper.php: c0bbaef878cbb9037bca6e089823ea25915201e0db7bd8ba -/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperSmart.php: 8a93530319963c96fe90c14d77fb59475031b13698c5cdd6 -/vendors/lencioni/SLIR/libs/SLIRImageLibrary.php: d02f102b5635602fed51a444ccd659dd0b843bb1bcfa9486 -/vendors/lencioni/SLIR/libs/SLIRCoordinates.php: 76e148513169266c4eac1c98dca201e448bc0b4555dbfe37 -/vendors/lencioni/SLIR/SLIRConfig.php: 27a4b11e2f87f496dd4bcaaa73f99ca7cc1924a6c1f82413 -/vendors/lencioni/SLIR/SLIRConfigDefaults.php: 509e18b0ff0aec7ee63dc037bb3621167e3f6a95e9334664 -/vendors/lencioni/SLIR/SLIRRequest.php: e69a5a80e0903c30ace8c48b76af185ab1fb013f59ad60c7 -/vendors/lencioni/SLIR/SLIRExceptionHandler.php: 427e04986c160272f8460997125d8e0767d522a87ec55a6f -/vendors/lencioni/SLIR/SLIRGarbageCollector.php: cf05f5a58461690cc32b5e128a5a5ed2f1652a635333f535 +/vendors/lencioni/SLIR/libs/SLIRImage.php: 10ca2b75d1c70ee5cca4357c4e60d3f3ce5b1e099219133a +/vendors/lencioni/SLIR/libs/gd/SLIRGDImage.php: 6d9dc52cf490f15e24c0675a73cfe7982333954bef8a0d68 +/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperTopcentered.php: 8a8a6b485ee174dcefb0e933c6bbee7cb8e0af42def212c2 +/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperCentered.php: 20b7335399b3b1d7c6d0ee0b7629cb7dbf0a14770d1f0122 +/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropper.php: f56ddd58f43f3457ccf89c49b951d3e497daeab7bb67630f +/vendors/lencioni/SLIR/libs/gd/croppers/SLIRCropperSmart.php: 1feb4fefa1059932ed89816bc43389fb672dc7517221412b +/vendors/lencioni/SLIR/libs/SLIRImageLibrary.php: 7fa2b21b8e4713431984e23bc0cc85281aa48d017bd554f6 +/vendors/lencioni/SLIR/libs/SLIRCoordinates.php: 2139a1e7dfea2d7ae24d2ff540843c61afeb634ab8c094a9 +/vendors/lencioni/SLIR/SLIRConfig.php: 8221c43e2b8f25efe40bd2b2f88b8ac3aa77bb7e95a6aa0e +/vendors/lencioni/SLIR/SLIRConfigDefaults.php: 80363bf9ed514ca8d9edebefafef1e44d2d341a1a66bb4f5 +/vendors/lencioni/SLIR/SLIRRequest.php: 1078b28eef0aa473b360a6590268f017d9a359b7aa1950db +/vendors/lencioni/SLIR/SLIRExceptionHandler.php: f04bcf3507ed6fe2f52263c62cc0559bc3fda412f313ab13 +/vendors/lencioni/SLIR/SLIRGarbageCollector.php: b50bd185cedf971975f26c72040c1ee8ebc4cbd10d9ff8ca /index.php: 72a2c4409b6adf7ef88621cbd01badac7d2b265569de5ff6 /update/_to_4.7.0.php: 4d0601fbb30daf30390ca4e290d5c0e865f97a04d7398ccb -/update/_update.php: 71ec5d8e7ce872f2565b42cd2038b0f228a275da59961f4a +/update/_update.php: 28743eb2554948d36fb10243a47dad94b5e33a7b8ddb1ee6 /update/_to_4.7.2.php: 7e9f994864910268cb87da6952bf9eb5f71a705f4acd16e0 /update/_to_4.5.0.php: b5cb5cf142c455ed9b64619162c4d45b90b0845f05836851 /update/_to_4.5.7.php: 4bda9e5cd5453f19e41cf9eafb4b99a08cf6a9a7b581a590 /update/_to_4.3.0.php: 7c03f552c99fea6b0e93691d8cbe60666500dbc5049ab98f +/update/_to_5.0.0.php: 5d69afa99d72f6bae9f7cae49ef218ba4c3293076f8f1f32 /update/_to_4.0.5.php: 9fba9cbeeae6bb29a41cbf826367dcccf97f53cda26390e0 /update/_to_4.0.4.php: e031c19b8ecc02dbcf0c858c05143ee42ecb90230e949ea2 /update/_to_4.0.6.php: 4e4f1c4d6422479c0de87722fd49d2af5093ae6c549e986a @@ -244,57 +249,57 @@ /update/_to_4.0.3.php: 049d1b663767c92677780147d9a720ac322988e38174136e /update/_to_4.2.0.php: 305999d22304a012d76aa7a4477cb8e85a72244e99456620 /update/_to_4.8.4.php: 72ddb46a91bdcc31d5463ed3275efff8b0d7727086f85596 -/update/_to_4.8.0.php: e48113857368a0bf2196692331cac3b0c398cfd665cfd2b6 +/update/_to_4.8.0.php: fbc447ccfbc164437df373f046195101db6a482f332eefe4 /update/_to_4.0.8.php: cc05f0c6b6c33db34d33ee0cc635fafa23d91b36d31551ec /update/_to_4.9.0.php: 64b78c3a28c51769f042fcd9fc70a201f4637497db16ab4a /include/txp_lang.php: 9d67ac4447727ad269ef1eac367bb0debd254a98237e3191 -/include/txp_link.php: ee6ff28f58ba9e53208a1fb909960a490e23596ffb73e437 +/include/txp_link.php: 2518270fad10a4bbe0c45a29074baa6306374e65ee4e1280 /include/txp_log.php: d90bfd9f2f38ceb5443b2f58b590623460249781e49bd10e -/include/txp_auth.php: ff6d0afde257ccf806c762294cb33cac11182e742ff4d76b +/include/txp_auth.php: eb47d27548306c77cf7650e6b0d40c43e031cf9fd74131f8 /include/txp_css.php: a434b91a9ed31fc772576f91d4eae9faae7a9f99e9dff683 -/include/txp_admin.php: bb75f29e39c3c8c4fa12aa53e44f830e05c8c47b734f23c5 +/include/txp_admin.php: 299dd90ecfad434a505b0c3470e82dfeb5c78e4b0fab3db1 /include/txp_prefs.php: 1a76c8be5f841ce3536d4f5fd0271876f8b080dbb1f6c458 -/include/txp_lore.php: 66a3891f1719fbed3b55f421a2f9d2c59a47d337136d6b05 -/include/txp_file.php: b273b3cf554ae7e6bfec7ec74c48374cd144c93e76ea816a -/include/txp_diag.php: 2d06e2b26c5f94b4662fa0239fd90b68bc46bb21f93ed5ae +/include/txp_lore.php: bb245d6570e43a76cb40c256d0f42b4b225517c77dd75b2c +/include/txp_file.php: 17d13a233eaafa2103aaac5d048ee67e4489fa7346ed8880 +/include/txp_diag.php: 2b2432e20e0d53b32df26459d733699163c6109b5eb4d4e5 /include/txp_section.php: f00f68b92f2ad8838a77afee224679f967db17dce5bad47b -/include/txp_image.php: 85875d24f4d8e0125ca4fb98b7c10f180a227ae9e41370f7 -/include/txp_list.php: 05afce9c5346db7224f7f790e180fcbb5ffbcf6351e02d7b -/include/txp_category.php: 0d824fcf353765138c4d39fd01b8c359b9976c755299ffde +/include/txp_image.php: 545cfd2d4e646634686c38a3a7ee2117b30b64b6f2f6b973 +/include/txp_list.php: a10da9b536bf9b3d9d3773b35ceab3fd527bcd014c8a8f1b +/include/txp_category.php: 76e719ce0e1f12dee06ba7a17d232f095ae9039873abeba0 /include/txp_skin.php: ad59c805e04e81deaf8346166a900cef39df1df405b02265 /include/txp_tag.php: e3cc394e6095594d6892ec7bef52dbdce6725e7872fa0489 /include/txp_form.php: fe65330d56ffdbfee479c9fe2fc4aa490a1a33c11907ee31 -/include/txp_article.php: 44f5fac05546933009f78b8be9a23199e38200fe2bc30f9f +/include/txp_article.php: fb198445debd50b8b30bbccd467a8e28314c002a94fdadcc /include/txp_page.php: 6b87645524583cd3df4cb191c330392a19985c752c64a832 /include/txp_plugin.php: 7dcab54f25c2940424a01db4a924f3e185d5d2fef40899d2 -/include/txp_discuss.php: 45f3cd3d1854dea844a590274a051bfef9cebae6736efdbf +/include/txp_discuss.php: f68fe1ccda01f07de34f1437c7dbc4edcc5da2e85768d787 /textpattern.js: 139519db3ec1b4b8b01087c2725bb89c08341e04725e40a2 -/publish/rss.php: 82b420c045feb9bead0cfd70adcb4f721fceda8c3d71115e -/publish/taghandlers.php: 164ec821db3222c0a8e9304ef463342342d6e0674bc1eea8 +/publish/rss.php: 43cd60410feca52da1243d5decdce26aa9fdc5e23a42002f +/publish/taghandlers.php: 2a1c13ddfe2d682a6617738b239044f015aae3e9554f6240 /publish/search.php: 5fbd4a8249021a47f6f9e869ab4b35a7de412484247e3ad2 -/publish/atom.php: 918bd2e5375fa38ad5ed1632a07aa0d457acbb8831d32b10 -/publish/comment.php: e6d6425e1ae0e4a66862582d373125c17d27f9e1d052dcec +/publish/atom.php: fcf993ed15e369f456775580f2ce2c38e94c1ce557a06775 +/publish/comment.php: e8deefd21b5139e5cb650ab64141d7a25e83cf694e54d023 /publish/log.php: 640f7ae692292345e9f7cdbdb3676a42198858842f07507a -/lib/txplib_publish.php: cfcbcef3118e78e7e4ad3bb5f8e0714e27c368fd78db5537 -/lib/txplib_wrapper.php: c7dd5fdd9fe893ccc44d073d7a749e8f6ea4074740a39e04 -/lib/IXRClass.php: 09badaa2e74f5930fad755c2f7d82ec092184ef53e1ce5c9 +/lib/txplib_publish.php: 7a26375b24bb1f082c9cea2d7c7ec163ac341b2e327ce438 +/lib/txplib_wrapper.php: 505050760f7359c25c959198e5975664f54e9c6162724665 +/lib/IXRClass.php: bfabdcdc84a5778d021b4462ae3a3c2f26dbb4717b6da730 /lib/txplib_validator.php: 3ff0939074ee855c293b53b71a8c1b78847912317f44586a -/lib/txplib_db.php: ad5fb11a6cf1d361720a68a8fd43c44238f8cf953bd41c70 +/lib/txplib_db.php: 5337d33cad88a3b877a0b1bdcd0e6317346d73a1c2cd909c /lib/PasswordHash.php: e27ad1c7be80975898b6c510cfb5f097c2e145cd7f89b724 /lib/txplib_update.php: 510aa6c06d280063da7c2d006e905723e7f911d9766390f7 /lib/taglib.php: bf75edec753700fdeaabf3a80960d9945fd0e79e80442e21 -/lib/constants.php: 5d9cca352d9d74bcbd523a839a64c29b1b82ebc5767f879b +/lib/constants.php: a11a8dcc2c19f0b3be19cfcb9ee331cc7b2fd074e0b9b299 /lib/txplib_forms.php: 85fc82ace04c8a01e7553372fd9fa738b0e41e8192f319a9 /lib/txplib_head.php: 0947c2b536b47b9637d260fb5759a4a855f0a27c9618f726 -/lib/txplib_html.php: 680c2db7d909a946a9de375082ab0f6dfb164940fe7f085f -/lib/txplib_admin.php: 4320716f3dd60a42cdc1350b499945c0d44705bf4d640957 -/lib/class.thumb.php: 84840d3d633a86fcd6486729a8b2b41de4948da8591aff00 -/lib/txplib_misc.php: aab0533b745d04e749ad6495ebb84020951adbe718a70197 -/lib/class.trace.php: 184e555bf4c6dac7d59d6a31b70496adac4bd11a2b73000f +/lib/txplib_html.php: 7749584f07db9a64432071c40dd312b2687310f2b12e7659 +/lib/txplib_admin.php: 8f3e3ea9dcaebd808fab0c8ad42fedaf2a9a7234e0194d54 +/lib/class.thumb.php: 1c8c4a1c7fc5bccbd0ff2798e53cc16f55b5429f474274f4 +/lib/txplib_misc.php: 127a0157ddf166ed9c5f0def5472dd6f8d4843eff06a35cc +/lib/class.trace.php: 7abf0d49c3bd42bf7b4ea6df5e51619fd7e0d51492336d79 /lib/admin_config.php: d5065a17556ef06b39a562124d6af9e374c7cc9063f6d3bd /tmp/index.php: 773450db22ed43cfcea2ef0d29c8f75a0109197d0d83e17f -/publish.php: be218f02d92bedfc558e276e841dd1acc527d64ae166d334 +/publish.php: fe01e99ad0a45877500158a94a434969f087f3fad8e45a07 /../css.php: 9ffe76164aec83d428dc75531630a52a2abebfef7c63fdea /../index.php: 725e7f7377447bef8594c6901c85ad912506f7e22e37aed4 -/../rpc/TXP_RPCServer.php: df487a0339e5a1d619b52b0ee28f819821e8c3e23afb7da6 -/../rpc/index.php: 9c5c0f4d5b917c759c6f860fae37989eca3967b0d76e1d84 \ No newline at end of file +/../rpc/TXP_RPCServer.php: 43a10e4a9236d15a94b622700c833dc0a556ab781279b8f9 +/../rpc/index.php: 9c5c0f4d5b917c759c6f860fae37989eca3967b0d76e1d84 diff --git a/textpattern/include/txp_admin.php b/textpattern/include/txp_admin.php index 4d212e386..1ce8d4024 100644 --- a/textpattern/include/txp_admin.php +++ b/textpattern/include/txp_admin.php @@ -324,7 +324,7 @@ function author_list($message = '') 'label' => 'privileges', ), 'last_login' => array( - 'column' => 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), last_access)', + 'column' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), last_access)', 'class' => 'date', ), 'article_count' => array( diff --git a/textpattern/include/txp_article.php b/textpattern/include/txp_article.php index 69eab7d44..a71dc3669 100644 --- a/textpattern/include/txp_article.php +++ b/textpattern/include/txp_article.php @@ -142,9 +142,9 @@ function article_save($write = true) if ($incoming['ID']) { $oldArticle = safe_row( "Status, AuthorID, url_title, Title, textile_body, textile_excerpt, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS sLastMod, LastModID, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS sPosted, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS sExpires", + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS sLastMod, LastModID, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS sPosted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS sExpires", 'textpattern', "ID = " . (int) $incoming['ID'] ); @@ -214,7 +214,7 @@ function article_save($write = true) $uPosted = $ts - tz_offset($ts); } - $whenposted = "FROM_UNIXTIME(0) + INTERVAL $uPosted SECOND"; + $whenposted = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $uPosted SECOND"; } // Set and validate expiry timestamp. @@ -260,7 +260,7 @@ function article_save($write = true) } if ($uExpires) { - $whenexpires = "FROM_UNIXTIME(0) + INTERVAL $uExpires SECOND"; + $whenexpires = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $uExpires SECOND"; } else { $whenexpires = "NULL"; } @@ -688,9 +688,9 @@ function article_edit($message = '', $concurrent = false, $refresh_partials = fa $ID = assert_int($ID); $rs = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS sPosted, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS sExpires, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS sLastMod", + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS sPosted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS sExpires, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS sLastMod", 'textpattern', "ID = $ID" ); @@ -710,7 +710,7 @@ function article_edit($message = '', $concurrent = false, $refresh_partials = fa $store_out = array('ID' => $ID) + psa($vars); if ($concurrent) { - $store_out['sLastMod'] = safe_field("TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS sLastMod", 'textpattern', "ID = $ID"); + $store_out['sLastMod'] = safe_field("TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS sLastMod", 'textpattern', "ID = $ID"); } if (!has_privs('article.set_markup') && !empty($ID)) { @@ -871,7 +871,7 @@ function article_edit($message = '', $concurrent = false, $refresh_partials = fa echo article_preview(); echo n . '';// End of .txp-dialog. - if (has_privs('article.preview')) { + if (can_preview($rs)) { echo ''; } @@ -1188,7 +1188,7 @@ function checkIfNeighbour($whichway, $sPosted, $ID = 0) return safe_field( "ID", 'textpattern', - "(Posted $dir (FROM_UNIXTIME(0) + INTERVAL $sPosted SECOND) OR Posted = (FROM_UNIXTIME(0) + INTERVAL $sPosted SECOND) AND ID $dir $ID) $crit ORDER BY Posted $ord, ID $ord LIMIT 1" + "(Posted $dir (COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $sPosted SECOND) OR Posted = (COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $sPosted SECOND) AND ID $dir $ID) $crit ORDER BY Posted $ord, ID $ord LIMIT 1" ); } @@ -1782,10 +1782,10 @@ function article_partial_article_clone($rs) { extract($rs); - return n . tag('' . sp . gTxt('duplicate'), 'button', array( + return ($ID) ? n . tag('' . sp . gTxt('duplicate'), 'button', array( 'class' => 'txp-clone txp-reduced-ui-button', 'id' => 'article_partial_article_clone', - )); + )) : ''; } /** @@ -1801,7 +1801,7 @@ function article_partial_article_view($rs) $ID = intval($rs['ID']); $live = in_array($rs['Status'], array(STATUS_LIVE, STATUS_STICKY)); - $clean = has_privs('article.preview') ? tag('' . sp . gTxt('preview'), 'button', array( + $clean = can_preview($rs) ? tag('' . sp . gTxt('preview'), 'button', array( 'class' => 'txp-reduced-ui-button', 'id' => 'article_partial_article_preview', 'type' => 'button', @@ -1811,7 +1811,7 @@ function article_partial_article_view($rs) if ($live) { $url = permlinkurl_id($rs['ID']); - } elseif ($clean) { + } elseif (has_privs('article.preview')) { $url = $ID ? hu . '?id=' . $ID . '.' . urlencode(Txp::get('\Textpattern\Security\Token')->csrf($txp_user)) : false; // Article ID plus token. } else { return; @@ -1856,7 +1856,7 @@ function article_partial_excerpt($rs) function article_textarea($rs, $field = 'body', $size = array(INPUT_LARGE, TEXTAREA_HEIGHT_REGULAR)) { - $textarea_options = can_modify($rs) ? n . tag(gTxt('view_preview_short'), 'button', array( + $textarea_options = can_preview($rs) ? n . tag(gTxt('view_preview_short'), 'button', array( 'class' => 'txp-textarea-preview txp-reduced-ui-button', 'data-preview-link' => $field, 'type' => 'button', @@ -1953,7 +1953,7 @@ function article_partial_view_modes($rs) global $view; $out = n . '
' . - (has_privs('article.preview') ? tag(checkbox2('_txp_parse', false, 0, 'parse-preview', 'article_form') . sp . gTxt('tags'), 'label') : '') . + (can_preview($rs) ? tag(checkbox2('_txp_parse', false, 0, 'parse-preview', 'article_form') . sp . gTxt('tags'), 'label') : '') . tag(checkbox2('', true, 0, 'clean-preview') . sp . gTxt('clean_preview'), 'label') . tag(checkbox2('', false, 0, 'live-preview') . sp . gTxt('live_preview'), 'label') . n . '
' . diff --git a/textpattern/include/txp_category.php b/textpattern/include/txp_category.php index 8b8a8dc13..66b10c21c 100644 --- a/textpattern/include/txp_category.php +++ b/textpattern/include/txp_category.php @@ -574,7 +574,7 @@ function cat_event_category_edit($evname, $message = '') ) . inputLabel( 'category_description', - '', + '', $evname . '_category_description', 'category_description', array('class' => 'txp-form-field txp-form-field-textarea edit-category-description') ) . pluggable_ui('category_ui', 'extend_detail_form', '', $row) . diff --git a/textpattern/include/txp_css.php b/textpattern/include/txp_css.php index 72d8a4342..134a24f7d 100644 --- a/textpattern/include/txp_css.php +++ b/textpattern/include/txp_css.php @@ -194,7 +194,7 @@ function css_edit($message = '', $refresh_partials = false) if ($name) { $actionsExtras .= sLink('css', 'pour', '' . sp . gTxt('create_css'), 'txp-new') - . tag('' . sp . gTxt('duplicate'), 'button', array( + . tag('' . sp . gTxt('duplicate'), 'button', array( 'class' => 'txp-clone txp-reduced-ui-button', 'data-form' => 'style_form', )); diff --git a/textpattern/include/txp_diag.php b/textpattern/include/txp_diag.php index 522459d21..6b3c2af4b 100644 --- a/textpattern/include/txp_diag.php +++ b/textpattern/include/txp_diag.php @@ -501,7 +501,7 @@ function doDiagnostics() } // Database server time. - extract(doSpecial(getRow("SELECT @@global.time_zone AS db_global_timezone, @@session.time_zone AS db_session_timezone, NOW() AS db_server_time, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), NOW()) AS db_server_timestamp"))); + extract(doSpecial(getRow("SELECT @@global.time_zone AS db_global_timezone, @@session.time_zone AS db_session_timezone, NOW() AS db_server_time, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), NOW()) AS db_server_timestamp"))); $db_server_timeoffset = $db_server_timestamp - $now; echo pagetop(gTxt('tab_diagnostics'), ''); diff --git a/textpattern/include/txp_discuss.php b/textpattern/include/txp_discuss.php index 23e74c350..ba3654cbb 100644 --- a/textpattern/include/txp_discuss.php +++ b/textpattern/include/txp_discuss.php @@ -290,7 +290,7 @@ function discuss_list($message = '') txp_discuss.web, txp_discuss.message, txp_discuss.visible, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), txp_discuss.posted) AS posted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), txp_discuss.posted) AS posted, textpattern.ID AS thisid, textpattern.Section AS section, textpattern.url_title, @@ -298,7 +298,7 @@ function discuss_list($message = '') textpattern.Category1 AS category1, textpattern.Category2 AS category2, textpattern.Status, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), textpattern.Posted) AS uPosted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), textpattern.Posted) AS uPosted, (SELECT COUNT(*) FROM " . safe_pfx('txp_discuss') . " AS count WHERE $spamcrit AND txp_discuss.parentid = count.parentid) AS c FROM " . safe_pfx_j('txp_discuss') . " LEFT JOIN " . safe_pfx_j('textpattern') . " ON txp_discuss.parentid = textpattern.ID @@ -492,7 +492,7 @@ function discuss_edit() $discussid = assert_int($discussid); - $rs = safe_row("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), posted) AS uPosted", 'txp_discuss', "discussid = '$discussid'"); + $rs = safe_row("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), posted) AS uPosted", 'txp_discuss', "discussid = '$discussid'"); if ($rs) { extract($rs); diff --git a/textpattern/include/txp_file.php b/textpattern/include/txp_file.php index 8572944ec..c718f96ec 100644 --- a/textpattern/include/txp_file.php +++ b/textpattern/include/txp_file.php @@ -278,8 +278,8 @@ function file_list($message = '', $ids = array()) txp_file.title, txp_file.category, txp_file.description, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), txp_file.created) AS uDate, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), txp_file.modified) AS mDate, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), txp_file.created) AS uDate, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), txp_file.modified) AS mDate, txp_file.downloads, txp_file.status, txp_file.author, @@ -676,7 +676,7 @@ function file_edit($message = '', $id = '') } $id = assert_int($id); - $rs = safe_row("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), created) AS created, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), modified) AS modified", 'txp_file', "id = '$id'"); + $rs = safe_row("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), created) AS created, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), modified) AS modified", 'txp_file', "id = '$id'"); if ($rs) { extract($rs); @@ -1242,7 +1242,7 @@ function file_save() $created = "NOW()"; } else { $created_ts = safe_strtotime($year . '-' . $month . '-' . $day . ' ' . $hour . ':' . $minute . ':' . $second); - $created = $created_ts === false ? false : "FROM_UNIXTIME(0) + INTERVAL $created_ts SECOND"; + $created = $created_ts === false ? false : "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $created_ts SECOND"; } $size = file_exists($new_path) ? filesize($new_path) : $rs['size']; diff --git a/textpattern/include/txp_form.php b/textpattern/include/txp_form.php index 1013c99f0..0ecce9b6d 100644 --- a/textpattern/include/txp_form.php +++ b/textpattern/include/txp_form.php @@ -334,7 +334,7 @@ function form_edit($message = '', $refresh_partials = false) if ($name) { $actionsExtras .= sLink('form', 'form_create', '' . sp . gTxt('create_form'), 'txp-new') - . tag('' . sp . gTxt('duplicate'), 'button', array( + . tag('' . sp . gTxt('duplicate'), 'button', array( 'class' => 'txp-clone txp-reduced-ui-button', 'data-form' => 'form_form', )); diff --git a/textpattern/include/txp_image.php b/textpattern/include/txp_image.php index 583988584..3c919e99e 100644 --- a/textpattern/include/txp_image.php +++ b/textpattern/include/txp_image.php @@ -99,7 +99,7 @@ function image_list($message = '') 'class' => 'name', ), 'uDate' => array( - 'column' => 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), txp_image.date)', + 'column' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), txp_image.date)', 'label' => 'date', 'class' => 'date', ), @@ -437,13 +437,13 @@ function image_list($message = '') $thumb_w = $thumbnail == THUMB_AUTO ? $payload['w'] : $thumb_w; $thumb_h = $thumbnail == THUMB_AUTO ? $payload['h'] : $thumb_h; - if ($ext != '.swf') { + if ($ext != '.swf' && $thumbnail) { $altinfo = !empty($alt) ? txpspecialchars($alt) : $id . $ext; - $thumbnail = '' . $altinfo . ''; + $thumbout = '' . $altinfo . ''; $thumbexists = 1; } else { - $thumbnail = ''; - $thumbexists = ''; + $thumbout = gTxt('no'); + $thumbexists = 0; } if ($ext != '.swf') { @@ -501,8 +501,8 @@ function image_list($message = '') ) . td( pluggable_ui('image_ui', 'thumbnail', ($can_edit - ? href($thumbnail, $edit_url, array('title' => gTxt('edit'))) - : $thumbnail), $a), '', 'txp-list-col-thumbnail' . ($thumbexists ? ' has-thumbnail' : '') + ? href($thumbout, $edit_url, array('title' => gTxt('edit'))) + : $thumbout), $a), '', 'txp-list-col-thumbnail txp-contain' . ($thumbexists ? ' has-thumbnail' : '') ) . (has_privs('tag') ? td($tagbuilder, '', 'txp-list-col-tag-build') @@ -691,7 +691,7 @@ function image_edit($message = '', $id = '') } $id = assert_int($id); - $rs = safe_row("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), date) AS uDate", 'txp_image', "id = '$id'"); + $rs = safe_row("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), date) AS uDate", 'txp_image', "id = '$id'"); if ($rs) { extract($rs); @@ -736,9 +736,9 @@ function image_edit($message = '', $id = '') if ($thumbnail && $canThumb) { $thumb_info = $id . ($thumbnail == THUMB_CUSTOM ? 't' : '') . $ext; - $thumb = '' . $thumb_info . ''; + $thumbout = '' . $thumb_info . ''; } else { - $thumb = ''; + $thumbout = ''; if ($thumb_w == 0) { $thumb_w = get_pref('thumb_w', 0); @@ -837,10 +837,10 @@ function image_edit($message = '', $id = '') 'thumbnail_image', '
' . (($thumbnail) - ? $thumb . n . ($can_upload + ? $thumbout . n . ($can_upload ? dLink('image', 'thumbnail_delete', 'id', $id, '', '', '', '', array($page, $sort, $dir, $crit, $search_method)) : '') - : gTxt('none')) . + : '') . '
', $rs ); @@ -1234,8 +1234,7 @@ function image_save() $created = 'NOW()'; } else { $created_ts = safe_strtotime($year . '-' . $month . '-' . $day . ' ' . $hour . ':' . $minute . ':' . $second); - $created_ts -= tz_offset($created_ts); - $created = "FROM_UNIXTIME(0) + INTERVAL $created_ts SECOND"; + $created = $created_ts === false ? false : "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $created_ts SECOND"; } $constraints = array('category' => new CategoryConstraint(gps('category'), array('type' => 'image'))); diff --git a/textpattern/include/txp_link.php b/textpattern/include/txp_link.php index df36d5d50..1852e1fc4 100644 --- a/textpattern/include/txp_link.php +++ b/textpattern/include/txp_link.php @@ -227,7 +227,7 @@ function link_list($message = '') $rs = safe_query( "SELECT txp_link.id, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), txp_link.date) AS uDate, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), txp_link.date) AS uDate, txp_link.category, txp_link.url, txp_link.linkname, @@ -394,7 +394,7 @@ function link_edit($message = '') if ($is_edit) { $id = assert_int($id); - $rs = safe_row("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), date) AS date", 'txp_link', "id = '$id'"); + $rs = safe_row("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), date) AS date", 'txp_link', "id = '$id'"); if ($rs) { extract($rs); @@ -480,12 +480,16 @@ function link_edit($message = '') ) . pluggable_ui('link_ui', 'extend_detail_form', '', $rs) . graf( - tag( - '' . sp . gTxt('duplicate'), 'button', - array( - 'class' => 'txp-clone txp-reduced-ui-button', - 'data-form' => 'link_details', + ($is_edit + ? tag( + '' . sp . gTxt('duplicate'), 'button', + array( + 'class' => 'txp-clone txp-reduced-ui-button', + 'data-form' => 'link_details', + 'type' => 'button', + ) ) + : '' ) . sLink('link', '', gTxt('cancel'), 'txp-button') . fInput('submit', '', gTxt('save'), 'publish'), @@ -542,7 +546,7 @@ function link_save() $created = "NOW()"; if (!$publish_now && $created_ts !== false) { - $created = "FROM_UNIXTIME(0) + INTERVAL $created_ts SECOND"; + $created = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $created_ts SECOND"; } $constraints = array( diff --git a/textpattern/include/txp_list.php b/textpattern/include/txp_list.php index eaedda707..ad9087074 100644 --- a/textpattern/include/txp_list.php +++ b/textpattern/include/txp_list.php @@ -102,17 +102,17 @@ function list_list($message = '', $post = '') 'class' => 'title', ), 'posted' => array( - 'column' => 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted)', + 'column' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted)', 'label' => 'posted', 'class' => 'posted date', ), 'lastmod' => array( - 'column' => 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod)', + 'column' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod)', 'label' => 'modified', 'class' => 'lastmod date', ), 'expires' => array( - 'column' => 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires)', + 'column' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires)', 'label' => 'expires', 'class' => 'expires date', ), @@ -763,12 +763,7 @@ function list_multi_edit() } foreach ($selected as $item) { - if ( - ($item['Status'] >= STATUS_LIVE && has_privs('article.edit.published')) || - ($item['Status'] >= STATUS_LIVE && $item['AuthorID'] === $txp_user && has_privs('article.edit.own.published')) || - ($item['Status'] < STATUS_LIVE && has_privs('article.edit')) || - ($item['Status'] < STATUS_LIVE && $item['AuthorID'] === $txp_user && has_privs('article.edit.own')) - ) { + if (can_modify($item)) { $allowed[] = $item['ID']; } } diff --git a/textpattern/include/txp_lore.php b/textpattern/include/txp_lore.php index c05913709..c96ef0eae 100644 --- a/textpattern/include/txp_lore.php +++ b/textpattern/include/txp_lore.php @@ -174,7 +174,7 @@ function lore_list($message = '') ); } else { $rs = safe_rows_start( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), time) AS uTime", + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), time) AS uTime", 'txp_log', "$criteria ORDER BY $sort_sql LIMIT $offset, $limit" ); diff --git a/textpattern/include/txp_page.php b/textpattern/include/txp_page.php index 9a66fa108..58974534c 100644 --- a/textpattern/include/txp_page.php +++ b/textpattern/include/txp_page.php @@ -160,7 +160,7 @@ function page_edit($message = '', $refresh_partials = false) if ($name) { $actionsExtras .= sLink('page', 'page_new', '' . sp . gTxt('create_page'), 'txp-new') . tag( - '' . sp . gTxt('duplicate'), 'button', + '' . sp . gTxt('duplicate'), 'button', array( 'class' => 'txp-clone txp-reduced-ui-button', 'data-form' => 'page_form', diff --git a/textpattern/include/txp_section.php b/textpattern/include/txp_section.php index c10c8ce95..40ec0f49a 100644 --- a/textpattern/include/txp_section.php +++ b/textpattern/include/txp_section.php @@ -570,7 +570,7 @@ function section_edit() $out[] = inputLabel( 'section_description', - '', + '', 'description', 'section_description', array('class' => 'txp-form-field txp-form-field-textarea edit-section-description') ); diff --git a/textpattern/lib/constants.php b/textpattern/lib/constants.php index 2291dc7d7..9e9f89e8e 100644 --- a/textpattern/lib/constants.php +++ b/textpattern/lib/constants.php @@ -1077,6 +1077,20 @@ 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'source', 'track', 'wbr' ); +if (!defined('TEXTPATTERN_THUMB_MEMORY_MB')) { + /** + * Thumbnail image generation memory limit (in MB) + * + * You shouldn't need to mess with this, but if you have larger images that fail to + * create thumbs, you can override the limit up to the maximum installed memory on + * the server. Be careful not to set it too high or your server can lock up. + * + * @since 4.9.1 + * @package Image + */ + define('TEXTPATTERN_THUMB_MEMORY_MB', 128); +} + if (!defined('TEXTPATTERN_THUMB_TTL')) { /** * Thumbnail time-to-live value for cache headers (Cache-control max-age/Expires) diff --git a/textpattern/lib/txplib_db.php b/textpattern/lib/txplib_db.php index 0cefd8cf8..b5b273183 100644 --- a/textpattern/lib/txplib_db.php +++ b/textpattern/lib/txplib_db.php @@ -1942,12 +1942,12 @@ function now($type, $update = false) if ($time > $now or $update) { $table = ($type === 'date') ? 'txp_link' : (($type === 'created') ? 'txp_file' : 'textpattern'); $where = '1=1 having utime > '.$time.' order by utime asc limit 1'; - $now = safe_field('TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), '.$type.') as utime', $table, $where); + $now = safe_field('TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), '.$type.') as utime', $table, $where); $now = ($now === false) ? 2147483647 : intval($now) - 1; update_pref($pref, $now); $nows[$type] = $now; } } - return "(FROM_UNIXTIME(0) + INTERVAL $now SECOND)"; + return "(COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $now SECOND)"; } diff --git a/textpattern/lib/txplib_head.php b/textpattern/lib/txplib_head.php index ed5f1dfdd..81c0161ee 100644 --- a/textpattern/lib/txplib_head.php +++ b/textpattern/lib/txplib_head.php @@ -128,6 +128,7 @@ function pagetop($pagetitle = '', $message = '') <?php echo admin_title($pagetitle)?>setSource('textpattern.css'). Txp::get('\Textpattern\UI\Script')->setSource('vendors/jquery/jquery/jquery.js'). +Txp::get('\Textpattern\UI\Script')->setSource('vendors/jquery/jquery-migrate/jquery-migrate.min.js'). Txp::get('\Textpattern\UI\Script')->setSource('vendors/jquery/jquery-ui/jquery-ui.js'). Txp::get('\Textpattern\UI\Script')->setSource('vendors/blueimp/fileupload/jquery.fileupload.js') ->setRoute('file, image'). diff --git a/textpattern/lib/txplib_misc.php b/textpattern/lib/txplib_misc.php index f0b902ed8..92fc8aad2 100644 --- a/textpattern/lib/txplib_misc.php +++ b/textpattern/lib/txplib_misc.php @@ -623,12 +623,12 @@ function the_privileged($res, $real = false) /** * Check whether a user can modify the article. - * + * * Probably more suitable for Validator class? * * @param array $rs The article data * @param string $user The user name - * @return bool + * @return bool * @since 4.9.0 * @package User */ @@ -637,10 +637,25 @@ function can_modify($rs, $user = null) { global $txp_user; isset($user) or $user = $txp_user; - return ($rs['Status'] >= STATUS_LIVE && has_privs('article.edit.published')) || - ($rs['Status'] >= STATUS_LIVE && $rs['AuthorID'] === $txp_user && has_privs('article.edit.own.published')) || - ($rs['Status'] < STATUS_LIVE && has_privs('article.edit')) || - (empty($rs['ID']) || ($rs['Status'] < STATUS_LIVE && $rs['AuthorID'] === $txp_user) && has_privs('article.edit.own')); + $published = $rs['Status'] >= STATUS_LIVE ? '.published' : ''; + + return has_privs('article.edit'.$published, $user) || + $rs['AuthorID'] === $user && has_privs('article.edit.own'.$published, $user); +} + +/** + * Check whether a user can preview the article. + * + * @param array $rs The article data + * @param string $user The user name + * @return bool + * @since 4.9.1 + * @package User + */ + +function can_preview($rs, $user = null) { + return has_privs('article.preview', $user) && + (empty($rs['ID']) || can_modify($rs, $user)); } /** @@ -2933,7 +2948,7 @@ function safe_strftime($format, $time = null, $gmt = false, $override_locale = ' * Converts a time string from the Textpattern timezone to GMT. * * @param string $time_str The time string - * @return int UNIX timestamp + * @return bool|int UNIX timestamp or false on failure * @package DateTime */ @@ -2943,10 +2958,13 @@ function safe_strtotime($time_str) return 0; } - // tz_offset calculations are expensive - $tz_offset = tz_offset($ts); + if ($ts !== false) { + // tz_offset calculations are expensive + $tz_offset = tz_offset($ts); + $ts = strtotime($time_str, time() + $tz_offset) - $tz_offset; + } - return strtotime($time_str, time() + $tz_offset) - $tz_offset; + return $ts; } /** @@ -4042,7 +4060,7 @@ function get_lastmod($unix_ts = null) } // Check for future articles that are now visible. - if (TXPINTERFACE === 'public' && $max_article = safe_field("TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted)", 'textpattern', "Posted <= ".now('posted')." AND Status >= 4 ORDER BY Posted DESC LIMIT 1")) { + if (TXPINTERFACE === 'public' && $max_article = safe_field("TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted)", 'textpattern', "Posted <= ".now('posted')." AND Status >= 4 ORDER BY Posted DESC LIMIT 1")) { $unix_ts = max($unix_ts, $max_article); } @@ -4809,7 +4827,7 @@ function buildTimeSql($month, $time, $field = 'Posted') $from = $month ? "'".doSlash($month)."'" : now($field); $start = time(); } else { - $from = "(FROM_UNIXTIME(0) + INTERVAL $start SECOND)"; + $from = "(COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $start SECOND)"; } if ($time === 'since') { @@ -4824,8 +4842,8 @@ function buildTimeSql($month, $time, $field = 'Posted') } $timeq = ($start == $stop ? - "$safe_field = (FROM_UNIXTIME(0) + INTERVAL $start SECOND)" : - "$safe_field BETWEEN (FROM_UNIXTIME(0) + INTERVAL $start SECOND) AND (FROM_UNIXTIME(0) + INTERVAL $stop SECOND)" + "$safe_field = (COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $start SECOND)" : + "$safe_field BETWEEN (COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $start SECOND) AND (COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $stop SECOND)" ); } } @@ -5225,7 +5243,7 @@ function permlinkurl_id($id) } $rs = empty($id) ? array() : safe_row( - "ID AS thisid, Section, Title, url_title, Category1, Category2, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS posted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS expires", + "ID AS thisid, Section, Title, url_title, Category1, Category2, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS posted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS expires", 'textpattern', "ID = $id" ); @@ -5327,7 +5345,7 @@ function permlinkurl($article_array, $hu = null) $url_mode = $permlink_mode; } - if ($url_mode == 'title_only' && isset($txp_sections[$url_title])) { + if ($url_mode == 'title_only' && isset($txp_sections[$url_title]) && $prefs['trailing_slash']) { $url_mode = 'id_title'; } @@ -5506,6 +5524,10 @@ function imageBuildURL($img = array(), $thumbnail = null) if (!empty($img['b'])) { $params['b'] = $img['b']; } + + if (!empty($img['t'])) { + $params['t'] = $img['t']; + } } callback_event_ref('txp.image', 'thumbnail.params', 0, $params, $thumbnail); diff --git a/textpattern/lib/txplib_publish.php b/textpattern/lib/txplib_publish.php index 310f0627d..30c273957 100644 --- a/textpattern/lib/txplib_publish.php +++ b/textpattern/lib/txplib_publish.php @@ -87,9 +87,9 @@ function filterFrontPage($field = 'Section', $column = array('on_frontpage'), $n * @param bool $all Rewrite all data * @example * if ($rs = safe_rows_start("*, - * TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, - * TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, - * TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod", + * TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, + * TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, + * TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", * 'textpattern', * "1 = 1" * )) @@ -240,8 +240,8 @@ function getNeighbour($threshold, $s, $type, $atts = array(), $threshold_type = } $where = isset($atts['?']) ? $atts['?'] : '1'; - $tables = isset($atts['#']) ? $atts['#'] : safe_pfx_j('textpattern'); - $columns = isset($atts['*']) ? $atts['*'] : '*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod'; + $tables = isset($atts['#']) ? $atts['#'] : safe_pfx('textpattern'); + $columns = isset($atts['*']) ? $atts['*'] : '*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod'; $q = array( "SELECT $columns FROM $tables", @@ -311,13 +311,13 @@ function getNextPrev($id = 0, $threshold = null, $s = '') // Attributes with special treatment. switch ($atts['sortby']) { case 'Posted': - $threshold = "(FROM_UNIXTIME(0) + INTERVAL ".intval($thisarticle['posted'])." SECOND)"; + $threshold = "(COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL ".intval($thisarticle['posted'])." SECOND)"; break; case 'Expires': - $threshold = "(FROM_UNIXTIME(0) + INTERVAL ".intval($thisarticle['expires'])." SECOND)"; + $threshold = "(COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL ".intval($thisarticle['expires'])." SECOND)"; break; case 'LastMod': - $threshold = "(FROM_UNIXTIME(0) + INTERVAL ".intval($thisarticle['modified'])." SECOND)"; + $threshold = "(COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL ".intval($thisarticle['modified'])." SECOND)"; break; default: // Retrieve current threshold value per sort column from $thisarticle. @@ -349,7 +349,7 @@ function getNextPrev($id = 0, $threshold = null, $s = '') function lastMod() { - $last = safe_field("TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), val)", 'txp_prefs', "name = 'lastmod'"); + $last = safe_field("TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), val)", 'txp_prefs', "name = 'lastmod'"); return gmdate("D, d M Y H:i:s \G\M\T", $last); } @@ -657,7 +657,11 @@ function ckCat($type, $val, $debug = false) function ckExID($val, $debug = false) { - return lookupByID($val, $debug); + return safe_row( + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", + 'textpattern', + "ID = ".intval($val)." AND Status >= 4 LIMIT 1", $debug + ); } /** @@ -684,7 +688,7 @@ function lookupByTitle($val, $debug = false) $customColumns = '';//$customData ? $customData['columns'] : false; $res = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod".$customColumns, + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', "url_title = '".doSlash($val)."' LIMIT 1", $debug ); @@ -717,7 +721,7 @@ function lookupByTitleSection($val, $section, $debug = false) $customColumns = '';//$customData ? $customData['columns'] : false; $res = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod".$customColumns, + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', "url_title = '".doSlash($val)."' AND Section = '".doSlash($section)."' LIMIT 1", $debug ); @@ -741,7 +745,7 @@ function lookupByIDSection($id, $section, $debug = false) $customColumns = '';//$customData ? $customData['columns'] : false; $res = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod".$customColumns, + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', "ID = ".intval($id)." AND Section = '".doSlash($section)."' LIMIT 1", $debug ); @@ -764,7 +768,7 @@ function lookupByID($id, $debug = false) $customColumns = '';//$customData ? $customData['columns'] : false; return safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod".$customColumns, + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', "ID = ".intval($id)." LIMIT 1", $debug ); @@ -793,7 +797,7 @@ function lookupByDateTitle($when, $title, $debug = false) $customColumns = '';//$customData ? $customData['columns'] : false; $res = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod".$customColumns, + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', "url_title = '".doSlash($title)."' AND $dateClause LIMIT 1" ); @@ -947,7 +951,11 @@ function filterAtts($atts = null, $iscustom = null) } } - $coreColumns = article_column_map(false); + $coreColumns = array( + 'posted' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted', + 'expires' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires', + 'modified' => 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod', + ) + article_column_map(); foreach ($windowed + $coreColumns as $field => $val) { if (isset($atts['$'.$field])) { @@ -1253,7 +1261,7 @@ function filterAtts($atts = null, $iscustom = null) } if (isset($date_fields[$field])) { - $what['u'.$field] = 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), '.$what[$field].')'; + $what['u'.$field] = 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), '.$what[$field].')'; $alias['u'.$field] = " AS `u{$column}`"; } } diff --git a/textpattern/lib/txplib_wrapper.php b/textpattern/lib/txplib_wrapper.php index 4281591d5..5fe1556eb 100644 --- a/textpattern/lib/txplib_wrapper.php +++ b/textpattern/lib/txplib_wrapper.php @@ -639,7 +639,7 @@ public function updateArticleField($article_id, $field, $value) if ($field == 'Posted') { $value = strtotime($value) - tz_offset(); - $value = "FROM_UNIXTIME(0) + INTERVAL $value SECOND"; + $value = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $value SECOND"; $sql = "Posted = $value"; } elseif ($field == 'Status') { $value = assert_int($value); @@ -730,7 +730,7 @@ public function _setArticle($incoming, $article_id = null) } } else { $when = strtotime($incoming['Posted']) - tz_offset(); - $when = "FROM_UNIXTIME(0) + INTERVAL $when SECOND"; + $when = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $when SECOND"; } if ($incoming['Title'] || $incoming['Body'] || $incoming['Excerpt']) { diff --git a/textpattern/publish.php b/textpattern/publish.php index f1f3df12f..b4f6ccd3c 100644 --- a/textpattern/publish.php +++ b/textpattern/publish.php @@ -496,9 +496,9 @@ function preText($store, $prefs = null) $slash = $trailing_slash <= 0 ? '' : '/'; $guessarticles = safe_rows( - '*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted,'. - 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires,'. - 'TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod', + '*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted,'. + 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires,'. + 'TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod', 'textpattern', "(url_title='$safe_un'" . ($n < 3 && is_numeric($un) ? " OR ID='$safe_un')" : ')') . $status ); diff --git a/textpattern/publish/atom.php b/textpattern/publish/atom.php index b39eb425d..5964b95b5 100644 --- a/textpattern/publish/atom.php +++ b/textpattern/publish/atom.php @@ -173,9 +173,9 @@ function atom() $rs = safe_rows_start( "*, ID AS thisid, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod", + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', $where . " ORDER BY uPosted DESC LIMIT $limit" ); @@ -243,7 +243,7 @@ function atom() } elseif ($area == 'link') { $cfilter = ($category) ? "category IN ('" . join("','", $category) . "')" : '1'; - $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), date) AS uDate", 'txp_link', "$cfilter ORDER BY date DESC, id DESC LIMIT $limit"); + $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), date) AS uDate", 'txp_link', "$cfilter ORDER BY date DESC, id DESC LIMIT $limit"); if ($rs) { while ($a = nextRow($rs)) { diff --git a/textpattern/publish/comment.php b/textpattern/publish/comment.php index 7134ad2c1..4097bd3a3 100644 --- a/textpattern/publish/comment.php +++ b/textpattern/publish/comment.php @@ -42,7 +42,7 @@ function fetchComments($id) { $rs = safe_rows( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), posted) AS time", + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), posted) AS time", 'txp_discuss', "parentid = " . intval($id) . " AND visible = " . VISIBLE . " ORDER BY posted ASC" ); @@ -558,7 +558,7 @@ function checkCommentsAllowed($id) } else { extract( safe_row( - "Annotate, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted", + "Annotate, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted", 'textpattern', "ID = $id" ) diff --git a/textpattern/publish/rss.php b/textpattern/publish/rss.php index df383027a..5afc48de3 100644 --- a/textpattern/publish/rss.php +++ b/textpattern/publish/rss.php @@ -121,9 +121,9 @@ function rss() $rs = safe_rows_start( "*, ID AS thisid, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod", + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod", 'textpattern', $where . " ORDER BY uPosted DESC LIMIT $limit" ); @@ -178,7 +178,7 @@ function rss() } elseif ($area == 'link') { $cfilter = ($category) ? "category IN ('" . join("','", $category) . "')" : '1'; - $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), date) AS uDate", 'txp_link', "$cfilter ORDER BY date DESC, id DESC LIMIT $limit"); + $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), date) AS uDate", 'txp_link', "$cfilter ORDER BY date DESC, id DESC LIMIT $limit"); if ($rs) { while ($a = nextRow($rs)) { diff --git a/textpattern/publish/taghandlers.php b/textpattern/publish/taghandlers.php index c6b6bdc4a..ead56578b 100644 --- a/textpattern/publish/taghandlers.php +++ b/textpattern/publish/taghandlers.php @@ -1698,7 +1698,7 @@ function txp_sandbox($atts = array(), $thing = null, $raw = false) if (empty($id)) { assert_article(); - $id = $thisarticle['thisid']; + $id = $thisarticle['thisid'] ?: 0; } elseif (!isset($articles[$id])) { return; } @@ -1726,7 +1726,7 @@ function txp_sandbox($atts = array(), $thing = null, $raw = false) $oldarticle = $thisarticle; isset($articles[$id]) and $thisarticle = $articles[$id]; $was_article_body = $is_article_body; - $is_article_body = $thisarticle['authorid']; + $is_article_body = $thisarticle['authorid'] ?: true; $was_form = $is_form; $is_form = 0; @@ -2049,6 +2049,7 @@ function article_image($atts) 'break' => '', 'loading' => null, 'thumbnail' => false, + 'type' => '', ); $extAtts = join_atts(array_diff_key($atts, $tagAtts + ($txp_atts ? $txp_atts : array())), TEXTPATTERN_STRIP_EMPTY_STRING | TEXTPATTERN_STRIP_TXP); @@ -2143,6 +2144,7 @@ function article_image($atts) $payload['h'] = $height === true ? $h : $height; $payload['c'] = $crop; $payload['q'] = $quality; + $payload['t'] = $type; } if ($title === true) { diff --git a/textpattern/vendors/Textpattern/L10n/Lang.php b/textpattern/vendors/Textpattern/L10n/Lang.php index be402fb0f..82e63ce9f 100644 --- a/textpattern/vendors/Textpattern/L10n/Lang.php +++ b/textpattern/vendors/Textpattern/L10n/Lang.php @@ -274,7 +274,7 @@ public function available($flags = TEXTPATTERN_LANG_AVAILABLE, $force = 0) // Need a value here for the language itself, not for each one of the rows. $ownClause = ($this->hasOwnerSupport() ? "owner = ''" : "1")." GROUP BY lang ORDER BY lastmod DESC"; $this->dbLangs = safe_rows( - "lang, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), MAX(lastmod)) AS lastmod", + "lang, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), MAX(lastmod)) AS lastmod", 'txp_lang', $ownClause ); diff --git a/textpattern/vendors/Textpattern/Skin/Skin.php b/textpattern/vendors/Textpattern/Skin/Skin.php index d68149df0..ab577aab5 100644 --- a/textpattern/vendors/Textpattern/Skin/Skin.php +++ b/textpattern/vendors/Textpattern/Skin/Skin.php @@ -313,10 +313,9 @@ public function updateSections($set = null, $where = null, $dev = false) public function getEditing() { $editing = get_pref($this->getEvent().'_editing', '', true); + $installed = $this->getInstalled(); - if (!$editing) { - $installed = $this->getInstalled(); - + if (!$editing || !array_key_exists($editing, $installed)) { reset($installed); $editing = $this->setEditing(key($installed)); @@ -1530,12 +1529,12 @@ protected function getEditForm($message = '') } $caption = gTxt('edit_'.$event); - $extraAction = href( - ' '.gTxt('duplicate'), - '#', + $extraAction = tag( + '' . sp . gTxt('duplicate'), 'button', array( - 'class' => 'txp-clone', + 'class' => 'txp-clone txp-reduced-ui-button', 'data-form' => $event.'_form', + 'type' => 'button', ) ); } else { diff --git a/textpattern/vendors/Textpattern/Tag/Syntax/Comment.php b/textpattern/vendors/Textpattern/Tag/Syntax/Comment.php index 264b4b8bc..23dc0ebc8 100644 --- a/textpattern/vendors/Textpattern/Tag/Syntax/Comment.php +++ b/textpattern/vendors/Textpattern/Tag/Syntax/Comment.php @@ -49,8 +49,8 @@ public static function recent_comments($atts, $thing = null) $sort = preg_replace('/\bposted\b/', 'd.posted', $sort); $expired = ($prefs['publish_expired_articles']) ? '' : " AND (".now('expires')." <= t.Expires OR t.Expires IS NULL) "; - $rs = startRows("SELECT d.name, d.email, d.web, d.message, d.discussid, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), d.Posted) AS time, t.ID AS thisid, - TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), t.Posted) AS posted, t.Title AS title, t.Section AS section, t.Category1, t.Category2, t.url_title + $rs = startRows("SELECT d.name, d.email, d.web, d.message, d.discussid, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), d.Posted) AS time, t.ID AS thisid, + TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), t.Posted) AS posted, t.Title AS title, t.Section AS section, t.Category1, t.Category2, t.url_title FROM ".safe_pfx('txp_discuss')." AS d INNER JOIN ".safe_pfx('textpattern')." AS t ON d.parentid = t.ID WHERE t.Status >= ".STATUS_LIVE.$expired." AND d.visible = ".VISIBLE." ORDER BY ".sanitizeForSort($sort)." @@ -107,7 +107,7 @@ public static function popup_comments($atts, $thing = null) extract(lAtts(array('form' => 'comments_display'), $atts)); $rs = safe_row( - "*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), LastMod) AS uLastMod, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), Expires) AS uExpires", + "*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Posted) AS uPosted, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), LastMod) AS uLastMod, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), Expires) AS uExpires", 'textpattern', "ID=".intval(gps('parentid'))." AND Status >= 4" ); @@ -433,7 +433,7 @@ public static function comments($atts, $thing = null) ($limit) ? "LIMIT ".intval($offset).", ".intval($limit) : '', ); - $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), posted) AS time", 'txp_discuss', join(' ', $qparts)); + $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), posted) AS time", 'txp_discuss', join(' ', $qparts)); $out = ''; diff --git a/textpattern/vendors/Textpattern/Tag/Syntax/Image.php b/textpattern/vendors/Textpattern/Tag/Syntax/Image.php index 35d42b1b0..71eb8c0e0 100644 --- a/textpattern/vendors/Textpattern/Tag/Syntax/Image.php +++ b/textpattern/vendors/Textpattern/Tag/Syntax/Image.php @@ -58,6 +58,7 @@ public static function image($atts) 'quality' => '', 'wraptag' => '', 'width' => '0', + 'type' => '', 'thumbnail' => false, ); @@ -117,6 +118,7 @@ public static function image($atts) $payload['h'] = $height; $payload['c'] = $crop; $payload['q'] = $quality; + $payload['t'] = $type; } $thumb_wanted = ($thumb_type === null ? $thumbnail : $thumb_type); @@ -511,6 +513,7 @@ public static function image_url($atts, $thing = null) 'height' => '0', 'crop' => '', 'quality' => '', + 'type' => '', ), $atts)); $thumbnail = !$thumbnail ? null : $thumbnail; @@ -530,6 +533,7 @@ public static function image_url($atts, $thing = null) $thisimage['h'] = $height; $thisimage['c'] = $crop; $thisimage['q'] = $quality; + $thisimage['t'] = $type; } elseif ($thumbnail == THUMB_CUSTOM) { // Leave only thumb_w and thumb_h for the builder to use. $thisimage['w'] = ''; diff --git a/textpattern/vendors/Textpattern/Tag/Syntax/Link.php b/textpattern/vendors/Textpattern/Tag/Syntax/Link.php index 7970e9f72..d9805924d 100644 --- a/textpattern/vendors/Textpattern/Tag/Syntax/Link.php +++ b/textpattern/vendors/Textpattern/Tag/Syntax/Link.php @@ -143,7 +143,7 @@ public static function linklist($atts, $thing = null) ($limit) ? 'LIMIT '.intval($pgoffset).', '.intval($limit) : '', ); - $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(0), date) AS uDate", 'txp_link', join(' ', $qparts)); + $rs = safe_rows_start("*, TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), date) AS uDate", 'txp_link', join(' ', $qparts)); $out = parseList($rs, $thislink, function($a) { global $thislink; $thislink = $a; diff --git a/textpattern/vendors/jquery/jquery-migrate/LICENSE.txt b/textpattern/vendors/jquery/jquery-migrate/LICENSE.txt new file mode 100644 index 000000000..c0f86cb14 --- /dev/null +++ b/textpattern/vendors/jquery/jquery-migrate/LICENSE.txt @@ -0,0 +1,36 @@ +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-migrate + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. diff --git a/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.js b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.js new file mode 100644 index 000000000..dbebacff9 --- /dev/null +++ b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.js @@ -0,0 +1,1086 @@ +/*! + * jQuery Migrate - v4.0.2 - 2026-01-21T12:38Z + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.com/license/ + */ +( function( factory ) { + "use strict"; + + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery" ], function( jQuery ) { + return factory( jQuery, window ); + } ); + } else if ( typeof module === "object" && module.exports ) { + + // Node/CommonJS + // eslint-disable-next-line no-undef + module.exports = factory( require( "jquery" ), window ); + } else { + + // Browser globals + factory( jQuery, window ); + } +} )( function( jQuery, window ) { +"use strict"; + +jQuery.migrateVersion = "4.0.2"; + +// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2 +function compareVersions( v1, v2 ) { + var i, + rVersionParts = /^(\d+)\.(\d+)\.(\d+)/, + v1p = rVersionParts.exec( v1 ) || [ ], + v2p = rVersionParts.exec( v2 ) || [ ]; + + for ( i = 1; i <= 3; i++ ) { + if ( +v1p[ i ] > +v2p[ i ] ) { + return 1; + } + if ( +v1p[ i ] < +v2p[ i ] ) { + return -1; + } + } + return 0; +} + +function jQueryVersionSince( version ) { + return compareVersions( jQuery.fn.jquery, version ) >= 0; +} + +// A map from disabled patch codes to `true`. This should really +// be a `Set` but those are unsupported in IE. +var disabledPatches = Object.create( null ); + +// Don't apply patches for specified codes. Helpful for code bases +// where some Migrate warnings have been addressed, and it's desirable +// to avoid needless patches or false positives. +jQuery.migrateDisablePatches = function() { + var i; + for ( i = 0; i < arguments.length; i++ ) { + disabledPatches[ arguments[ i ] ] = true; + } +}; + +// Allow enabling patches disabled via `jQuery.migrateDisablePatches`. +// Helpful if you want to disable a patch only for some code that won't +// be updated soon to be able to focus on other warnings - and enable it +// immediately after such a call: +// ```js +// jQuery.migrateDisablePatches( "workaroundA" ); +// elem.pluginViolatingWarningA( "pluginMethod" ); +// jQuery.migrateEnablePatches( "workaroundA" ); +// ``` +jQuery.migrateEnablePatches = function() { + var i; + for ( i = 0; i < arguments.length; i++ ) { + delete disabledPatches[ arguments[ i ] ]; + } +}; + +jQuery.migrateIsPatchEnabled = function( patchCode ) { + return !disabledPatches[ patchCode ]; +}; + +( function() { + +// Need jQuery 4.x and no older Migrate loaded +if ( !jQuery || !jQueryVersionSince( "4.0.0" ) || + jQueryVersionSince( "5.0.0" ) ) { + window.console.log( "JQMIGRATE: jQuery 4.x REQUIRED" ); +} +if ( jQuery.migrateMessages ) { + window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" ); +} + +// Show a message on the console so devs know we're active +window.console.log( "JQMIGRATE: Migrate is installed" + + ( jQuery.migrateMute ? "" : " with logging active" ) + + ", version " + jQuery.migrateVersion ); + +} )(); + +var messagesLogged = Object.create( null ); + +// List of warnings already given; public read only +jQuery.migrateMessages = []; + +// By default, each warning is only reported once. +if ( jQuery.migrateDeduplicateMessages === undefined ) { + jQuery.migrateDeduplicateMessages = true; +} + +// Set to `false` to disable traces that appear with warnings +if ( jQuery.migrateTrace === undefined ) { + jQuery.migrateTrace = true; +} + +// Forget any warnings we've already given; public +jQuery.migrateReset = function() { + messagesLogged = Object.create( null ); + jQuery.migrateMessages.length = 0; +}; + +function migrateMessageInternal( code, msg, consoleMethod ) { + var console = window.console; + + if ( jQuery.migrateIsPatchEnabled( code ) && + ( !jQuery.migrateDeduplicateMessages || !messagesLogged[ msg ] ) ) { + messagesLogged[ msg ] = true; + jQuery.migrateMessages.push( consoleMethod.toUpperCase() + ": " + + msg + " [" + code + "]" ); + + if ( console[ consoleMethod ] && !jQuery.migrateMute ) { + console[ consoleMethod ]( "JQMIGRATE: " + msg ); + + if ( jQuery.migrateTrace ) { + + // Label the trace so that filtering messages in DevTools + // doesn't hide traces. Note that IE ignores the label. + console.trace( "JQMIGRATE: " + msg ); + } + } + } +} + +function migrateWarn( code, msg ) { + migrateMessageInternal( code, msg, "warn" ); +} + +function migrateInfo( code, msg ) { + migrateMessageInternal( code, msg, "info" ); +} + +function migratePatchPropInternal( + obj, prop, value, code, msg, migrateMessageFn +) { + var orig = obj[ prop ]; + Object.defineProperty( obj, prop, { + configurable: true, + enumerable: true, + + get: function() { + if ( jQuery.migrateIsPatchEnabled( code ) ) { + + // If `msg` not provided, do not message; more sophisticated + // messaging logic is most likely embedded in `value`. + if ( msg ) { + migrateMessageFn( code, msg ); + } + + return value; + } + + return orig; + }, + + set: function( newValue ) { + if ( jQuery.migrateIsPatchEnabled( code ) ) { + + // See the comment in the getter. + if ( msg ) { + migrateMessageFn( code, msg ); + } + } + + // If a new value was set, apply it regardless if + // the patch is later disabled or not. + orig = value = newValue; + } + } ); +} + +function migrateWarnProp( obj, prop, value, code, msg ) { + migratePatchPropInternal( obj, prop, value, code, msg, migrateWarn ); +} + +function migrateInfoProp( obj, prop, value, code, msg ) { + if ( !msg ) { + throw new Error( "No warning message provided" ); + } + migratePatchPropInternal( obj, prop, value, code, msg, migrateInfo ); +} + +function migratePatchProp( obj, prop, value, code ) { + migratePatchPropInternal( obj, prop, value, code ); +} + +// The value of the "Func" APIs is that for method we want to allow +// checking for the method existence without triggering a warning. +// For other deprecated properties, we do need to warn on access. +function migratePatchFuncInternal( + obj, prop, newFunc, code, msg, migrateMessageFn +) { + + function wrappedNewFunc() { + + // If `msg` not provided, do not warn; more sophisticated warnings + // logic is most likely embedded in `newFunc`, in that case here + // we just care about the logic choosing the proper implementation + // based on whether the patch is disabled or not. + if ( msg ) { + migrateMessageFn( code, msg ); + } + + return newFunc.apply( this, arguments ); + } + + migratePatchPropInternal( obj, prop, wrappedNewFunc, code ); +} + +function migratePatchAndWarnFunc( obj, prop, newFunc, code, msg ) { + if ( !msg ) { + throw new Error( "No warning message provided" ); + } + return migratePatchFuncInternal( obj, prop, newFunc, code, msg, migrateWarn ); +} + +function migratePatchAndInfoFunc( obj, prop, newFunc, code, msg ) { + if ( !msg ) { + throw new Error( "No info message provided" ); + } + return migratePatchFuncInternal( obj, prop, newFunc, code, msg, migrateInfo ); +} + +function migratePatchFunc( obj, prop, newFunc, code ) { + return migratePatchFuncInternal( obj, prop, newFunc, code ); +} + +if ( window.document.compatMode === "BackCompat" ) { + + // jQuery has never supported or tested Quirks Mode + migrateWarn( "quirks", "jQuery is not compatible with Quirks Mode" ); +} + +var arr = [], + push = arr.push, + sort = arr.sort, + splice = arr.splice, + class2type = {}, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g, + + // Require that the "whitespace run" starts from a non-whitespace + // to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position. + rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; + +migratePatchAndWarnFunc( jQuery, "parseJSON", function() { + return JSON.parse.apply( null, arguments ); +}, "parseJSON", +"jQuery.parseJSON is removed; use JSON.parse" ); + +migratePatchAndInfoFunc( jQuery, "holdReady", jQuery.holdReady, + "holdReady", "jQuery.holdReady() is deprecated" ); + +migratePatchAndWarnFunc( jQuery, "unique", jQuery.uniqueSort, + "unique", "jQuery.unique() is removed; use jQuery.uniqueSort()" ); + +migratePatchAndWarnFunc( jQuery, "trim", function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "$1" ); +}, "trim", +"jQuery.trim() is removed; use String.prototype.trim" ); + +migratePatchAndWarnFunc( jQuery, "nodeName", function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); +}, "nodeName", +"jQuery.nodeName() is removed" ); + +migratePatchAndWarnFunc( jQuery, "isArray", Array.isArray, "isArray", + "jQuery.isArray() is removed; use Array.isArray()" +); + +migratePatchAndWarnFunc( jQuery, "isNumeric", + function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = typeof obj; + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, e.g. hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); + }, "isNumeric", + "jQuery.isNumeric() is removed" +); + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol". + split( " " ), +function( _, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +migratePatchAndWarnFunc( jQuery, "type", function( obj ) { + if ( obj == null ) { + return obj + ""; + } + + return typeof obj === "object" ? + class2type[ Object.prototype.toString.call( obj ) ] || "object" : + typeof obj; +}, "type", +"jQuery.type() is removed" ); + +migratePatchAndWarnFunc( jQuery, "isFunction", function( obj ) { + return typeof obj === "function"; +}, "isFunction", +"jQuery.isFunction() is removed" ); + +migratePatchAndWarnFunc( jQuery, "isWindow", + function( obj ) { + return obj != null && obj === obj.window; + }, "isWindow", + "jQuery.isWindow() is removed" +); + +migratePatchAndWarnFunc( jQuery, "now", Date.now, "now", + "jQuery.now() is removed; use Date.now()" +); + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +migratePatchAndWarnFunc( jQuery, "camelCase", + function( string ) { + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 15 + // Microsoft forgot to hump their vendor prefix (trac-9572) + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, "camelCase", + "jQuery.camelCase() is removed" +); + +// Bind a function to a context, optionally partially applying any +// arguments. +// jQuery.proxy is deprecated to promote standards (specifically Function#bind) +// However, it is not slated for removal any time soon +migratePatchAndInfoFunc( jQuery, "proxy", jQuery.proxy, + "proxy", "jQuery.proxy() is deprecated" ); + +migratePatchAndWarnFunc( jQuery.fn, "push", push, "push", + "jQuery.fn.push() is removed; use .add() or convert to an array" ); +migratePatchAndWarnFunc( jQuery.fn, "sort", sort, "sort", + "jQuery.fn.sort() is removed; convert to an array before sorting" ); +migratePatchAndWarnFunc( jQuery.fn, "splice", splice, "splice", + "jQuery.fn.splice() is removed; use .slice() or .not() with .eq()" ); + +// Now jQuery.expr.pseudos is the standard incantation +migrateInfoProp( jQuery.expr, "filters", jQuery.expr.pseudos, "expr-pre-pseudos", + "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" ); +migrateInfoProp( jQuery.expr, ":", jQuery.expr.pseudos, "expr-pre-pseudos", + "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" ); + +function markFunction( fn ) { + fn[ jQuery.expando ] = true; + return fn; +} + +migratePatchFunc( jQuery.expr.filter, "PSEUDO", function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // https://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = jQuery.expr.pseudos[ pseudo ] || + jQuery.expr.setFilters[ pseudo.toLowerCase() ] || + jQuery.error( + "Syntax error, unrecognized expression: unsupported pseudo: " + + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as jQuery does + if ( fn[ jQuery.expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + migrateInfo( "legacy-custom-pseudos", + "Pseudos with multiple arguments are deprecated; " + + "use jQuery.expr.createPseudo()" ); + args = [ pseudo, pseudo, "", argument ]; + return jQuery.expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = Array.prototype.indexOf.call( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; +}, "legacy-custom-pseudos" ); + +if ( typeof Proxy !== "undefined" ) { + jQuery.each( [ "pseudos", "setFilters" ], function( _, api ) { + jQuery.expr[ api ] = new Proxy( jQuery.expr[ api ], { + set: function( _target, _prop, fn ) { + if ( typeof fn === "function" && !fn[ jQuery.expando ] && fn.length > 1 ) { + migrateInfo( "legacy-custom-pseudos", + "Pseudos with multiple arguments are deprecated; " + + "use jQuery.expr.createPseudo()" ); + } + return Reflect.set.apply( this, arguments ); + } + } ); + } ); +} + +// Support jQuery slim which excludes the ajax module +if ( jQuery.ajax ) { + +var oldCallbacks = [], + guid = "migrate-" + Date.now(), + origJsonpCallback = jQuery.ajaxSettings.jsonpCallback, + rjsonp = /(=)\?(?=&|$)|\?\?/, + rquery = /\?/; + +jQuery.ajaxSetup( { + jsonpCallback: function() { + + // Source is virtually the same as in Core, but we need to duplicate + // to maintain a proper `oldCallbacks` reference. + if ( jQuery.migrateIsPatchEnabled( "jsonp-promotion" ) ) { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( guid++ ) ); + this[ callback ] = true; + return callback; + } else { + return origJsonpCallback.apply( this, arguments ); + } + } +} ); + +// Register this prefilter before the jQuery one. Otherwise, a promoted +// request is transformed into one with the script dataType, and we can't +// catch it anymore. +// +// Code mostly from: +// https://github.com/jquery/jquery/blob/fa0058af426c4e482059214c29c29f004254d9a1/src/ajax/jsonp.js#L20-L97 +jQuery.ajaxPrefilter( "+json", function( s, originalSettings, jqXHR ) { + + if ( !jQuery.migrateIsPatchEnabled( "jsonp-promotion" ) ) { + return; + } + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && + ( s.contentType || "" ) + .indexOf( "application/x-www-form-urlencoded" ) === 0 && + rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + migrateWarn( "jsonp-promotion", "JSON-to-JSONP auto-promotion is removed" ); + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = typeof s.jsonpCallback === "function" ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters[ "script json" ] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // Force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always( function() { + + // If previous value didn't exist - remove it + if ( overwritten === undefined ) { + jQuery( window ).removeProp( callbackName ); + + // Otherwise restore preexisting value + } else { + window[ callbackName ] = overwritten; + } + + // Save back as free + if ( s[ callbackName ] ) { + + // Make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // Save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && typeof overwritten === "function" ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + } ); + + // Delegate to script + return "script"; + } +} ); + +// Don't trigger the above logic by default as the JSON-to-JSONP auto-promotion +// behavior is gone in jQuery 4.0 and as it has security implications, we don't +// want to restore the legacy behavior by default. +jQuery.migrateDisablePatches( "jsonp-promotion" ); + +} + +var oldJQueryAttr = jQuery.attr, + oldToggleClass = jQuery.fn.toggleClass, + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|" + + "disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + rbooleans = new RegExp( "^(?:" + booleans + ")$", "i" ), + + // Some formerly boolean attributes gained new values with special meaning. + // Skip the old boolean attr logic for those values. + extraBoolAttrValues = { + hidden: [ "until-found" ] + }; + +// HTML boolean attributes have special behavior: +// we consider the lowercase name to be the only valid value, so +// getting (if the attribute is present) normalizes to that, as does +// setting to any non-`false` value (and setting to `false` removes the attribute). +// See https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes +jQuery.each( booleans.split( "|" ), function( _i, name ) { + var origAttrHooks = jQuery.attrHooks[ name ] || {}; + jQuery.attrHooks[ name ] = { + get: origAttrHooks.get || function( elem ) { + var attrValue; + + if ( jQuery.migrateIsPatchEnabled( "boolean-attributes" ) ) { + attrValue = elem.getAttribute( name ); + + if ( attrValue !== name && attrValue != null && + ( extraBoolAttrValues[ name ] || [] ) + .indexOf( String( attrValue ).toLowerCase() ) === -1 + ) { + migrateWarn( "boolean-attributes", + "Boolean attribute '" + name + + "' value is different from its lowercased name" ); + + return name.toLowerCase(); + } + } + + return null; + }, + + set: origAttrHooks.set || function( elem, value, name ) { + if ( jQuery.migrateIsPatchEnabled( "boolean-attributes" ) ) { + if ( value !== name && + ( extraBoolAttrValues[ name ] || [] ) + .indexOf( String( value ).toLowerCase() ) === -1 + ) { + if ( value !== false ) { + migrateWarn( "boolean-attributes", + "Boolean attribute '" + name + + "' is not set to its lowercased name" ); + } + + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } + } + } + }; +} ); + +migratePatchFunc( jQuery, "attr", function( elem, name, value ) { + var nType = elem.nodeType; + + // Fallback to the original method on text, comment and attribute nodes + // and when attributes are not supported. + if ( nType === 3 || nType === 8 || nType === 2 || + typeof elem.getAttribute === "undefined" ) { + return oldJQueryAttr.apply( this, arguments ); + } + + if ( value === false && name.toLowerCase().indexOf( "aria-" ) !== 0 && + !rbooleans.test( name ) ) { + migrateWarn( "attr-false", + "Setting the non-ARIA non-boolean attribute '" + name + + "' to false" ); + + jQuery.attr( elem, name, "false" ); + return; + } + + return oldJQueryAttr.apply( this, arguments ); +}, "attr-false" ); + +migratePatchFunc( jQuery.fn, "toggleClass", function( state ) { + + // Only deprecating no-args or single boolean arg + if ( state !== undefined && typeof state !== "boolean" ) { + + return oldToggleClass.apply( this, arguments ); + } + + migrateWarn( "toggleClass-bool", "jQuery.fn.toggleClass( [ boolean ] ) is removed" ); + + // Toggle entire class name of each element + return this.each( function() { + var className = this.getAttribute && this.getAttribute( "class" ) || ""; + + if ( className ) { + jQuery.data( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise, bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || state === false ? + "" : + jQuery.data( this, "__className__" ) || "" + ); + } + } ); +}, "toggleClass-bool" ); + +function camelCase( string ) { + return string.replace( /-([a-z])/g, function( _, letter ) { + return letter.toUpperCase(); + } ); +} + +// Make `object` inherit from `Object.prototype` via an additional object +// in between; that intermediate object proxies properties +// to `Object.prototype`, warning about their usage first. +function patchProto( object, options ) { + var i, + warningId = options.warningId, + apiName = options.apiName, + + // `Object.prototype` keys are not enumerable so list the + // official ones here. An alternative would be wrapping + // objects with a Proxy but that creates additional issues + // like breaking object identity on subsequent calls. + objProtoKeys = [ + "__proto__", + "__defineGetter__", + "__defineSetter__", + "__lookupGetter__", + "__lookupSetter__", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "toLocaleString", + "toString", + "valueOf" + ], + + // Use a null prototype at the beginning so that we can define our + // `__proto__` getter & setter. We'll reset the prototype afterward. + intermediateObj = Object.create( null ); + + for ( i = 0; i < objProtoKeys.length; i++ ) { + ( function( key ) { + Object.defineProperty( intermediateObj, key, { + get: function() { + migrateWarn( warningId, + "Accessing properties from " + apiName + + " inherited from Object.prototype is removed" ); + return ( key + "__cache" ) in intermediateObj ? + intermediateObj[ key + "__cache" ] : + Object.prototype[ key ]; + }, + set: function( value ) { + migrateWarn( warningId, + "Setting properties from " + apiName + + " inherited from Object.prototype is removed" ); + intermediateObj[ key + "__cache" ] = value; + } + } ); + } )( objProtoKeys[ i ] ); + } + + Object.setPrototypeOf( intermediateObj, Object.prototype ); + Object.setPrototypeOf( object, intermediateObj ); + + return object; +} + +var origFnCss, internalCssNumber, + ralphaStart = /^[a-z]/, + + // The regex visualized: + // + // /----------\ + // | | /-------\ + // | / Top \ | | | + // /--- Border ---+-| Right |-+---+- Width -+---\ + // | | Bottom | | + // | \ Left / | + // | | + // | /----------\ | + // | /-------------\ | | |- END + // | | | | / Top \ | | + // | | / Margin \ | | | Right | | | + // |---------+-| |-+---+-| Bottom |-+----| + // | \ Padding / \ Left / | + // BEGIN -| | + // | /---------\ | + // | | | | + // | | / Min \ | / Width \ | + // \--------------+-| |-+---| |---/ + // \ Max / \ Height / + rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/; + +if ( typeof Proxy !== "undefined" ) { + jQuery.cssProps = new Proxy( jQuery.cssProps || {}, { + set: function() { + migrateWarn( "cssProps", "jQuery.cssProps is removed" ); + return Reflect.set.apply( this, arguments ); + } + } ); +} + +// `jQuery.cssNumber` is missing in jQuery >=4; fill it with the latest 3.x version: +// https://github.com/jquery/jquery/blob/3.7.1/src/css.js#L216-L246 +// This way, number values for the CSS properties below won't start triggering +// Migrate warnings when jQuery gets updated to >=4.0.0 (gh-438). +// +// We need to keep this as a local variable as we need it internally +// in a `jQuery.fn.css` patch and this usage shouldn't warn. +internalCssNumber = { + animationIterationCount: true, + aspectRatio: true, + borderImageSlice: true, + columnCount: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + gridArea: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnStart: true, + gridRow: true, + gridRowEnd: true, + gridRowStart: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + scale: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeMiterlimit: true, + strokeOpacity: true +}; + +if ( typeof Proxy !== "undefined" ) { + jQuery.cssNumber = new Proxy( internalCssNumber, { + get: function() { + migrateWarn( "css-number", "jQuery.cssNumber is deprecated" ); + return Reflect.get.apply( this, arguments ); + }, + set: function() { + migrateWarn( "css-number", "jQuery.cssNumber is deprecated" ); + return Reflect.set.apply( this, arguments ); + } + } ); +} else { + + // Support: IE 9-11+ + // IE doesn't support proxies, but we still want to restore the legacy + // jQuery.cssNumber there. + jQuery.cssNumber = internalCssNumber; +} + +function isAutoPx( prop ) { + + // The first test is used to ensure that: + // 1. The prop starts with a lowercase letter (as we uppercase it for the second regex). + // 2. The prop is not empty. + return ralphaStart.test( prop ) && + rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) ); +} + +origFnCss = jQuery.fn.css; + +migratePatchFunc( jQuery.fn, "css", function( name, value ) { + var camelName, + origThis = this; + + if ( name && typeof name === "object" && !Array.isArray( name ) ) { + jQuery.each( name, function( n, v ) { + jQuery.fn.css.call( origThis, n, v ); + } ); + return this; + } + + if ( typeof value === "number" ) { + camelName = camelCase( name ); + + // Use `internalCssNumber` to avoid triggering our warnings in this + // internal check. + if ( !isAutoPx( camelName ) && !internalCssNumber[ camelName ] ) { + migrateWarn( "css-number", + "Auto-appending 'px' to number-typed values " + + "for jQuery.fn.css( \"" + name + "\", value ) is removed" ); + } + } + + return origFnCss.apply( this, arguments ); +}, "css-number" ); + +function patchDataProto( original, options ) { + var warningId = options.warningId, + apiName = options.apiName, + isInstanceMethod = options.isInstanceMethod; + + return function apiWithProtoPatched() { + var result = original.apply( this, arguments ); + + if ( arguments.length !== ( isInstanceMethod ? 0 : 1 ) || result === undefined ) { + return result; + } + + patchProto( result, { + warningId: warningId, + apiName: apiName + } ); + + return result; + }; +} + +migratePatchFunc( jQuery, "data", + patchDataProto( jQuery.data, { + warningId: "data-null-proto", + apiName: "jQuery.data()", + isInstanceMethod: false + } ), + "data-null-proto" ); +migratePatchFunc( jQuery, "_data", + patchDataProto( jQuery._data, { + warningId: "data-null-proto", + apiName: "jQuery._data()", + isInstanceMethod: false + } ), + "data-null-proto" ); +migratePatchFunc( jQuery.fn, "data", + patchDataProto( jQuery.fn.data, { + warningId: "data-null-proto", + apiName: "jQuery.fn.data()", + isInstanceMethod: true + } ), + "data-null-proto" ); + +// Support jQuery slim which excludes the effects module +if ( jQuery.fx ) { + +var intervalValue = jQuery.fx.interval, + intervalMsg = "jQuery.fx.interval is removed"; + +// Don't warn if document is hidden, jQuery uses setTimeout (gh-292) +Object.defineProperty( jQuery.fx, "interval", { + configurable: true, + enumerable: true, + get: function() { + if ( !window.document.hidden ) { + migrateWarn( "fx-interval", intervalMsg ); + } + + // Only fallback to the default if patch is enabled + if ( !jQuery.migrateIsPatchEnabled( "fx-interval" ) ) { + return intervalValue; + } + return intervalValue === undefined ? 13 : intervalValue; + }, + set: function( newValue ) { + migrateWarn( "fx-interval", intervalMsg ); + intervalValue = newValue; + } +} ); + +} + +var oldEventAdd = jQuery.event.add; + +jQuery.event.props = []; +jQuery.event.fixHooks = {}; + +migratePatchFunc( jQuery.event, "add", function( elem, types ) { + + // This misses the multiple-types case but that seems awfully rare + if ( elem === window && types === "load" && window.document.readyState === "complete" ) { + migrateWarn( "load-after-event", + "jQuery(window).on('load'...) called after load event occurred" ); + } + return oldEventAdd.apply( this, arguments ); +}, "load-after-event" ); + +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), +function( _i, name ) { + + // Handle event binding + migratePatchAndInfoFunc( jQuery.fn, name, jQuery.fn[ name ], "shorthand-deprecated-v3", + "jQuery.fn." + name + "() event shorthand is deprecated" ); +} ); + +migratePatchAndInfoFunc( jQuery.fn, "bind", jQuery.fn.bind, + "pre-on-methods", "jQuery.fn.bind() is deprecated" ); +migratePatchAndInfoFunc( jQuery.fn, "unbind", jQuery.fn.unbind, + "pre-on-methods", "jQuery.fn.unbind() is deprecated" ); +migratePatchAndInfoFunc( jQuery.fn, "delegate", jQuery.fn.delegate, + "pre-on-methods", "jQuery.fn.delegate() is deprecated" ); +migratePatchAndInfoFunc( jQuery.fn, "undelegate", jQuery.fn.undelegate, + "pre-on-methods", "jQuery.fn.undelegate() is deprecated" ); + +migratePatchAndInfoFunc( jQuery.fn, "hover", jQuery.fn.hover, + "hover", "jQuery.fn.hover() is deprecated" ); + +migrateWarnProp( jQuery.event, "global", {}, "event-global", + "jQuery.event.global is removed" ); + +migratePatchProp( jQuery.event, "special", + patchProto( jQuery.extend( Object.create( null ), jQuery.event.special ), { + warningId: "event-special-null-proto", + apiName: "jQuery.event.special" + } ), + "event-special-null-proto" ); + +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + makeMarkup = function( html ) { + var doc = window.document.implementation.createHTMLDocument( "" ); + doc.body.innerHTML = html; + return doc.body && doc.body.innerHTML; + }, + warnIfChanged = function( html ) { + var changed = html.replace( rxhtmlTag, "<$1>" ); + if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) { + migrateWarn( "self-closed-tags", + "HTML tags must be properly nested and closed: " + html ); + } + }; + +migratePatchFunc( jQuery, "htmlPrefilter", function( html ) { + warnIfChanged( html ); + return html.replace( rxhtmlTag, "<$1>" ); +}, "self-closed-tags" ); + +// This patch needs to be disabled by default as it re-introduces +// security issues (CVE-2020-11022, CVE-2020-11023). +jQuery.migrateDisablePatches( "self-closed-tags" ); + +// Support jQuery slim which excludes the deferred module in jQuery 4.0+ +if ( jQuery.Deferred ) { + +var unpatchedGetStackHookValue, + oldDeferred = jQuery.Deferred; + +migratePatchFunc( jQuery, "Deferred", function( func ) { + var deferred = oldDeferred(), + promise = deferred.promise(); + + migratePatchAndInfoFunc( deferred, "pipe", deferred.pipe, "deferred-pipe", + "deferred.pipe() is deprecated" ); + migratePatchAndInfoFunc( promise, "pipe", promise.pipe, "deferred-pipe", + "deferred.pipe() is deprecated" ); + + if ( func ) { + func.call( deferred, deferred ); + } + + return deferred; +}, "deferred-pipe" ); + +// Preserve handler of uncaught exceptions in promise chains +jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook; + +// Preserve the optional hook to record the error, if defined +jQuery.Deferred.getErrorHook = oldDeferred.getErrorHook; + +// We want to mirror jQuery.Deferred.getErrorHook here, so we cannot use +// existing Migrate utils. +Object.defineProperty( jQuery.Deferred, "getStackHook", { + configurable: true, + enumerable: true, + get: function() { + if ( jQuery.migrateIsPatchEnabled( "deferred-getStackHook" ) ) { + migrateWarn( "deferred-getStackHook", + "jQuery.Deferred.getStackHook is removed; use jQuery.Deferred.getErrorHook" ); + return jQuery.Deferred.getErrorHook; + } else { + return unpatchedGetStackHookValue; + } + }, + set: function( newValue ) { + if ( jQuery.migrateIsPatchEnabled( "deferred-getStackHook" ) ) { + + // Only warn if `getErrorHook` wasn't set to the same value first. + if ( jQuery.Deferred.getErrorHook !== newValue ) { + migrateWarn( "deferred-getStackHook", + "jQuery.Deferred.getStackHook is removed; use jQuery.Deferred.getErrorHook" ); + jQuery.Deferred.getErrorHook = newValue; + } + } else { + unpatchedGetStackHookValue = newValue; + } + } +} ); + +} + +return jQuery; +} ); diff --git a/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.js b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.js new file mode 100644 index 000000000..ae9d5258e --- /dev/null +++ b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.js @@ -0,0 +1,3 @@ +/*! jQuery Migrate v4.0.2 | (c) OpenJS Foundation and other contributors | jquery.com/license */ +"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,u){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,o=r.exec(e)||[],n=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]>+n[a])return 1;if(+o[a]<+n[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="4.0.2";var t=Object.create(null),n=(s.migrateDisablePatches=function(){for(var e=0;e\x20\t\r\n\f]*)[^>]*)\/>/gi),D=function(e){var t=u.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML};return f(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(M,"<$1>"))!==t&&D(t)!==D(r)&&d("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(M,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags"),s.Deferred&&(A=s.Deferred,f(s,"Deferred",function(e){var t=A(),r=t.promise();return l(t,"pipe",t.pipe,"deferred-pipe","deferred.pipe() is deprecated"),l(r,"pipe",r.pipe,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(t,t),t},"deferred-pipe"),s.Deferred.exceptionHook=A.exceptionHook,s.Deferred.getErrorHook=A.getErrorHook,Object.defineProperty(s.Deferred,"getStackHook",{configurable:!0,enumerable:!0,get:function(){return s.migrateIsPatchEnabled("deferred-getStackHook")?(d("deferred-getStackHook","jQuery.Deferred.getStackHook is removed; use jQuery.Deferred.getErrorHook"),s.Deferred.getErrorHook):I},set:function(e){s.migrateIsPatchEnabled("deferred-getStackHook")?s.Deferred.getErrorHook!==e&&(d("deferred-getStackHook","jQuery.Deferred.getStackHook is removed; use jQuery.Deferred.getErrorHook"),s.Deferred.getErrorHook=e):I=e}})),s}); +//# sourceMappingURL=jquery-migrate.min.map \ No newline at end of file diff --git a/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.map b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.map new file mode 100644 index 000000000..4abd9cebe --- /dev/null +++ b/textpattern/vendors/jquery/jquery-migrate/jquery-migrate.min.map @@ -0,0 +1 @@ +{"version":3,"file":"jquery-migrate.min.js","sources":["../src/migratemute.js","jquery-migrate.js"],"names":["jQuery","migrateMute","factory","define","amd","window","module","exports","require","jQueryVersionSince","version","v1","v2","rVersionParts","v1p","exec","v2p","i","fn","jquery","migrateVersion","disabledPatches","Object","create","messagesLogged","migrateDisablePatches","arguments","length","migrateEnablePatches","migrateIsPatchEnabled","patchCode","console","log","migrateMessages","migrateMessageInternal","code","msg","consoleMethod","migrateDeduplicateMessages","push","toUpperCase","migrateTrace","trace","migrateWarn","migrateInfo","migratePatchPropInternal","obj","prop","value","migrateMessageFn","orig","defineProperty","configurable","enumerable","get","set","newValue","migrateInfoProp","Error","migratePatchFuncInternal","newFunc","apply","this","migratePatchAndWarnFunc","migratePatchAndInfoFunc","migratePatchFunc","undefined","migrateReset","document","compatMode","oldCallbacks","guid","origJsonpCallback","rjsonp","rquery","arr","sort","splice","class2type","rmsPrefix","rdashAlpha","rtrim","fcamelCase","_all","letter","JSON","parse","holdReady","uniqueSort","text","replace","elem","name","nodeName","toLowerCase","Array","isArray","type","isNaN","parseFloat","each","split","_","prototype","toString","call","Date","now","string","proxy","expr","pseudos","filter","pseudo","argument","args","setFilters","error","expando","hasOwnProperty","seed","matches","idx","matched","indexOf","Proxy","api","_target","_prop","Reflect","ajax","ajaxSettings","jsonpCallback","ajaxSetup","callback","pop","ajaxPrefilter","s","originalSettings","jqXHR","callbackName","overwritten","responseContainer","jsonProp","jsonp","test","url","data","contentType","dataTypes","converters","always","removeProp","oldJQueryAttr","attr","oldToggleClass","toggleClass","booleans","rbooleans","RegExp","extraBoolAttrValues","hidden","patchProto","object","options","warningId","apiName","objProtoKeys","intermediateObj","key","setPrototypeOf","_i","origAttrHooks","attrHooks","attrValue","getAttribute","String","removeAttr","setAttribute","nType","nodeType","state","className","origFnCss","internalCssNumber","intervalValue","intervalMsg","ralphaStart","rautoPx","patchDataProto","original","isInstanceMethod","result","cssProps","animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","scale","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","cssNumber","css","origThis","n","v","camelName","slice","_data","fx","interval","unpatchedGetStackHookValue","oldDeferred","oldEventAdd","event","add","rxhtmlTag","props","fixHooks","types","readyState","bind","unbind","delegate","undelegate","hover","extend","special","makeMarkup","html","doc","implementation","createHTMLDocument","body","innerHTML","changed","Deferred","func","deferred","promise","pipe","exceptionHook","getErrorHook"],"mappings":";AAEmC,aAA9B,OAAOA,OAAOC,cAClBD,OAAOC,YAAc,CAAA,GCGtB,SAAYC,GACX,aAEuB,YAAlB,OAAOC,QAAyBA,OAAOC,IAG3CD,OAAQ,CAAE,UAAY,SAAUH,GAC/B,OAAOE,EAASF,EAAQK,MAAO,CAChC,CAAE,EAC2B,UAAlB,OAAOC,QAAuBA,OAAOC,QAIhDD,OAAOC,QAAUL,EAASM,QAAS,QAAS,EAAGH,MAAO,EAItDH,EAASF,OAAQK,MAAO,CAExB,EAAG,SAAUL,EAAQK,GACvB,aAsBA,SAASI,EAA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AE/B,CACD,CAAE,GAIKxD,CACP,CAAE"} \ No newline at end of file diff --git a/textpattern/vendors/jquery/jquery-migrate/package.json b/textpattern/vendors/jquery/jquery-migrate/package.json new file mode 100644 index 000000000..a0df0c867 --- /dev/null +++ b/textpattern/vendors/jquery/jquery-migrate/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/textpattern/vendors/jquery/jquery-ui/jquery-ui.js b/textpattern/vendors/jquery/jquery-ui/jquery-ui.js index 841179e84..2c8ca6918 100644 --- a/textpattern/vendors/jquery/jquery-ui/jquery-ui.js +++ b/textpattern/vendors/jquery/jquery-ui/jquery-ui.js @@ -1,6 +1,6 @@ -/*! jQuery UI - v1.14.1 - 2024-10-30 +/*! jQuery UI - v1.14.2 - 2026-01-28 * https://jqueryui.com * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js * Copyright OpenJS Foundation and other contributors; Licensed MIT */ -(t=>{"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(V){V.ui=V.ui||{};V.ui.version="1.14.1";var n,s,x,k,o,a,r,l,h,i,E=0,N=Array.prototype.hasOwnProperty,c=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a,r={},l=t.split(".")[0];return"__proto__"===(t=t.split(".")[1])||"constructor"===t?V.error("Invalid widget name: "+t):(a=l+"-"+t,e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[a.toLowerCase()]=function(t){return!!V.data(t,a)},V[l]=V[l]||{},s=V[l][t],n=V[l][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof s?s:function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},r,{constructor:n,namespace:l,widgetName:t,widgetFullName:a}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n)},V.widget.extend=function(t){for(var e,i,s=c.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=E++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n{var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})})(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,e={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return e.element.toggleClass(this._classes(e),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),s=t[1]+r.eventNamespace,t=t[2];t?a.on(s,t,i):o.on(s,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}}),V.widget;function C(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function D(t,e){return parseInt(V.css(t,e),10)||0}function I(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,a=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,h=/%$/,i=V.fn.position,V.position={scrollbarWidth:function(){var t,e,i;return void 0!==s?s:(i=(e=V("
")).children()[0],V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})):i.apply(this,arguments)},V.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,s=s.width,o=t.left-e.collisionPosition.marginLeft,a=n-o,r=o+e.collisionWidth-s-n;so.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=_((n-s)*a+s,e)))}),this[t](l)},blend:function(t){var e,i,s;return 1===this._rgba[3]?this:(e=this._rgba.slice(),i=e.pop(),s=p(t)._rgba,p(u.map(e,function(t,e){return(1-i)*s[e]+i*t})))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null!=t?t:2{var i,s,n={};for(i in e)s=e[i],t[i]===s||U[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s);return n})(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(q=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):q.apply(this,arguments)}),removeClass:(j=V.fn.removeClass,function(t,e,i,s){return 1").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.14.1",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){var s;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(s="horizontal"!==i?(e||100)/100:1,i="vertical"!==i?(e||100)/100:1,{height:t.height()*i,width:t.width()*s,outerHeight:t.outerHeight()*i,outerWidth:t.outerWidth()*s})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(w+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=w+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-o,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(r,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Z(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},b={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){b[t]=function(t){return Math.pow(t,e+2)}}),V.extend(b,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(b,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});var tt,et,S,it=V.effects,st=(V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,o="show"===o,r=t.direction||"up",l=t.distance,h=t.times||5,c=2*h+(o||a?1:0),u=t.duration/c,d=t.easing,p="up"===r||"down"===r?"top":"left",f="up"===r||"left"===r,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),r=n.css(p),l=l||n["top"==p?"outerHeight":"outerWidth"]()/3,o&&((s={opacity:1})[p]=r,n.css("opacity",0).css(p,f?2*-l:2*l).animate(s,u,d)),a&&(l/=Math.pow(2,h-1)),(s={})[p]=r;g").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,s="hide"===s,o=e.size||15,a=/([0-9]+)%/.exec(o),r=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,h=V.effects.createPlaceholder(i),c=i.cssClip(),u={clip:V.extend({},c)},d={clip:V.extend({},c)},p=[c[r[0]],c[r[1]]],f=i.queue().length;a&&(o=parseInt(a[1],10)/100*p[s?0:1]),u.clip[r[0]]=o,d.clip[r[0]]=o,d.clip[r[1]]=0,n&&(i.cssClip(d.clip),h&&h.css(V.effects.clipToBox(d)),d.clip=c),i.queue(function(t){h&&h.animate(V.effects.clipToBox(u),l,e.easing).animate(V.effects.clipToBox(d),l,e.easing),t()}).animate(u,l,e.easing).animate(d,l,e.easing).queue(t),V.effects.unshift(i,f,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(r=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*r.y+d.top,f.left=(p.outerWidth-f.outerWidth)*r.x+d.left,g.top=(p.outerHeight-g.outerHeight)*r.y+d.top,g.left=(p.outerWidth-g.outerWidth)*r.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),i=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(i.from.opacity=1,i.to.opacity=0),V.effects.effect.size.call(this,i,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l li > :first-child").add(t.find("> :not(li)").filter(function(t){return t%2==0}))},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"===t?this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e)&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,r)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(a=i.children(".ui-accordion-header-icon"),this._removeClass(a,null,e.icons.activeHeader)._addClass(a,null,e.icons.header)),n)||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(t=s.children(".ui-accordion-header-icon"),this._removeClass(t,null,e.icons.header)._addClass(t,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active"))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function s(){o._toggleComplete(e)}var n,o=this,a=0,r=t.css("box-sizing"),l=t.length&&(!i.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(this.document[0].activeElement);!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active)&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),e=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(e=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-e-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault();else if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){n?(n=!1,t.preventDefault()):this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("