aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md40
-rw-r--r--index.php18
2 files changed, 45 insertions, 13 deletions
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/).
7 7
8## [v0.9.0](https://github.com/shaarli/Shaarli/releases/tag/v0.9.0) - UNPUBLISHED 8## [v0.9.0](https://github.com/shaarli/Shaarli/releases/tag/v0.9.0) - UNPUBLISHED
9 9
10This release introduces the REST API, and requires updating HTTP server
11configuration to enable URL rewriting, see:
12- https://shaarli.github.io/api-documentation/
13- https://github.com/shaarli/Shaarli/wiki/Server-configuration
14
10**WARNING**: Shaarli now requires PHP 5.5+. 15**WARNING**: Shaarli now requires PHP 5.5+.
11 16
12### Added 17### Added
13 18- REST API v1
14- REST API: see [Shaarli API documentation](http://shaarli.github.io/api-documentation/) 19 - [Slim](https://www.slimframework.com/) framework
15- The theme can now be selected in the administration page. 20 - [JSON Web Token](https://jwt.io/introduction/) (JWT) authentication
21 - versioned API endpoints:
22 - `/api/v1/info`: get general information on the Shaarli instance
23 - `/api/v1/links`: get a list of shaared links
24- Allow selecting themes/templates from the configuration page
25- Add plugin placeholders to Atom/RSS feed templates
26- Add OpenSearch to feed templates
27- Add `campaign_` to the URL cleanup pattern list
28- Add an AUTHORS file and Makefile target to list authors from Git commit data
16 29
17### Changed 30### Changed
31- Docker: enable nginx URL rewriting for the REST API
32- Move `user.css` to the `data` folder
33- Move default template files to a subfolder (`default`)
34- Move PubSubHub to a dedicated plugin
35- Coding style:
36 - explicit method visibility
37 - safe boolean comparisons
38 - remove unused variables
39- The updater now keeps custom theme preferences
40- Simplify the COPYING information
18 41
19- Default template files are moved to a subfolder (`default`). 42
43### Removed
44- PHP < 5.5 compatibility
20 45
21### Fixed 46### Fixed
47- Ignore generated release tarballs
48- Hide default port when behind a reverse proxy
49- Fix a typo in the Markdown plugin description
50- Fix the presence of empty tags for private tags and in search results
51- Fix a fatal error during the install
52- Fix permalink image alignment in daily page
53- Fix the delete button in `editlink`
22 54
23 55
24## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - 2016-12-12 56## [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 @@
13 * 13 *
14 * Licence: http://www.opensource.org/licenses/zlib-license.php 14 * Licence: http://www.opensource.org/licenses/zlib-license.php
15 * 15 *
16 * Requires: PHP 5.3.x 16 * Requires: PHP 5.5.x
17 */ 17 */
18 18
19// Set 'UTC' as the default timezone if it is not defined in php.ini 19// Set 'UTC' as the default timezone if it is not defined in php.ini
@@ -83,7 +83,7 @@ use \Shaarli\ThemeUtils;
83 83
84// Ensure the PHP version is supported 84// Ensure the PHP version is supported
85try { 85try {
86 ApplicationUtils::checkPHPVersion('5.3', PHP_VERSION); 86 ApplicationUtils::checkPHPVersion('5.5', PHP_VERSION);
87} catch(Exception $exc) { 87} catch(Exception $exc) {
88 header('Content-Type: text/plain; charset=utf-8'); 88 header('Content-Type: text/plain; charset=utf-8');
89 echo $exc->getMessage(); 89 echo $exc->getMessage();
@@ -1207,15 +1207,15 @@ function renderPage($conf, $pluginManager, $LINKSDB)
1207 $needle = trim($_POST['fromtag']); 1207 $needle = trim($_POST['fromtag']);
1208 // True for case-sensitive tag search. 1208 // True for case-sensitive tag search.
1209 $linksToAlter = $LINKSDB->filterSearch(array('searchtags' => $needle), true); 1209 $linksToAlter = $LINKSDB->filterSearch(array('searchtags' => $needle), true);
1210 foreach($linksToAlter as $key=>$value) 1210 foreach($linksToAlter as $key=>$value) {
1211 { 1211 $tags = preg_split('/\s+/', trim($value['tags']));
1212 $tags = explode(' ',trim($value['tags'])); 1212 // Replace tags value.
1213 $tags[array_search($needle,$tags)] = trim($_POST['totag']); // Replace tags value. 1213 $tags[array_search($needle, $tags)] = trim($_POST['totag']);
1214 $value['tags']=trim(implode(' ',$tags)); 1214 $value['tags'] = implode(' ', array_unique($tags));
1215 $LINKSDB[$key]=$value; 1215 $LINKSDB[$key] = $value;
1216 } 1216 }
1217 $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk. 1217 $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk.
1218 echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode($_POST['totag']).'\';</script>'; 1218 echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode(escape($_POST['totag'])).'\';</script>';
1219 exit; 1219 exit;
1220 } 1220 }
1221 } 1221 }