don't search on empty filename - we shouldn't find it. The reason why this change is being made is because we actually did find it due to a development glitch
This commit is contained in:
parent
74def75ca3
commit
bc1812840a
@ -1479,10 +1479,12 @@ function find_folder_hash_by_path($channel_id, $path) {
|
|||||||
|
|
||||||
$filename = end(explode('/', $path));
|
$filename = end(explode('/', $path));
|
||||||
|
|
||||||
|
if($filename) {
|
||||||
$r = q("SELECT hash FROM attach WHERE uid = %d AND filename = '%s' LIMIT 1",
|
$r = q("SELECT hash FROM attach WHERE uid = %d AND filename = '%s' LIMIT 1",
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
dbesc($filename)
|
dbesc($filename)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$hash = '';
|
$hash = '';
|
||||||
if($r && $r[0]['hash']) {
|
if($r && $r[0]['hash']) {
|
||||||
|
Reference in New Issue
Block a user