Skip to content

Commit c21bc9a

Browse files
committed
Merge pull request #435 from electerious/develop
Lychee 3.0.8
2 parents d56e34f + 6e8bafb commit c21bc9a

File tree

13 files changed

+92
-106
lines changed

13 files changed

+92
-106
lines changed

dist/main.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Changelog.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v3.0.8
2+
3+
Released December 20, 2015
4+
5+
- `Improved` Lychee update site now with SSL (#317)
6+
- `Improved` Set undefined vars, remove unused vars and code that cannot be reached (Thanks @mattsches, #435)
7+
18
## v3.0.7
29

310
Released November 15, 2015

index.html

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<title>Lychee</title>
77

88
<meta name="author" content="Tobias Reich">
9-
<meta name="keywords" content="">
10-
<meta name="description" content="">
119

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

php/access/Guest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function check($fn) {
3333

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

3838
}
3939

@@ -177,4 +177,4 @@ private function getPhotoArchive() {
177177

178178
}
179179

180-
?>
180+
?>

php/modules/Album.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function getAll($public) {
195195
# Execute query
196196
$albums = $this->database->query($query);
197197
if (!$albums) {
198-
Log::error($database, __METHOD__, __LINE__, 'Could not get all albums (' . $database->error . ')');
198+
Log::error($this->database, __METHOD__, __LINE__, 'Could not get all albums (' . $this->database->error . ')');
199199
exit('Error: ' . $this->database->error);
200200
}
201201

php/modules/Database.php

+1
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ static function prepare($database, $query, $data) {
277277
# This avoids problems with placeholders in user-input
278278
# $skip = Number of placeholders which need to be skipped
279279
$skip = 0;
280+
$temp = '';
280281
$num = array(
281282
'placeholder' => substr_count($query, '?'),
282283
'data' => count($data)

php/modules/Import.php

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class Import extends Module {
1111

1212
private $database = null;
1313
private $settings = null;
14-
private $albumIDs = null;
1514

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

php/modules/Photo.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,6 @@ public function adjustFile($path, $info) {
486486

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

489-
$rotateImage = 0;
490-
491489
switch ($info['orientation']) {
492490

493491
case 3:
@@ -535,7 +533,6 @@ public function adjustFile($path, $info) {
535533
break;
536534

537535
case 3:
538-
$process = true;
539536
$sourceImg = imagerotate($sourceImg, -180, 0);
540537
break;
541538

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

554551
case 6:
555-
$process = true;
556552
$sourceImg = imagerotate($sourceImg, -90, 0);
557553
$newWidth = $info['height'];
558554
$newHeight = $info['width'];
@@ -566,7 +562,6 @@ public function adjustFile($path, $info) {
566562
break;
567563

568564
case 8:
569-
$process = true;
570565
$sourceImg = imagerotate($sourceImg, 90, 0);
571566
$newWidth = $info['height'];
572567
$newHeight = $info['width'];
@@ -1251,4 +1246,4 @@ public function delete() {
12511246

12521247
}
12531248

1254-
?>
1249+
?>

php/modules/Plugins.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function __construct($files, $database, $settings) {
2020
if (!isset($files)) return false;
2121

2222
# Init vars
23-
$plugins = $this;
2423
$this->files = $files;
2524

2625
# Load plugins
@@ -92,4 +91,4 @@ public function activate($action, $args) {
9291

9392
}
9493

95-
?>
94+
?>

src/gulpfile.js

+66-78
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
var gulp = require('gulp'),
1+
var gulp = require('gulp'),
22
plugins = require('gulp-load-plugins')(),
3-
paths = {};
3+
paths = {}
44

55
/* Error Handler -------------------------------- */
66

77
var catchError = function(err) {
88

9-
console.log(err.toString());
10-
this.emit('end');
9+
console.log(err.toString())
10+
this.emit('end')
1111

1212
}
1313

@@ -38,41 +38,38 @@ paths.view = {
3838

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

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

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

50-
});
51+
})
5152

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

54-
var stream =
55-
gulp.src(paths.view.scripts)
56-
.pipe(plugins.concat('view.js', {newLine: "\n"}))
57-
.pipe(plugins.uglify())
58-
.on('error', catchError)
59-
.pipe(gulp.dest('../dist/'));
55+
return gulp.src(paths.view.scripts)
56+
.pipe(plugins.concat('view.js', {newLine: "\n"}))
57+
.pipe(plugins.uglify())
58+
.on('error', catchError)
59+
.pipe(gulp.dest('../dist/'))
6060

61-
return stream;
62-
63-
});
61+
})
6462

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

67-
var stream =
68-
gulp.src(paths.view.php)
69-
.pipe(plugins.inject(gulp.src(paths.view.svg), {
70-
starttag: '<!-- inject:svg -->',
71-
transform: function(filePath, file) { return file.contents.toString('utf8') }
72-
}))
73-
.pipe(gulp.dest('../'));
65+
return gulp.src(paths.view.php)
66+
.pipe(plugins.inject(gulp.src(paths.view.svg), {
67+
starttag: '<!-- inject:svg -->',
68+
transform: function(filePath, file) { return file.contents.toString('utf8') }
69+
}))
70+
.pipe(gulp.dest('../'))
7471

75-
});
72+
})
7673

7774
/* Main ----------------------------------------- */
7875

@@ -108,83 +105,74 @@ paths.main = {
108105

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

111-
var stream =
112-
gulp.src(paths.main.js)
113-
.pipe(plugins.concat('_main--javascript.js', {newLine: "\n"}))
114-
.pipe(plugins.babel({ compact: true }))
115-
.on('error', catchError)
116-
.pipe(gulp.dest('../dist/'));
108+
var babel = plugins.babel({
109+
presets: ['es2015']
110+
})
117111

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

120-
});
118+
})
121119

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

124-
var stream =
125-
gulp.src(paths.main.scripts)
126-
.pipe(plugins.concat('main.js', {newLine: "\n"}))
127-
.pipe(plugins.uglify())
128-
.on('error', catchError)
129-
.pipe(gulp.dest('../dist/'));
130-
131-
return stream;
122+
return gulp.src(paths.main.scripts)
123+
.pipe(plugins.concat('main.js', {newLine: "\n"}))
124+
.pipe(plugins.uglify())
125+
.on('error', catchError)
126+
.pipe(gulp.dest('../dist/'))
132127

133-
});
128+
})
134129

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

137-
var stream =
138-
gulp.src(paths.main.styles)
139-
.pipe(plugins.sass())
140-
.on('error', catchError)
141-
.pipe(plugins.concat('main.css', {newLine: "\n"}))
142-
.pipe(plugins.autoprefixer('last 4 versions', '> 5%'))
143-
.pipe(plugins.minifyCss())
144-
.pipe(gulp.dest('../dist/'));
132+
return gulp.src(paths.main.styles)
133+
.pipe(plugins.sass())
134+
.on('error', catchError)
135+
.pipe(plugins.concat('main.css', {newLine: "\n"}))
136+
.pipe(plugins.autoprefixer('last 4 versions', '> 5%'))
137+
.pipe(plugins.minifyCss())
138+
.pipe(gulp.dest('../dist/'))
145139

146-
return stream;
147-
148-
});
140+
})
149141

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

152-
var stream =
153-
gulp.src(paths.main.html)
154-
.pipe(plugins.inject(gulp.src(paths.main.svg), {
155-
starttag: '<!-- inject:svg -->',
156-
transform: function(filePath, file) { return file.contents.toString('utf8') }
157-
}))
158-
.pipe(gulp.dest('../'));
144+
return gulp.src(paths.main.html)
145+
.pipe(plugins.inject(gulp.src(paths.main.svg), {
146+
starttag: '<!-- inject:svg -->',
147+
transform: function(filePath, file) { return file.contents.toString('utf8') }
148+
}))
149+
.pipe(gulp.dest('../'))
159150

160-
});
151+
})
161152

162153
/* Clean ----------------------------------------- */
163154

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

166-
var stream =
167-
gulp.src('../dist/_*.*', { read: false })
168-
.pipe(plugins.rimraf({ force: true }))
169-
.on('error', catchError);
170-
171-
return stream;
157+
return gulp.src('../dist/_*.*', { read: false })
158+
.pipe(plugins.rimraf({ force: true }))
159+
.on('error', catchError)
172160

173-
});
161+
})
174162

175163
/* Tasks ----------------------------------------- */
176164

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

179-
gulp.start('clean');
167+
gulp.start('clean')
180168

181-
});
169+
})
182170

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

185-
gulp.watch(paths.view.js, ['view--scripts']);
173+
gulp.watch(paths.view.js, ['view--scripts'])
186174

187-
gulp.watch(paths.main.js, ['main--scripts']);
188-
gulp.watch(paths.main.scss, ['main--styles']);
175+
gulp.watch(paths.main.js, ['main--scripts'])
176+
gulp.watch(paths.main.scss, ['main--styles'])
189177

190-
});
178+
})

src/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
"url": "https://github.com/electerious/Lychee.git"
1111
},
1212
"devDependencies": {
13+
"babel-preset-es2015": "^6.3.13",
1314
"basiccontext": "^3.5.0",
14-
"basicmodal": "^3.1.7",
15+
"basicmodal": "^3.3.0",
1516
"gulp": "^3.9.0",
1617
"gulp-autoprefixer": "3.1.0",
17-
"gulp-babel": "^5.3.0",
18+
"gulp-babel": "^6.1.1",
1819
"gulp-concat": "^2.6.0",
1920
"gulp-inject": "^3.0.0",
2021
"gulp-load-plugins": "^1.1.0",
21-
"gulp-minify-css": "^1.2.1",
22+
"gulp-minify-css": "^1.2.2",
2223
"gulp-rimraf": "^0.2.0",
23-
"gulp-sass": "^2.1.0",
24+
"gulp-sass": "^2.1.1",
2425
"gulp-uglify": "^1.5.1",
2526
"jquery": "^2.1.4",
2627
"mousetrap": "^1.5.3"

src/scripts/lychee.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
lychee = {
77

88
title : document.title,
9-
version : '3.0.7',
10-
version_code : '030007',
9+
version : '3.0.8',
10+
version_code : '030008',
1111

12-
update_path : 'http://lychee.electerious.com/version/index.php',
12+
update_path : '//update.electerious.com/index.json',
1313
updateURL : 'https://github.com/electerious/Lychee',
1414
website : 'http://lychee.electerious.com',
1515

@@ -233,7 +233,7 @@ lychee.getUpdate = function() {
233233

234234
$.ajax({
235235
url : lychee.update_path,
236-
success : function(data) { if (parseInt(data)>parseInt(lychee.version_code)) $('.version span').show() }
236+
success : function(data) { if (data.lychee.version>parseInt(lychee.version_code)) $('.version span').show() },
237237
})
238238

239239
}

view.php

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<title>Lychee</title>
77

88
<meta name="author" content="Tobias Reich">
9-
<meta name="keywords" content="">
10-
<meta name="description" content="">
119

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

0 commit comments

Comments
 (0)