mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Unqualified function/constant reference and much more
Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
parent
b08f6e898b
commit
78af495048
68 changed files with 273 additions and 277 deletions
|
@ -27,7 +27,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
if (!is_array($attach_id_array)) {
|
||||
if (false !== strpos($attach_id_array, ', ')) {
|
||||
$attach_id_array = explode(', ', $attach_id_array);
|
||||
} elseif (strstr($attach_id_array, ',')) {
|
||||
} elseif (false !== strpos($attach_id_array, ',')) {
|
||||
$attach_id_array = explode(',', $attach_id_array);
|
||||
} else {
|
||||
$attach_id = (int)$attach_id_array;
|
||||
|
@ -68,7 +68,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
|
||||
if (false !== strpos($post_id_array, ', ')) {
|
||||
$post_id_array = explode(', ', $post_id_array);
|
||||
} elseif (strstr($post_id_array, ',')) {
|
||||
} elseif (false !== strpos($post_id_array, ',')) {
|
||||
$post_id_array = explode(',', $post_id_array);
|
||||
} else {
|
||||
$post_id = (int)$post_id_array;
|
||||
|
@ -113,7 +113,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
if (!is_array($attach_id_array)) {
|
||||
if (false !== strpos($attach_id_array, ', ')) {
|
||||
$attach_id_array = explode(', ', $attach_id_array);
|
||||
} elseif (strstr($attach_id_array, ',')) {
|
||||
} elseif (false !== strpos($attach_id_array, ',')) {
|
||||
$attach_id_array = explode(',', $attach_id_array);
|
||||
} else {
|
||||
$attach_id = (int)$attach_id_array;
|
||||
|
@ -171,7 +171,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
}
|
||||
//bt end
|
||||
|
||||
for ($i = 0, $iMax = count($attach_id_array); $i < $iMax; $i++) {
|
||||
foreach ($attach_id_array as $i => $iValue) {
|
||||
$sql = 'SELECT attach_id
|
||||
FROM ' . BB_ATTACHMENTS . '
|
||||
WHERE attach_id = ' . (int)$attach_id_array[$i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue