Version push to 2.1.1 and sort by takedate and taketime (that's for you @GustavePate, #98)
This commit is contained in:
parent
7de8b3074c
commit
2dd6613118
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@
|
||||
|
||||
var lychee = {
|
||||
|
||||
version: "2.1",
|
||||
version: "2.1.1",
|
||||
|
||||
api_path: "php/api.php",
|
||||
update_path: "http://lychee.electerious.com/version/index.php",
|
||||
|
@ -216,6 +216,7 @@ var settings = {
|
||||
"Sort photos by \
|
||||
<select id='settings_type'> \
|
||||
<option value='id'>Upload Time</option> \
|
||||
<option value='take'>Take Date</option> \
|
||||
<option value='title'>Title</option> \
|
||||
<option value='description'>Description</option> \
|
||||
<option value='public'>Public</option> \
|
||||
@ -231,7 +232,11 @@ var settings = {
|
||||
", buttons);
|
||||
|
||||
if (lychee.sorting!=="") {
|
||||
sorting = lychee.sorting.replace("ORDER BY ", "").replace(" ", ";").split(";");
|
||||
sorting = lychee.sorting.replace("ORDER BY ", "").split(" ");
|
||||
|
||||
// Special parsing
|
||||
if (sorting[0]==='UNIX_TIMESTAMP(STR_TO_DATE(CONCAT(takedate,"-",taketime),"%d.%m.%Y-%H:%i:%S"))') sorting[0] = "take";
|
||||
|
||||
$("select#settings_type").val(sorting[0]);
|
||||
$("select#settings_order").val(sorting[1]);
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
## v2.1.1
|
||||
|
||||
Released March 20, 2014
|
||||
|
||||
- `New` Delete albums with cmd + backspace
|
||||
- `New` Using iOS 7.1 minimal-ui
|
||||
- `Improved` Faster loading of single photos
|
||||
- `Improved` Faster and snappier animations
|
||||
- `Improved` Better dialog when clearing Unsorted
|
||||
- `Fixed` Warning when uploading images without EXIF-Data
|
||||
- `Fixed` Close upload on error
|
||||
|
||||
## v2.1
|
||||
|
||||
Released March 4, 2014
|
||||
|
@ -85,19 +85,18 @@ function update($version = '') {
|
||||
global $database, $configVersion;
|
||||
|
||||
// Albums
|
||||
if(!$database->query("SELECT `public` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` ADD `public` TINYINT( 1 ) NOT NULL DEFAULT '0'");
|
||||
if(!$database->query("SELECT `password` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` ADD `password` VARCHAR( 100 ) NULL DEFAULT ''");
|
||||
if(!$database->query("SELECT `description` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` ADD `description` VARCHAR( 1000 ) NULL DEFAULT ''");
|
||||
if($database->query("SELECT `password` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` CHANGE `password` `password` VARCHAR( 100 ) NULL DEFAULT ''");
|
||||
if(!$database->query("SELECT `description` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` ADD `description` VARCHAR( 1000 ) NULL DEFAULT ''"); // v2.0
|
||||
if($database->query("SELECT `password` FROM `lychee_albums` LIMIT 1;")) $database->query("ALTER TABLE `lychee_albums` CHANGE `password` `password` VARCHAR( 100 ) NULL DEFAULT ''"); // v2.0
|
||||
|
||||
// Photos
|
||||
if($database->query("SELECT `description` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` CHANGE `description` `description` VARCHAR( 1000 ) NULL DEFAULT ''");
|
||||
if(!$database->query("SELECT `tags` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` ADD `tags` VARCHAR( 1000 ) NULL DEFAULT ''");
|
||||
if($database->query("SELECT `description` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` CHANGE `description` `description` VARCHAR( 1000 ) NULL DEFAULT ''"); // v2.0
|
||||
if(!$database->query("SELECT `tags` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` ADD `tags` VARCHAR( 1000 ) NULL DEFAULT ''"); // v2.1
|
||||
$database->query("UPDATE `lychee_photos` SET url = replace(url, 'uploads/big/', ''), thumbUrl = replace(thumbUrl, 'uploads/thumb/', '')");
|
||||
|
||||
// Settings
|
||||
$database->query("ALTER TABLE `lychee_settings` CHANGE `value` `value` VARCHAR( 200 ) NULL DEFAULT ''"); // v2.1.1
|
||||
$result = $database->query("SELECT `key` FROM `lychee_settings` WHERE `key` = 'dropboxKey' LIMIT 1;");
|
||||
if ($result->num_rows===0) $database->query("INSERT INTO `lychee_settings` (`key`, `value`) VALUES ('dropboxKey', '')");
|
||||
if ($result->num_rows===0) $database->query("INSERT INTO `lychee_settings` (`key`, `value`) VALUES ('dropboxKey', '')"); // v2.1
|
||||
|
||||
// Config
|
||||
if ($version!==''&&$configVersion!==$version) {
|
||||
|
@ -105,7 +105,10 @@ function setSorting($type, $order) {
|
||||
case 'star': $sorting .= 'star';
|
||||
break;
|
||||
|
||||
default: exit('Error: Unknown type for sorting!');
|
||||
case 'take': $sorting .= 'UNIX_TIMESTAMP(STR_TO_DATE(CONCAT(takedate,"-",taketime),"%d.%m.%Y-%H:%i:%S"))';
|
||||
break;
|
||||
|
||||
default: exit('Error: Unknown type for sorting!');
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user