1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[ticket/14548] Move deprecated globals and functions

PHPBB3-14584
This commit is contained in:
Máté Bartus
2016-04-06 21:01:41 +02:00
committed by Marc Alexander
parent 61bdccbfd8
commit 7a831c3e28
7 changed files with 97 additions and 94 deletions

View File

@@ -1160,28 +1160,6 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
return count($post_ids);
}
/**
* Delete Attachments
*
* @deprecated 3.2.0-a1 (To be removed: 3.4.0)
*
* @param string $mode can be: post|message|topic|attach|user
* @param mixed $ids can be: post_ids, message_ids, topic_ids, attach_ids, user_ids
* @param bool $resync set this to false if you are deleting posts or topics
*/
function delete_attachments($mode, $ids, $resync = true)
{
global $phpbb_container;
/** @var \phpbb\attachment\manager $attachment_manager */
$attachment_manager = $phpbb_container->get('attachment.manager');
$num_deleted = $attachment_manager->delete($mode, $ids, $resync);
unset($attachment_manager);
return $num_deleted;
}
/**
* Deletes shadow topics pointing to a specified forum.
*
@@ -1293,23 +1271,6 @@ function update_posted_info(&$topic_ids)
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
}
/**
* Delete attached file
*
* @deprecated 3.2.0-a1 (To be removed: 3.4.0)
*/
function phpbb_unlink($filename, $mode = 'file', $entry_removed = false)
{
global $phpbb_container;
/** @var \phpbb\attachment\manager $attachment_manager */
$attachment_manager = $phpbb_container->get('attachment.manager');
$unlink = $attachment_manager->unlink($filename, $mode, $entry_removed);
unset($attachment_manager);
return $unlink;
}
/**
* All-encompasing sync function
*