lint fixes

This commit is contained in:
Shish 2016-06-18 19:00:26 +01:00
parent 24973ada17
commit cfd3a9d248
3 changed files with 11 additions and 6 deletions

View File

@ -221,10 +221,16 @@ class User {
*/ */
public function set_password(/*string*/ $password) { public function set_password(/*string*/ $password) {
global $database; global $database;
$this->passhash = password_hash($password, PASSWORD_BCRYPT); $hash = password_hash($password, PASSWORD_BCRYPT);
if(is_string($hash)) {
$this->passhash = $hash;
$database->Execute("UPDATE users SET pass=:hash WHERE id=:id", array("hash"=>$this->passhash, "id"=>$this->id)); $database->Execute("UPDATE users SET pass=:hash WHERE id=:id", array("hash"=>$this->passhash, "id"=>$this->id));
log_info("core-user", 'Set password for '.$this->name); log_info("core-user", 'Set password for '.$this->name);
} }
else {
throw new SCoreException("Failed to hash password");
}
}
/** /**
* @param string $address * @param string $address

View File

@ -23,7 +23,7 @@ $(function(){
return { return {
label : item + ' ('+count+')', label : item + ' ('+count+')',
value : item value : item
} };
})); }));
}, },
error : function (request, status, error) { error : function (request, status, error) {

View File

@ -2,7 +2,6 @@
class VideoFileHandlerTheme extends Themelet { class VideoFileHandlerTheme extends Themelet {
public function display_image(Page $page, Image $image) { public function display_image(Page $page, Image $image) {
$data_href = get_base_href();
$ilink = $image->get_image_link(); $ilink = $image->get_image_link();
$thumb_url = make_http($image->get_thumb_link()); //used as fallback image $thumb_url = make_http($image->get_thumb_link()); //used as fallback image
$ext = strtolower($image->get_ext()); $ext = strtolower($image->get_ext());