rename method

This commit is contained in:
E. S. 2024-03-15 17:30:49 +00:00
parent 6f134bd9ca
commit 8d72b7d1e7
2 changed files with 2 additions and 2 deletions

View File

@ -323,7 +323,7 @@ class AdminHandler extends request_handler {
csrf_check('editupl'.$id); csrf_check('editupl'.$id);
$upload->setNote($lang, $note); $upload->setNote($lang, $note);
$texts = posts::getWithUpload($upload); $texts = posts::getTextsWithUpload($upload);
if (!empty($texts)) { if (!empty($texts)) {
foreach ($texts as $text) { foreach ($texts as $text) {
$text->updateHtml(); $text->updateHtml();

View File

@ -357,7 +357,7 @@ class posts {
* @param Upload $upload * @param Upload $upload
* @return PostText[] Array of PostTexts that includes specified upload * @return PostText[] Array of PostTexts that includes specified upload
*/ */
static function getWithUpload(Upload $upload): array { static function getTextsWithUpload(Upload $upload): array {
$db = DB(); $db = DB();
$q = $db->query("SELECT id FROM posts_texts WHERE md LIKE '%{image:{$upload->randomId}%'"); $q = $db->query("SELECT id FROM posts_texts WHERE md LIKE '%{image:{$upload->randomId}%'");
$ids = []; $ids = [];