more backquotes - this should take care of most except for the array import queries
This commit is contained in:
@@ -32,7 +32,7 @@ class Fbrowser extends \Zotlabs\Web\Controller {
|
||||
$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
|
||||
|
||||
if (\App::$argc==2){
|
||||
$albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d ",
|
||||
$albums = q("SELECT distinct(album) AS album FROM photo WHERE uid = %d ",
|
||||
intval(local_channel())
|
||||
);
|
||||
// anon functions only from 5.3.0... meglio tardi che mai..
|
||||
@@ -43,14 +43,14 @@ class Fbrowser extends \Zotlabs\Web\Controller {
|
||||
$album = "";
|
||||
if (\App::$argc==3){
|
||||
$album = hex2bin(\App::$argv[2]);
|
||||
$sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
|
||||
$sql_extra = sprintf("AND album = '%s' ",dbesc($album));
|
||||
$sql_extra2 = "";
|
||||
$path[]=array(z_root() . "/fbrowser/image/" . \App::$argv[2] . "/", $album);
|
||||
}
|
||||
|
||||
$r = q("SELECT `resource_id`, `id`, `filename`, type, min(`imgscale`) AS `hiq`,max(`imgscale`) AS `loq`, `description`
|
||||
FROM `photo` WHERE `uid` = %d $sql_extra
|
||||
GROUP BY `resource_id` $sql_extra2",
|
||||
$r = q("SELECT resource_id, id, filename, type, min(imgscale) AS hiq,max(imgscale) AS loq, description
|
||||
FROM photo WHERE uid = %d $sql_extra
|
||||
GROUP BY resource_id $sql_extra2",
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
@@ -70,7 +70,7 @@ class Fbrowser extends \Zotlabs\Web\Controller {
|
||||
break;
|
||||
case "file":
|
||||
if (\App::$argc==2){
|
||||
$files = q("SELECT id, filename, filetype FROM `attach` WHERE `uid` = %d ",
|
||||
$files = q("SELECT id, filename, filetype FROM attach WHERE uid = %d ",
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user