mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Updated
This commit is contained in:
parent
a6faf4191a
commit
22db50889c
4 changed files with 11 additions and 11 deletions
|
@ -89,7 +89,7 @@ class Atom
|
|||
}
|
||||
$topics[] = $topic;
|
||||
}
|
||||
if (!\count($topics)) {
|
||||
if (!count($topics)) {
|
||||
@unlink($file_path);
|
||||
return false;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class Atom
|
|||
}
|
||||
$topics[] = $topic;
|
||||
}
|
||||
if (!\count($topics)) {
|
||||
if (!count($topics)) {
|
||||
@unlink($file_path);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ class Attach
|
|||
}
|
||||
}
|
||||
|
||||
$this->num_attachments = is_countable($this->attachment_list) ? \count($this->attachment_list) : 0;
|
||||
$this->num_attachments = is_countable($this->attachment_list) ? count($this->attachment_list) : 0;
|
||||
|
||||
if ($submit) {
|
||||
if ($mode === 'newtopic' || $mode === 'reply' || $mode === 'editpost') {
|
||||
|
@ -334,7 +334,7 @@ class Attach
|
|||
|
||||
// restore values :)
|
||||
if (isset($_POST['attachment_list'])) {
|
||||
for ($i = 0, $iMax = is_countable($actual_list) ? \count($actual_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($actual_list) ? count($actual_list) : 0; $i < $iMax; $i++) {
|
||||
$restore = false;
|
||||
$del_thumb = false;
|
||||
|
||||
|
@ -402,7 +402,7 @@ class Attach
|
|||
|
||||
$this->attachment_comment_list = [];
|
||||
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? \count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
$this->attachment_comment_list[$i] = $actual_comment_list[$i];
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ class Attach
|
|||
$attachment_id = 0;
|
||||
$actual_element = 0;
|
||||
|
||||
for ($i = 0, $iMax = is_countable($actual_id_list) ? \count($actual_id_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($actual_id_list) ? count($actual_id_list) : 0; $i < $iMax; $i++) {
|
||||
if (isset($_POST['update_attachment'][$actual_id_list[$i]])) {
|
||||
$attachment_id = (int)$actual_id_list[$i];
|
||||
$actual_element = $i;
|
||||
|
@ -551,7 +551,7 @@ class Attach
|
|||
}
|
||||
|
||||
if ($mode === 'attach_list') {
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? \count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
if ($this->attachment_id_list[$i]) {
|
||||
//bt
|
||||
if ($this->attachment_extension_list[$i] === TORRENT_EXT && !\defined('TORRENT_ATTACH_ID')) {
|
||||
|
@ -678,7 +678,7 @@ class Attach
|
|||
|
||||
if ($this->attachment_list) {
|
||||
$hidden = '';
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? \count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
$hidden .= '<input type="hidden" name="attachment_list[]" value="' . $this->attachment_list[$i] . '" />';
|
||||
$hidden .= '<input type="hidden" name="filename_list[]" value="' . $this->attachment_filename_list[$i] . '" />';
|
||||
$hidden .= '<input type="hidden" name="extension_list[]" value="' . $this->attachment_extension_list[$i] . '" />';
|
||||
|
@ -710,7 +710,7 @@ class Attach
|
|||
'TPL_POSTED_ATTACHMENTS' => true,
|
||||
]);
|
||||
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? \count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
for ($i = 0, $iMax = is_countable($this->attachment_list) ? count($this->attachment_list) : 0; $i < $iMax; $i++) {
|
||||
if (@$this->attachment_id_list[$i] == 0) {
|
||||
$download_link = $upload_dir . '/' . basename($this->attachment_list[$i]);
|
||||
} else {
|
||||
|
|
|
@ -38,7 +38,7 @@ class AttachPosting extends Attach
|
|||
$this->do_insert_attachment('attach_list', 'post', $post_id);
|
||||
$this->do_insert_attachment('last_attachment', 'post', $post_id);
|
||||
|
||||
if (((is_countable($this->attachment_list) ? \count($this->attachment_list) : 0) > 0 || $this->post_attach) && !isset($_POST['update_attachment'])) {
|
||||
if (((is_countable($this->attachment_list) ? count($this->attachment_list) : 0) > 0 || $this->post_attach) && !isset($_POST['update_attachment'])) {
|
||||
$sql = 'UPDATE ' . BB_POSTS . ' SET post_attachment = 1 WHERE post_id = ' . (int)$post_id;
|
||||
|
||||
if (!DB()->sql_query($sql)) {
|
||||
|
|
|
@ -51,7 +51,7 @@ class Poll
|
|||
}
|
||||
|
||||
// check for "< 3" -- 2 answer variants + header
|
||||
if (\count($this->poll_votes) < 3 || \count($this->poll_votes) > $this->max_votes + 1) {
|
||||
if (count($this->poll_votes) < 3 || count($this->poll_votes) > $this->max_votes + 1) {
|
||||
global $lang;
|
||||
return $this->err_msg = sprintf($lang['NEW_POLL_VOTES'], $this->max_votes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue