]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #760 from ArthurHoaro/plugins/addlink-css-404
authorArthurHoaro <arthur@hoa.ro>
Mon, 16 Jan 2017 11:39:24 +0000 (12:39 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Jan 2017 11:39:24 +0000 (12:39 +0100)
Remove CSS call for addlink toolbar plugin

CHANGELOG.md
index.php

index d3ecc1e61a9c2d9e8825d81c84b82f9994d49281..d2d631667e42dca9bb2095236b1c60ef4e0c1940 100644 (file)
@@ -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
index beb1cbca592aefae1071254c9ab95c04ea635526..8055a7b7bde78bfe06f290ce58ec0a647313ab57 100644 (file)
--- 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 '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode($_POST['totag']).'\';</script>';
+            echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode(escape($_POST['totag'])).'\';</script>';
             exit;
         }
     }