parent
634124e17f
commit
56f1fac4c5
3 changed files with 8 additions and 9 deletions
|
@ -217,7 +217,6 @@ class SQLite extends DBEngine
|
||||||
$data = str_replace(SCORE::BOOL_Y, "'$this->BOOL_Y'", $data);
|
$data = str_replace(SCORE::BOOL_Y, "'$this->BOOL_Y'", $data);
|
||||||
$data = str_replace(SCORE::BOOL_N, "'$this->BOOL_N'", $data);
|
$data = str_replace(SCORE::BOOL_N, "'$this->BOOL_N'", $data);
|
||||||
$data = str_replace(SCORE::BOOL, "CHAR(1)", $data);
|
$data = str_replace(SCORE::BOOL, "CHAR(1)", $data);
|
||||||
$data = str_replace("DEFAULT FALSE", "DEFAULT 0", $data);
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,13 +133,13 @@ class PrivateImage extends Extension
|
||||||
if ($show_private) {
|
if ($show_private) {
|
||||||
$event->add_querylet(
|
$event->add_querylet(
|
||||||
new Querylet(
|
new Querylet(
|
||||||
"private = :false OR owner_id = :private_owner_id",
|
"private != :true OR owner_id = :private_owner_id",
|
||||||
["private_owner_id"=>$user->id, "false"=>false]
|
["private_owner_id"=>$user->id, "true"=>true]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$event->add_querylet(
|
$event->add_querylet(
|
||||||
new Querylet("private = :false", ["false"=>false])
|
new Querylet("private != :true", ["true"=>true])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,8 +153,8 @@ class PrivateImage extends Extension
|
||||||
$query = "";
|
$query = "";
|
||||||
switch ($matches[1]) {
|
switch ($matches[1]) {
|
||||||
case "no":
|
case "no":
|
||||||
$query .= "private = :false";
|
$query .= "private != :true";
|
||||||
$params["false"] = false;
|
$params["true"] = true;
|
||||||
break;
|
break;
|
||||||
case "yes":
|
case "yes":
|
||||||
$query .= "private = :true";
|
$query .= "private = :true";
|
||||||
|
@ -168,8 +168,8 @@ class PrivateImage extends Extension
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "any":
|
case "any":
|
||||||
$query .= "private = :false OR owner_id = :private_owner_id";
|
$query .= "private != :true OR owner_id = :private_owner_id";
|
||||||
$params["false"] = false;
|
$params["true"] = true;
|
||||||
$params["private_owner_id"] = $user->id;
|
$params["private_owner_id"] = $user->id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ class Trash extends Extension
|
||||||
$matches = [];
|
$matches = [];
|
||||||
|
|
||||||
if (is_null($event->term) && $this->no_trash_query($event->context)) {
|
if (is_null($event->term) && $this->no_trash_query($event->context)) {
|
||||||
$event->add_querylet(new Querylet("trash = :false", ["false"=>false]));
|
$event->add_querylet(new Querylet("trash != :true", ["true"=>true]));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($event->term)) {
|
if (is_null($event->term)) {
|
||||||
|
|
Reference in a new issue