commit
This commit is contained in:
@@ -23,7 +23,7 @@ Route::get('/', function()
|
||||
$news = News::aktuell()->get();
|
||||
$nextfilm = Dumbo::find(1)->film;
|
||||
|
||||
$tmdb = new TMDb(Config::get('constants.tvdb.apikey'), 'de', TRUE);
|
||||
$tmdb = new TMDb(Config::get('constants.tvdb.apikey'), 'de', TRUE, TMDb::API_SCHEME_SSL);
|
||||
foreach(array("top" => $mg[0], "neu" => $vorgeschlagen[0], "alt" => $gesehen[0]) as $key => $val) {
|
||||
$tmovie = $tmdb->getMovie($val->tvdbid);
|
||||
$images[$key] = $tmdb->getImageUrl($tmovie['poster_path'], TMDb::IMAGE_POSTER, 'w342');
|
||||
@@ -337,16 +337,18 @@ Route::post('settings/{mode}', array('before' => 'auth', function($mode) {
|
||||
$val = Validator::make($vfields, $vrules);
|
||||
if($val->passes()) {
|
||||
/* Delete old Avatars */
|
||||
array_map('unlink', glob(public_path("img/avatars/". Auth::user()->id . "-*")));
|
||||
//array_map('unlink', glob(public_path("img/avatars/". Auth::user()->id . "-*")));
|
||||
|
||||
/** @var Symfony\Component\HttpFoundation\File\UploadedFile $file */
|
||||
$file = Input::file('avatar');
|
||||
$file = $file->move( public_path("img/avatars/"), Auth::user()->id . "-". Str::slug($file->getFilename()) . "." . $file->guessExtension() );
|
||||
|
||||
$i = new Imagick();
|
||||
$i->readImage($file->getRealPath());
|
||||
$i->cropThumbnailImage(100, 100);
|
||||
$i->writeImage();
|
||||
exec('/usr/bin/gm convert -size 100x100 ' . $file->getRealPath() . ' -thumbnail 100x100^ -gravity center -extent 100x100 +profile "*" ' . $file->getRealPath());
|
||||
|
||||
//$i = new Imagick();
|
||||
//$i->readImage($file->getRealPath());
|
||||
//$i->cropThumbnailImage(100, 100);
|
||||
//$i->writeImage();
|
||||
|
||||
/** @var User $u */
|
||||
$u = Auth::user();
|
||||
@@ -560,8 +562,5 @@ Route::get('stats', function() {
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
// dd(DB::getQueryLog());
|
||||
|
||||
return View::make('stats')->with('stats', $stats);
|
||||
});
|
Reference in New Issue
Block a user