kopia lustrzana https://github.com/friendica/friendica
Changes:
- let's get rid of that `Database::exists()` is being misused for checking table existence - reformatted arraypull/11689/head
rodzic
f689faca99
commit
804b759df1
|
@ -439,8 +439,13 @@ function item_post(App $a) {
|
||||||
// Ensure to only modify attachments that you own
|
// Ensure to only modify attachments that you own
|
||||||
$srch = '<' . intval($contact_id) . '>';
|
$srch = '<' . intval($contact_id) . '>';
|
||||||
|
|
||||||
$condition = ['allow_cid' => $srch, 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '',
|
$condition = [
|
||||||
'id' => $attach];
|
'allow_cid' => $srch,
|
||||||
|
'allow_gid' => '',
|
||||||
|
'deny_cid' => '',
|
||||||
|
'deny_gid' => '',
|
||||||
|
'id' => $attach,
|
||||||
|
];
|
||||||
if (!Attach::exists($condition)) {
|
if (!Attach::exists($condition)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,6 +825,7 @@ class Database
|
||||||
*
|
*
|
||||||
* @return boolean Are there rows for that condition?
|
* @return boolean Are there rows for that condition?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
* @todo Get rid of the DBStructure::existsTable() invocation
|
||||||
*/
|
*/
|
||||||
public function exists(string $table, array $condition): bool
|
public function exists(string $table, array $condition): bool
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue