<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
return array_column($tags, 'name');
}
+ public static function existsForURIId(int $uri_id, int $uid)
+ {
+ return DBA::exists('post-category', ['uri-id' => $uri_id, 'uid' => $uid]);
+ }
+
/**
* Generates an array of files or categories of a given uri-id
*
if (preg_match_all("/\<(.*?)\>/ism", $files, $result)) {
foreach ($result[1] as $file) {
- self::storeFileByURIId($uri_id, $uid, self::FILE, $file);
+ self::storeFileByURIId($uri_id, $uid, self::CATEGORY, $file);
}
}
}