Skip to content

Commit

Permalink
Merge pull request #435 from electerious/develop
Browse files Browse the repository at this point in the history
Lychee 3.0.8
  • Loading branch information
electerious committed Dec 20, 2015
2 parents d56e34f + 6e8bafb commit c21bc9a
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 106 deletions.
8 changes: 4 additions & 4 deletions dist/main.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v3.0.8

Released December 20, 2015

- `Improved` Lychee update site now with SSL (#317)
- `Improved` Set undefined vars, remove unused vars and code that cannot be reached (Thanks @mattsches, #435)

## v3.0.7

Released November 15, 2015
Expand Down
2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<title>Lychee</title>

<meta name="author" content="Tobias Reich">
<meta name="keywords" content="">
<meta name="description" content="">

<link type="text/css" rel="stylesheet" href="dist/main.css">

Expand Down
4 changes: 2 additions & 2 deletions php/access/Guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function check($fn) {

# Error
default: exit('Error: Function not found! Please check the spelling of the called function.');
return false; break;
break;

}

Expand Down Expand Up @@ -177,4 +177,4 @@ private function getPhotoArchive() {

}

?>
?>
2 changes: 1 addition & 1 deletion php/modules/Album.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function getAll($public) {
# Execute query
$albums = $this->database->query($query);
if (!$albums) {
Log::error($database, __METHOD__, __LINE__, 'Could not get all albums (' . $database->error . ')');
Log::error($this->database, __METHOD__, __LINE__, 'Could not get all albums (' . $this->database->error . ')');
exit('Error: ' . $this->database->error);
}

Expand Down
1 change: 1 addition & 0 deletions php/modules/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ static function prepare($database, $query, $data) {
# This avoids problems with placeholders in user-input
# $skip = Number of placeholders which need to be skipped
$skip = 0;
$temp = '';
$num = array(
'placeholder' => substr_count($query, '?'),
'data' => count($data)
Expand Down
1 change: 0 additions & 1 deletion php/modules/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Import extends Module {

private $database = null;
private $settings = null;
private $albumIDs = null;

public function __construct($database, $plugins, $settings) {

Expand Down
7 changes: 1 addition & 6 deletions php/modules/Photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,6 @@ public function adjustFile($path, $info) {

if (extension_loaded('imagick')&&$this->settings['imagick']==='1') {

$rotateImage = 0;

switch ($info['orientation']) {

case 3:
Expand Down Expand Up @@ -535,7 +533,6 @@ public function adjustFile($path, $info) {
break;

case 3:
$process = true;
$sourceImg = imagerotate($sourceImg, -180, 0);
break;

Expand All @@ -552,7 +549,6 @@ public function adjustFile($path, $info) {
break;

case 6:
$process = true;
$sourceImg = imagerotate($sourceImg, -90, 0);
$newWidth = $info['height'];
$newHeight = $info['width'];
Expand All @@ -566,7 +562,6 @@ public function adjustFile($path, $info) {
break;

case 8:
$process = true;
$sourceImg = imagerotate($sourceImg, 90, 0);
$newWidth = $info['height'];
$newHeight = $info['width'];
Expand Down Expand Up @@ -1251,4 +1246,4 @@ public function delete() {

}

?>
?>
3 changes: 1 addition & 2 deletions php/modules/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public function __construct($files, $database, $settings) {
if (!isset($files)) return false;

# Init vars
$plugins = $this;
$this->files = $files;

# Load plugins
Expand Down Expand Up @@ -92,4 +91,4 @@ public function activate($action, $args) {

}

?>
?>
144 changes: 66 additions & 78 deletions src/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var gulp = require('gulp'),
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')(),
paths = {};
paths = {}

/* Error Handler -------------------------------- */

var catchError = function(err) {

console.log(err.toString());
this.emit('end');
console.log(err.toString())
this.emit('end')

}

Expand Down Expand Up @@ -38,41 +38,38 @@ paths.view = {

gulp.task('view--js', function() {

var stream =
gulp.src(paths.view.js)
.pipe(plugins.concat('_view--javascript.js', {newLine: "\n"}))
.pipe(plugins.babel({ compact: true }))
.on('error', catchError)
.pipe(gulp.dest('../dist/'));
var babel = plugins.babel({
presets: ['es2015']
})

return stream;
return gulp.src(paths.view.js)
.pipe(plugins.concat('_view--javascript.js', {newLine: "\n"}))
.pipe(babel)
.on('error', catchError)
.pipe(gulp.dest('../dist/'))

});
})

gulp.task('view--scripts', ['view--js'], function() {

var stream =
gulp.src(paths.view.scripts)
.pipe(plugins.concat('view.js', {newLine: "\n"}))
.pipe(plugins.uglify())
.on('error', catchError)
.pipe(gulp.dest('../dist/'));
return gulp.src(paths.view.scripts)
.pipe(plugins.concat('view.js', {newLine: "\n"}))
.pipe(plugins.uglify())
.on('error', catchError)
.pipe(gulp.dest('../dist/'))

return stream;

});
})

gulp.task('view--svg', function() {

var stream =
gulp.src(paths.view.php)
.pipe(plugins.inject(gulp.src(paths.view.svg), {
starttag: '<!-- inject:svg -->',
transform: function(filePath, file) { return file.contents.toString('utf8') }
}))
.pipe(gulp.dest('../'));
return gulp.src(paths.view.php)
.pipe(plugins.inject(gulp.src(paths.view.svg), {
starttag: '<!-- inject:svg -->',
transform: function(filePath, file) { return file.contents.toString('utf8') }
}))
.pipe(gulp.dest('../'))

});
})

/* Main ----------------------------------------- */

Expand Down Expand Up @@ -108,83 +105,74 @@ paths.main = {

gulp.task('main--js', function() {

var stream =
gulp.src(paths.main.js)
.pipe(plugins.concat('_main--javascript.js', {newLine: "\n"}))
.pipe(plugins.babel({ compact: true }))
.on('error', catchError)
.pipe(gulp.dest('../dist/'));
var babel = plugins.babel({
presets: ['es2015']
})

return stream;
return gulp.src(paths.main.js)
.pipe(plugins.concat('_main--javascript.js', {newLine: "\n"}))
.pipe(babel)
.on('error', catchError)
.pipe(gulp.dest('../dist/'))

});
})

gulp.task('main--scripts', ['main--js'], function() {

var stream =
gulp.src(paths.main.scripts)
.pipe(plugins.concat('main.js', {newLine: "\n"}))
.pipe(plugins.uglify())
.on('error', catchError)
.pipe(gulp.dest('../dist/'));

return stream;
return gulp.src(paths.main.scripts)
.pipe(plugins.concat('main.js', {newLine: "\n"}))
.pipe(plugins.uglify())
.on('error', catchError)
.pipe(gulp.dest('../dist/'))

});
})

gulp.task('main--styles', function() {

var stream =
gulp.src(paths.main.styles)
.pipe(plugins.sass())
.on('error', catchError)
.pipe(plugins.concat('main.css', {newLine: "\n"}))
.pipe(plugins.autoprefixer('last 4 versions', '> 5%'))
.pipe(plugins.minifyCss())
.pipe(gulp.dest('../dist/'));
return gulp.src(paths.main.styles)
.pipe(plugins.sass())
.on('error', catchError)
.pipe(plugins.concat('main.css', {newLine: "\n"}))
.pipe(plugins.autoprefixer('last 4 versions', '> 5%'))
.pipe(plugins.minifyCss())
.pipe(gulp.dest('../dist/'))

return stream;

});
})

gulp.task('main--svg', function() {

var stream =
gulp.src(paths.main.html)
.pipe(plugins.inject(gulp.src(paths.main.svg), {
starttag: '<!-- inject:svg -->',
transform: function(filePath, file) { return file.contents.toString('utf8') }
}))
.pipe(gulp.dest('../'));
return gulp.src(paths.main.html)
.pipe(plugins.inject(gulp.src(paths.main.svg), {
starttag: '<!-- inject:svg -->',
transform: function(filePath, file) { return file.contents.toString('utf8') }
}))
.pipe(gulp.dest('../'))

});
})

/* Clean ----------------------------------------- */

gulp.task('clean', function() {

var stream =
gulp.src('../dist/_*.*', { read: false })
.pipe(plugins.rimraf({ force: true }))
.on('error', catchError);

return stream;
return gulp.src('../dist/_*.*', { read: false })
.pipe(plugins.rimraf({ force: true }))
.on('error', catchError)

});
})

