From: Adam Magness Date: Mon, 5 Feb 2018 17:26:28 +0000 (-0500) Subject: Rename functions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db8ef98537a004e1d5f277e26f72949f96dbf87a;p=friendica.git Rename functions rename functions from review comments --- diff --git a/mod/photos.php b/mod/photos.php index e1116c346b..4c86d91010 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -297,7 +297,7 @@ function photos_post(App $a) intval($page_owner_uid) ); Term::insertFromTagFieldByItemUri($rr['parent-uri'], $page_owner_uid); - Item::deleteThreadFromUri($rr['parent-uri'], $page_owner_uid); + Item::deleteThreadByUri($rr['parent-uri'], $page_owner_uid); $drop_id = intval($rr['id']); @@ -371,7 +371,7 @@ function photos_post(App $a) intval($page_owner_uid) ); Term::insertFromTagFieldByItemUri($i[0]['uri'], $page_owner_uid); - Item::deleteThreadFromUri($i[0]['uri'], $page_owner_uid); + Item::deleteThreadByUri($i[0]['uri'], $page_owner_uid); $url = System::baseUrl(); $drop_id = intval($i[0]['id']); diff --git a/mod/videos.php b/mod/videos.php index 0f029f0472..26a4e4cce5 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -178,7 +178,7 @@ function videos_post(App $a) { intval(local_user()) ); Term::insertFromTagFieldByItemUri($i[0]['uri'], local_user()); - Item::deleteThreadFromUri($i[0]['uri'], local_user()); + Item::deleteThreadByUri($i[0]['uri'], local_user()); $url = System::baseUrl(); $drop_id = intval($i[0]['id']); diff --git a/src/Model/Item.php b/src/Model/Item.php index f971f0788e..8c8ae48af9 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1894,7 +1894,7 @@ EOT; } } - public static function updateThreadFromUri($itemuri, $uid) + public static function updateThreadByUri($itemuri, $uid) { $messages = dba::select('item', ['id'], ['uri' => $itemuri, 'uid' => $uid]); @@ -1951,7 +1951,7 @@ EOT; logger("Updating public shadow for post ".$items["id"]." - guid ".$item["guid"]." Result: ".print_r($result, true), LOGGER_DEBUG); } - public static function deleteThreadFromUri($itemuri, $uid) + public static function deleteThreadByUri($itemuri, $uid) { $messages = dba::select('item', ['id'], ['uri' => $itemuri, 'uid' => $uid]); diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 423f87aa90..2b3b9b0dc6 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2091,7 +2091,7 @@ class DFRN dba::update('item', $fields, $condition); Term::insertFromTagFieldByItemUri($item["uri"], $importer["importer_uid"]); - Item::updateThreadFromUri($item["uri"], $importer["importer_uid"]); + Item::updateThreadByUri($item["uri"], $importer["importer_uid"]); $changed = true; @@ -2840,7 +2840,7 @@ class DFRN ); Term::insertFromTagFieldByItemUri($uri, $importer["uid"]); Term::insertFromFileFieldByItemUri($uri, $importer["uid"]); - Item::updateThreadFromUri($uri, $importer["uid"]); + Item::updateThreadByUri($uri, $importer["uid"]); } else { $r = q( "UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', @@ -2853,7 +2853,7 @@ class DFRN ); Term::insertFromTagFieldByItemUri($uri, $importer["uid"]); Term::insertFromFileFieldByItemUri($uri, $importer["uid"]); - Item::updateThreadFromUri($uri, $importer["importer_uid"]); + Item::updateThreadByUri($uri, $importer["importer_uid"]); // if this is a relayed delete, propagate it to other recipients