fixed bugs when no model is given
This commit is contained in:
parent
542e20fb54
commit
ab39d14cba
5
get.php
5
get.php
@ -3,7 +3,7 @@
|
||||
* @Author: prpr
|
||||
* @Date: 2016-02-02 20:56:42
|
||||
* @Last Modified by: prpr
|
||||
* @Last Modified time: 2016-02-05 14:51:26
|
||||
* @Last Modified time: 2016-02-06 21:51:19
|
||||
*
|
||||
* All textures requests of legacy link will be handle here.
|
||||
*/
|
||||
@ -18,7 +18,8 @@ if (isset($_GET['type']) && isset($_GET['uname'])) {
|
||||
$if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) : null;
|
||||
|
||||
if ($_GET['type'] == "skin" || $_GET['type'] == "cape") {
|
||||
$model = (isset($_GET['model']) && $_GET['model'] == "steve") ? "steve" : "alex";
|
||||
$model_preferrnce = ($user->getPreference() == "default") ? "steve" : "alex";
|
||||
$model = (isset($_GET['model']) && $_GET['model'] == "") ? $model_preferrnce : $_GET['model'];
|
||||
if ($if_modified_since >= $user->getLastModified()) {
|
||||
header('HTTP/1.0 304 Not Modified');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user