Browse Source

Merge pull request #610 from electerious/develop

Lychee 3.1.4
Tobias Reich 7 years ago
parent
commit
c0de7b8c63
6 changed files with 13 additions and 6 deletions
  1. 0 0
      dist/main.js
  2. 7 0
      docs/Changelog.md
  3. 1 1
      php/helpers/search.php
  4. 1 1
      src/package.json
  5. 2 2
      src/scripts/lychee.js
  6. 2 2
      src/scripts/view.js

File diff suppressed because it is too large
+ 0 - 0
dist/main.js


+ 7 - 0
docs/Changelog.md

@@ -1,3 +1,10 @@
+## v3.1.4
+
+Released August 28, 2016
+
+- `Fixed` Search stopped working because of an undefined index error (#605)
+- `Fixed` Better next/previous photo check to prevent an error when opening an album with only one photo
+
 ## v3.1.3
 
 Released August 22, 2016

+ 1 - 1
php/helpers/search.php

@@ -21,7 +21,7 @@ function search($term) {
 	 * Photos
 	 */
 
-	$query  = Database::prepare(Database::get(), "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term));
+	$query  = Database::prepare(Database::get(), "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url, medium FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term));
 	$result = Database::execute(Database::get(), $query, __METHOD__, __LINE__);
 
 	if ($result===false) return false;

+ 1 - 1
src/package.json

@@ -1,6 +1,6 @@
 {
   "name": "Lychee",
-  "version": "3.1.3",
+  "version": "3.1.4",
   "description": "Self-hosted photo-management done right.",
   "authors": "Tobias Reich <tobias@electerious.com>",
   "license": "MIT",

+ 2 - 2
src/scripts/lychee.js

@@ -6,8 +6,8 @@
 lychee = {
 
 	title           : document.title,
-	version         : '3.1.3',
-	versionCode     : '030103',
+	version         : '3.1.4',
+	versionCode     : '030104',
 
 	updatePath      : '//update.electerious.com/index.json',
 	updateURL       : 'https://github.com/electerious/Lychee',

+ 2 - 2
src/scripts/view.js

@@ -413,8 +413,8 @@ view.photo = {
 		let $nextArrow     = lychee.imageview.find('a#next')
 		let $previousArrow = lychee.imageview.find('a#previous')
 		let photoID        = photo.getID()
-		let hasNext        = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].nextPhoto!==''
-		let hasPrevious    = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].previousPhoto!==''
+		let hasNext        = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].nextPhoto!=null && album.json.content[photoID].nextPhoto!==''
+		let hasPrevious    = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].previousPhoto!=null && album.json.content[photoID].previousPhoto!==''
 
 		if (hasNext===false || lychee.viewMode===true) {
 

Some files were not shown because too many files changed in this diff