);
}
- Term::createFromItem($item);
+ Term::insertFromItemFileById($item);
$saved = PConfig::get($uid, 'system', 'filetags');
if (!strlen($saved) || !stristr($saved, '[' . file_tag_encode($file) . ']')) {
intval($uid)
);
- Term::createFromItem($item);
+ Term::insertFromItemFileById($item);
$r = q("SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d",
dbesc($file),
}
create_tags_from_item($item['id']);
- Term::createFromItem($item['id']);
+ Term::insertFromItemFileById($item['id']);
update_thread($item['id']);
Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $item['id']);
['id' => $item['id']]);
create_tags_from_item($item['id']);
- Term::createFromItem($item['id']);
+ Term::insertFromItemFileById($item['id']);
delete_thread($item['id'], $item['parent-uri']);
// If it's the parent of a comment thread, kill all the kids
* This is not perfect - but a workable solution until we found the reason for the problem.
*/
create_tags_from_item($current_post);
- Term::createFromItem($current_post);
+ Term::insertFromItemFileById($current_post);
if ($arr['parent-uri'] === $arr['uri']) {
self::addShadow($current_post);
*/
namespace Friendica\Model;
+use Friendica\Database\DBM;
use dba;
require_once "include/dba.php";
* @param integer $itemid item id
* @return void
*/
- public static function createFromItem($itemid)
+ public static function insertFromItemFileById($itemid)
{
$message = dba::selectFirst('item', ['uid', 'deleted', 'file'], ['id' => $itemid]);
- if (!\Friendica\Database\DBM::is_result($message)) {
+ if (!DBM::is_result($message)) {
return;
}
* @param integer $uid uid
* @return void
*/
- public static function createFromItemURI($itemuri, $uid)
+ public static function insertFromItemFileByUri($itemuri, $uid)
{
$messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid));
if (count($messages)) {
foreach ($messages as $message) {
- self::createFromItem($message["id"]);
+ self::insertFromItemFileById($message["id"]);
}
}
}
intval($importer["uid"])
);
create_tags_from_itemuri($uri, $importer["uid"]);
- Term::createFromItemURI($uri, $importer["uid"]);
+ Term::insertFromItemFileByUri($uri, $importer["uid"]);
update_thread_uri($uri, $importer["uid"]);
} else {
$r = q(
intval($importer["uid"])
);
create_tags_from_itemuri($uri, $importer["uid"]);
- Term::createFromItemURI($uri, $importer["uid"]);
+ Term::insertFromItemFileByUri($uri, $importer["uid"]);
update_thread_uri($uri, $importer["importer_uid"]);
// if this is a relayed delete, propagate it to other recipients