From: ArthurHoaro Date: Mon, 16 Jan 2017 11:39:24 +0000 (+0100) Subject: Merge pull request #760 from ArthurHoaro/plugins/addlink-css-404 X-Git-Tag: v0.9.0~63 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=514185e14b09d1e37c41eb5d2720e3e45b12eea9;hp=053673cb71a45a38a2eb517c4e630656a5626327;p=github%2Fshaarli%2FShaarli.git Merge pull request #760 from ArthurHoaro/plugins/addlink-css-404 Remove CSS call for addlink toolbar plugin --- diff --git a/CHANGELOG.md b/CHANGELOG.md index d3ecc1e6..d2d63166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,18 +7,50 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [v0.9.0](https://github.com/shaarli/Shaarli/releases/tag/v0.9.0) - UNPUBLISHED +This release introduces the REST API, and requires updating HTTP server +configuration to enable URL rewriting, see: +- https://shaarli.github.io/api-documentation/ +- https://github.com/shaarli/Shaarli/wiki/Server-configuration + **WARNING**: Shaarli now requires PHP 5.5+. ### Added - -- REST API: see [Shaarli API documentation](http://shaarli.github.io/api-documentation/) -- The theme can now be selected in the administration page. +- REST API v1 + - [Slim](https://www.slimframework.com/) framework + - [JSON Web Token](https://jwt.io/introduction/) (JWT) authentication + - versioned API endpoints: + - `/api/v1/info`: get general information on the Shaarli instance + - `/api/v1/links`: get a list of shaared links +- Allow selecting themes/templates from the configuration page +- Add plugin placeholders to Atom/RSS feed templates +- Add OpenSearch to feed templates +- Add `campaign_` to the URL cleanup pattern list +- Add an AUTHORS file and Makefile target to list authors from Git commit data ### Changed +- Docker: enable nginx URL rewriting for the REST API +- Move `user.css` to the `data` folder +- Move default template files to a subfolder (`default`) +- Move PubSubHub to a dedicated plugin +- Coding style: + - explicit method visibility + - safe boolean comparisons + - remove unused variables +- The updater now keeps custom theme preferences +- Simplify the COPYING information -- Default template files are moved to a subfolder (`default`). + +### Removed +- PHP < 5.5 compatibility ### Fixed +- Ignore generated release tarballs +- Hide default port when behind a reverse proxy +- Fix a typo in the Markdown plugin description +- Fix the presence of empty tags for private tags and in search results +- Fix a fatal error during the install +- Fix permalink image alignment in daily page +- Fix the delete button in `editlink` ## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - 2016-12-12 diff --git a/index.php b/index.php index beb1cbca..8055a7b7 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ * * Licence: http://www.opensource.org/licenses/zlib-license.php * - * Requires: PHP 5.3.x + * Requires: PHP 5.5.x */ // Set 'UTC' as the default timezone if it is not defined in php.ini @@ -83,7 +83,7 @@ use \Shaarli\ThemeUtils; // Ensure the PHP version is supported try { - ApplicationUtils::checkPHPVersion('5.3', PHP_VERSION); + ApplicationUtils::checkPHPVersion('5.5', PHP_VERSION); } catch(Exception $exc) { header('Content-Type: text/plain; charset=utf-8'); echo $exc->getMessage(); @@ -1207,15 +1207,15 @@ function renderPage($conf, $pluginManager, $LINKSDB) $needle = trim($_POST['fromtag']); // True for case-sensitive tag search. $linksToAlter = $LINKSDB->filterSearch(array('searchtags' => $needle), true); - foreach($linksToAlter as $key=>$value) - { - $tags = explode(' ',trim($value['tags'])); - $tags[array_search($needle,$tags)] = trim($_POST['totag']); // Replace tags value. - $value['tags']=trim(implode(' ',$tags)); - $LINKSDB[$key]=$value; + foreach($linksToAlter as $key=>$value) { + $tags = preg_split('/\s+/', trim($value['tags'])); + // Replace tags value. + $tags[array_search($needle, $tags)] = trim($_POST['totag']); + $value['tags'] = implode(' ', array_unique($tags)); + $LINKSDB[$key] = $value; } $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk. - echo ''; + echo ''; exit; } }