Browse Source

Merge pull request #363 from electerious/develop

v3.0.2
Tobias Reich 9 years ago
parent
commit
d8f3a7839c
9 changed files with 45 additions and 30 deletions
  1. 1 1
      README.md
  2. 0 0
      dist/main.css
  3. 0 0
      dist/main.js
  4. 9 1
      docs/Changelog.md
  5. 1 1
      docs/Installation.md
  6. 15 9
      php/modules/misc.php
  7. 11 10
      plugins/check/index.php
  8. 4 4
      src/package.json
  9. 4 4
      src/scripts/lychee.js

+ 1 - 1
README.md

@@ -1,6 +1,6 @@
 # Lychee
 
-#### A great looking and easy-to-use Photo-Management-System.
+#### A great looking and easy-to-use photo-management-system.
 
 ![Lychee](http://l.electerious.com/uploads/big/c4b58cb87d95aeaed78fdca581cc908c.jpg)
 ![Lychee](http://l.electerious.com/uploads/big/075ac5de5b5d6c593acbb700f0e1d739.jpg)

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


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


+ 9 - 1
docs/Changelog.md

@@ -1,9 +1,17 @@
+## v3.0.2
+
+Released June 13, 2015
+
+- `Improved` Permission errors are now easier to understand (#351)
+- `Improved` Escape data from database before inserting into `view.php`
+- `Fixed` PHP-version-check now requires PHP >= 5.3 like written in the docs
+
 ## v3.0.1
 
 Released May 24, 2015
 
 - `New` Album Sorting (Thanks @ophian, #98)
-- `New` Identifier to prevent login of multiple instances of lychee (#344)
+- `New` Identifier to prevent login of multiple Lychee-instances (#344)
 - `Improved` Albums and photos now can have a title with up to 50 chars (#332)
 - `Fixed` Removing last Tag from photo not possible in Firefox (#269)
 

+ 1 - 1
docs/Installation.md

@@ -25,7 +25,7 @@ You can also use the [direct download](https://github.com/electerious/Lychee/arc
 
 ### 3. Permissions
 
-Change the permissions of `uploads/` and `data/` to 777, including all subfolders:
+Change the permissions of `uploads/`, `data/` and all their subfolders. Sufficient read/write privileges are reqiured.
 
 	chmod -R 777 uploads/ data/
 

+ 15 - 9
php/modules/misc.php

@@ -89,21 +89,27 @@ function getGraphHeader($database, $photoID) {
 	$url		= $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . '?' . $parseUrl['query'];
 	$picture	= $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . '/../uploads/' . $dir . '/' . $row->url;
 
+	$url		= htmlentities($url);
+	$picture	= htmlentities($picture);
+
+	$row->title			= htmlentities($row->title);
+	$row->description	= htmlentities($row->description);
+
 	$return = '<!-- General Meta Data -->';
-	$return .= '<meta name="title" content="'.$row->title.'">';
-	$return .= '<meta name="description" content="'.$row->description.' - via Lychee">';
-	$return .= '<link rel="image_src" type="image/jpeg" href="'.$picture.'">';
+	$return .= '<meta name="title" content="' . $row->title . '">';
+	$return .= '<meta name="description" content="' . $row->description . ' - via Lychee">';
+	$return .= '<link rel="image_src" type="image/jpeg" href="' . $picture . '">';
 
 	$return .= '<!-- Twitter Meta Data -->';
 	$return .= '<meta name="twitter:card" content="photo">';
-	$return .= '<meta name="twitter:title" content="'.$row->title.'">';
-	$return .= '<meta name="twitter:image:src" content="'.$picture.'">';
+	$return .= '<meta name="twitter:title" content="' . $row->title . '">';
+	$return .= '<meta name="twitter:image:src" content="' . $picture . '">';
 
 	$return .= '<!-- Facebook Meta Data -->';
-	$return .= '<meta property="og:title" content="'.$row->title.'">';
-	$return .= '<meta property="og:image" content="'.$picture.'">';
-	$return .= '<meta property="og:description" content="'.$row->description.' - via Lychee">';
-	$return .= '<meta property="og:url" content="'.$url.'">';
+	$return .= '<meta property="og:title" content="' . $row->title . '">';
+	$return .= '<meta property="og:description" content="' . $row->description . ' - via Lychee">';
+	$return .= '<meta property="og:image" content="' . $picture . '">';
+	$return .= '<meta property="og:url" content="' . $url . '">';
 
 	return $return;
 

+ 11 - 10
plugins/check/index.php

@@ -26,7 +26,7 @@ echo('Diagnostics' . PHP_EOL);
 echo('-----------' . PHP_EOL);
 
 # PHP Version
-if (floatval(phpversion())<5.2)		$error .= ('Error: Upgrade to PHP 5.2 or higher!' . PHP_EOL);
+if (floatval(phpversion())<5.3)		$error .= ('Error: Upgrade to PHP 5.3 or higher' . PHP_EOL);
 
 # Extensions
 if (!extension_loaded('session'))	$error .= ('Error: PHP session extension not activated' . PHP_EOL);
@@ -38,15 +38,15 @@ if (!extension_loaded('json'))		$error .= ('Error: PHP json extension not activa
 if (!extension_loaded('zip'))		$error .= ('Error: PHP zip extension not activated' . PHP_EOL);
 
 # Permissions
-if (hasPermissions(LYCHEE_UPLOADS_BIG)===false)			$error .= ('Error: \'uploads/big\' missing or not readable and writable (777 required)' . PHP_EOL);
-if (hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false)		$error .= ('Error: \'uploads/medium\' missing or not readable and writable (777 required)' . PHP_EOL);
-if (hasPermissions(LYCHEE_UPLOADS_THUMB)===false)		$error .= ('Error: \'uploads/thumb\' missing or not readable and writable (777 required)' . PHP_EOL);
-if (hasPermissions(LYCHEE_UPLOADS_IMPORT)===false)		$error .= ('Error: \'uploads/import\' missing or not readable and writable (777 required)' . PHP_EOL);
-if (hasPermissions(LYCHEE_UPLOADS)===false)				$error .= ('Error: \'uploads/\' missing or not readable and writable (777 required)' . PHP_EOL);
-if (hasPermissions(LYCHEE_DATA)===false)				$error .= ('Error: \'data/\' missing or not readable and writable (777 required)' . PHP_EOL);
+if (hasPermissions(LYCHEE_UPLOADS_BIG)===false)			$error .= ('Error: \'uploads/big\' is missing or has insufficient read/write privileges' . PHP_EOL);
+if (hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false)		$error .= ('Error: \'uploads/medium\' is missing or has insufficient read/write privileges' . PHP_EOL);
+if (hasPermissions(LYCHEE_UPLOADS_THUMB)===false)		$error .= ('Error: \'uploads/thumb\' is missing or has insufficient read/write privileges' . PHP_EOL);
+if (hasPermissions(LYCHEE_UPLOADS_IMPORT)===false)		$error .= ('Error: \'uploads/import\' is missing or has insufficient read/write privileges' . PHP_EOL);
+if (hasPermissions(LYCHEE_UPLOADS)===false)				$error .= ('Error: \'uploads/\' is missing or has insufficient read/write privileges' . PHP_EOL);
+if (hasPermissions(LYCHEE_DATA)===false)				$error .= ('Error: \'data/\' is missing or has insufficient read/write privileges' . PHP_EOL);
 
 # Load config
-if (!file_exists(LYCHEE_CONFIG_FILE))	exit('Error: Configuration not found. Please install Lychee for additional tests.');
+if (!file_exists(LYCHEE_CONFIG_FILE))	exit('Error: Configuration not found. Please install Lychee for additional tests');
 else									require(LYCHEE_CONFIG_FILE);
 
 # Define the table prefix
@@ -71,13 +71,14 @@ if (!isset($dbHost)||$dbHost==='')	$error .= ('Error: No property for $dbHost in
 if (!isset($settings['username'])||$settings['username']=='')			$error .= ('Error: Username empty or not set in database' . PHP_EOL);
 if (!isset($settings['password'])||$settings['password']=='')			$error .= ('Error: Password empty or not set in database' . PHP_EOL);
 if (!isset($settings['thumbQuality'])||$settings['thumbQuality']=='')	$error .= ('Error: No or wrong property for thumbQuality in database' . PHP_EOL);
-if (!isset($settings['sorting'])||$settings['sorting']=='')				$error .= ('Error: Wrong property for sorting in database' . PHP_EOL);
+if (!isset($settings['sortingPhotos'])||$settings['sortingPhotos']=='')	$error .= ('Error: Wrong property for sortingPhotos in database' . PHP_EOL);
+if (!isset($settings['sortingAlbums'])||$settings['sortingAlbums']=='')	$error .= ('Error: Wrong property for sortingAlbums in database' . PHP_EOL);
 if (!isset($settings['plugins']))										$error .= ('Error: No property for plugins in database' . PHP_EOL);
 if (!isset($settings['imagick'])||$settings['imagick']=='')				$error .= ('Error: No or wrong property for imagick in database' . PHP_EOL);
 if (!isset($settings['checkForUpdates'])||($settings['checkForUpdates']!='0'&&$settings['checkForUpdates']!='1')) $error .= ('Error: No or wrong property for checkForUpdates in database' . PHP_EOL);
 
 # Check dropboxKey
-if (!$settings['dropboxKey']) echo('Warning: Dropbox import not working. No property for dropboxKey.' . PHP_EOL);
+if (!$settings['dropboxKey']) echo('Warning: Dropbox import not working. No property for dropboxKey' . PHP_EOL);
 
 # Check php.ini Settings
 if (ini_get('max_execution_time')<200&&ini_set('upload_max_filesize', '20M')===false) echo('Warning: You may experience problems when uploading a large amount of photos. Take a look in the FAQ for details.' . PHP_EOL);

+ 4 - 4
src/package.json

@@ -1,6 +1,6 @@
 {
   "name": "Lychee",
-  "version": "3.0.1",
+  "version": "3.0.2",
   "description": "Self-hosted photo-management done right.",
   "authors": "Tobias Reich <tobias@electerious.com>",
   "license": "MIT",
@@ -10,13 +10,13 @@
     "url": "https://github.com/electerious/Lychee.git"
   },
   "devDependencies": {
-    "gulp": "^3.8.11",
-    "gulp-autoprefixer": "2.2.0",
+    "gulp": "^3.9.0",
+    "gulp-autoprefixer": "2.3.1",
     "gulp-babel": "^5.1.0",
     "gulp-concat": "^2.5.2",
     "gulp-inject": "^1.2.0",
     "gulp-load-plugins": "^0.10.0",
-    "gulp-minify-css": "^1.1.1",
+    "gulp-minify-css": "^1.1.5",
     "gulp-rimraf": "^0.1.1",
     "gulp-sass": "^2.0.1",
     "gulp-uglify": "^1.2.0"

+ 4 - 4
src/scripts/lychee.js

@@ -6,8 +6,8 @@
 lychee = {
 
 	title:			document.title,
-	version:		'3.0.1',
-	version_code:	'030001',
+	version:		'3.0.2',
+	version_code:	'030002',
 
 	update_path:	'http://lychee.electerious.com/version/index.php',
 	updateURL:		'https://github.com/electerious/Lychee',
@@ -127,8 +127,8 @@ lychee.loginDialog = function() {
 
 	msg =	`
 			<p class='signIn'>
-				<input class='text' data-name='username' type='text' value='' placeholder='username' autocapitalize='off' autocorrect='off'>
-				<input class='text' data-name='password' type='password' value='' placeholder='password'>
+				<input class='text' name='username' autocomplete='username' data-name='username' type='text' value='' placeholder='username' autocapitalize='off' autocorrect='off'>
+				<input class='text' name='password' autocomplete='current-password' data-name='password' type='password' value='' placeholder='password'>
 			</p>
 			<p class='version'>Lychee ${ lychee.version }<span> &#8211; <a target='_blank' href='${ lychee.updateURL }'>Update available!</a><span></p>
 			`

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