mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 09:34:26 +02:00
Rename Term methods ahead of the move
- Rename createFromItemURI() to insertFromItemFileByUri() - Rename createFromItem() to insertFromItemFileById()
This commit is contained in:
parent
d0c9e7939c
commit
0abe4158d2
4 changed files with 12 additions and 11 deletions
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\Database\DBM;
|
||||
use dba;
|
||||
|
||||
require_once "include/dba.php";
|
||||
|
@ -14,10 +15,10 @@ class Term
|
|||
* @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;
|
||||
}
|
||||
|
||||
|
@ -62,13 +63,13 @@ class Term
|
|||
* @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"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue