linting
This commit is contained in:
parent
68d58a6f11
commit
b6ad316d20
@ -667,7 +667,7 @@ class Image {
|
|||||||
/**
|
/**
|
||||||
* Send list of metatags to be parsed.
|
* Send list of metatags to be parsed.
|
||||||
*
|
*
|
||||||
* @param [] $metatags
|
* @param string[] $metatags
|
||||||
* @param int $image_id
|
* @param int $image_id
|
||||||
*/
|
*/
|
||||||
public function parse_metatags($metatags, $image_id) {
|
public function parse_metatags($metatags, $image_id) {
|
||||||
@ -876,7 +876,7 @@ class Image {
|
|||||||
* Merge all the image metadata searches into one generic querylet
|
* Merge all the image metadata searches into one generic querylet
|
||||||
* and append to the base querylet with "AND blah"
|
* and append to the base querylet with "AND blah"
|
||||||
*/
|
*/
|
||||||
if($img_querylets) {
|
if(!empty($img_querylets)) {
|
||||||
$n = 0;
|
$n = 0;
|
||||||
$img_sql = "";
|
$img_sql = "";
|
||||||
$img_vars = array();
|
$img_vars = array();
|
||||||
@ -950,11 +950,11 @@ class Image {
|
|||||||
|
|
||||||
assert('$positive_tag_id_array || $negative_tag_id_array');
|
assert('$positive_tag_id_array || $negative_tag_id_array');
|
||||||
$wheres = array();
|
$wheres = array();
|
||||||
if ($positive_tag_id_array) {
|
if (!empty($positive_tag_id_array)) {
|
||||||
$positive_tag_id_list = join(', ', $positive_tag_id_array);
|
$positive_tag_id_list = join(', ', $positive_tag_id_array);
|
||||||
$wheres[] = "tag_id IN ($positive_tag_id_list)";
|
$wheres[] = "tag_id IN ($positive_tag_id_list)";
|
||||||
}
|
}
|
||||||
if ($negative_tag_id_array) {
|
if (!empty($negative_tag_id_array)) {
|
||||||
$negative_tag_id_list = join(', ', $negative_tag_id_array);
|
$negative_tag_id_list = join(', ', $negative_tag_id_array);
|
||||||
$wheres[] = "tag_id NOT IN ($negative_tag_id_list)";
|
$wheres[] = "tag_id NOT IN ($negative_tag_id_list)";
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ class Page {
|
|||||||
# header("Cache-control: no-cache");
|
# header("Cache-control: no-cache");
|
||||||
# header('Expires: ' . gmdate('D, d M Y H:i:s', time() - 600) . ' GMT');
|
# header('Expires: ' . gmdate('D, d M Y H:i:s', time() - 600) . ' GMT');
|
||||||
#}
|
#}
|
||||||
if($this->get_cookie("flash_message")) {
|
if($this->get_cookie("flash_message") !== null) {
|
||||||
$this->add_cookie("flash_message", "", -1, "/");
|
$this->add_cookie("flash_message", "", -1, "/");
|
||||||
}
|
}
|
||||||
usort($this->blocks, "blockcmp");
|
usort($this->blocks, "blockcmp");
|
||||||
|
@ -79,7 +79,7 @@ function sql_escape($input) {
|
|||||||
/**
|
/**
|
||||||
* Turn all manner of HTML / INI / JS / DB booleans into a PHP one
|
* Turn all manner of HTML / INI / JS / DB booleans into a PHP one
|
||||||
*
|
*
|
||||||
* @param $input
|
* @param mixed $input
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function bool_escape($input) {
|
function bool_escape($input) {
|
||||||
@ -676,7 +676,7 @@ function captcha_check() {
|
|||||||
else {
|
else {
|
||||||
session_start();
|
session_start();
|
||||||
$securimg = new Securimage();
|
$securimg = new Securimage();
|
||||||
if($securimg->check($_POST['captcha_code']) == FALSE) {
|
if($securimg->check($_POST['captcha_code']) === false) {
|
||||||
log_info("core", "Captcha failed (Securimage)");
|
log_info("core", "Captcha failed (Securimage)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -733,7 +733,7 @@ function getMimeType($file, $ext="", $list=false) {
|
|||||||
'mp4' => 'video/mp4', 'ogv' => 'video/ogg', 'webm' => 'video/webm'
|
'mp4' => 'video/mp4', 'ogv' => 'video/ogg', 'webm' => 'video/webm'
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($list == true){ return $exts; }
|
if ($list === true){ return $exts; }
|
||||||
|
|
||||||
if (isset($exts[$ext])) { return $exts[$ext]; }
|
if (isset($exts[$ext])) { return $exts[$ext]; }
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ function get_memory_limit() {
|
|||||||
// Shimmie wants more memory than what PHP is currently set for.
|
// Shimmie wants more memory than what PHP is currently set for.
|
||||||
|
|
||||||
// Attempt to set PHP's memory limit.
|
// Attempt to set PHP's memory limit.
|
||||||
if ( ini_set("memory_limit", $shimmie_limit) === FALSE ) {
|
if ( ini_set("memory_limit", $shimmie_limit) === false ) {
|
||||||
/* We can't change PHP's limit, oh well, return whatever its currently set to */
|
/* We can't change PHP's limit, oh well, return whatever its currently set to */
|
||||||
return $memory;
|
return $memory;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user