/* Tasks ----------------------------------------- */

gulp.task('default', ['view--svg', 'view--scripts', 'main--svg', 'main--scripts', 'main--styles'], function() {

gulp.start('clean');
gulp.start('clean')

});
})

gulp.task('watch', ['default'], function() {

gulp.watch(paths.view.js, ['view--scripts']);
gulp.watch(paths.view.js, ['view--scripts'])

gulp.watch(paths.main.js, ['main--scripts']);
gulp.watch(paths.main.scss, ['main--styles']);
gulp.watch(paths.main.js, ['main--scripts'])
gulp.watch(paths.main.scss, ['main--styles'])

});
})
9 changes: 5 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
"url": "https://github.com/electerious/Lychee.git"
},
"devDependencies": {
"babel-preset-es2015": "^6.3.13",
"basiccontext": "^3.5.0",
"basicmodal": "^3.1.7",
"basicmodal": "^3.3.0",
"gulp": "^3.9.0",
"gulp-autoprefixer": "3.1.0",
"gulp-babel": "^5.3.0",
"gulp-babel": "^6.1.1",
"gulp-concat": "^2.6.0",
"gulp-inject": "^3.0.0",
"gulp-load-plugins": "^1.1.0",
"gulp-minify-css": "^1.2.1",
"gulp-minify-css": "^1.2.2",
"gulp-rimraf": "^0.2.0",
"gulp-sass": "^2.1.0",
"gulp-sass": "^2.1.1",
"gulp-uglify": "^1.5.1",
"jquery": "^2.1.4",
"mousetrap": "^1.5.3"
Expand Down
8 changes: 4 additions & 4 deletions src/scripts/lychee.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
lychee = {

title : document.title,
version : '3.0.7',
version_code : '030007',
version : '3.0.8',
version_code : '030008',

update_path : 'http://lychee.electerious.com/version/index.php',
update_path : '//update.electerious.com/index.json',
updateURL : 'https://github.com/electerious/Lychee',
website : 'http://lychee.electerious.com',

Expand Down Expand Up @@ -233,7 +233,7 @@ lychee.getUpdate = function() {

$.ajax({
url : lychee.update_path,
success : function(data) { if (parseInt(data)>parseInt(lychee.version_code)) $('.version span').show() }
success : function(data) { if (data.lychee.version>parseInt(lychee.version_code)) $('.version span').show() },
})

}
Expand Down
2 changes: 0 additions & 2 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<title>Lychee</title>

<meta name="author" content="Tobias Reich">
<meta name="keywords" content="">
<meta name="description" content="">

<!-- CSS -->
<link type="text/css" rel="stylesheet" href="dist/main.css">
Expand Down

0 comments on commit c21bc9a

Please sign in to comment.