mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
parent
6eed2e8a76
commit
6abd9babc9
53 changed files with 197 additions and 197 deletions
|
@ -101,7 +101,7 @@ function auth_pack($auth_array)
|
|||
$one_char = $two_char = false;
|
||||
$auth_cache = '';
|
||||
|
||||
for ($i = 0; $i < sizeof($auth_array); $i++) {
|
||||
for ($i = 0; $i < count($auth_array); $i++) {
|
||||
$val = base64_pack(intval($auth_array[$i]));
|
||||
if (strlen($val) == 1 && !$one_char) {
|
||||
$auth_cache .= $one_char_encoding;
|
||||
|
@ -310,7 +310,7 @@ function get_attachments_from_post($post_id_array)
|
|||
*/
|
||||
function get_total_attach_filesize($attach_ids)
|
||||
{
|
||||
if (!is_array($attach_ids) || !sizeof($attach_ids)) {
|
||||
if (!is_array($attach_ids) || !count($attach_ids)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ function get_extension_informations()
|
|||
function attachment_sync_topic($topics)
|
||||
{
|
||||
if (is_array($topics)) {
|
||||
$topics = join(',', $topics);
|
||||
$topics = implode(',', $topics);
|
||||
}
|
||||
$posts_without_attach = $topics_without_attach = array();
|
||||
|
||||
|
@ -366,7 +366,7 @@ function attachment_sync_topic($topics)
|
|||
foreach ($rowset as $row) {
|
||||
$posts_without_attach[] = $row['post_id'];
|
||||
}
|
||||
if ($posts_sql = join(',', $posts_without_attach)) {
|
||||
if ($posts_sql = implode(',', $posts_without_attach)) {
|
||||
DB()->query("UPDATE " . BB_POSTS . " SET post_attachment = 0 WHERE post_id IN($posts_sql)");
|
||||
}
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ function attachment_sync_topic($topics)
|
|||
foreach ($rowset as $row) {
|
||||
$topics_without_attach[] = $row['topic_id'];
|
||||
}
|
||||
if ($topics_sql = join(',', $topics_without_attach)) {
|
||||
if ($topics_sql = implode(',', $topics_without_attach)) {
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_attachment = 0 WHERE topic_id IN($topics_sql)");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue