mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
'str(i)str(...)' could be replaced with 'str(i)pos(...)'.
(cherry picked from commit b4d079f
)
This commit is contained in:
parent
5dd290f2b2
commit
8e5338e5d3
8 changed files with 14 additions and 14 deletions
|
@ -410,7 +410,7 @@ function attachment_sync_topic($topics)
|
|||
*/
|
||||
function get_extension($filename)
|
||||
{
|
||||
if (!stristr($filename, '.')) {
|
||||
if (false === stripos($filename, '.')) {
|
||||
return '';
|
||||
}
|
||||
$extension = strrchr(strtolower($filename), '.');
|
||||
|
|
|
@ -41,7 +41,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
$post_id_array = array();
|
||||
|
||||
if (!is_array($attach_id_array)) {
|
||||
if (strstr($attach_id_array, ', ')) {
|
||||
if (false !== strpos($attach_id_array, ', ')) {
|
||||
$attach_id_array = explode(', ', $attach_id_array);
|
||||
} elseif (strstr($attach_id_array, ',')) {
|
||||
$attach_id_array = explode(',', $attach_id_array);
|
||||
|
@ -82,7 +82,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
return;
|
||||
}
|
||||
|
||||
if (strstr($post_id_array, ', ')) {
|
||||
if (false !== strpos($post_id_array, ', ')) {
|
||||
$post_id_array = explode(', ', $post_id_array);
|
||||
} elseif (strstr($post_id_array, ',')) {
|
||||
$post_id_array = explode(',', $post_id_array);
|
||||
|
@ -127,7 +127,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
}
|
||||
|
||||
if (!is_array($attach_id_array)) {
|
||||
if (strstr($attach_id_array, ', ')) {
|
||||
if (false !== strpos($attach_id_array, ', ')) {
|
||||
$attach_id_array = explode(', ', $attach_id_array);
|
||||
} elseif (strstr($attach_id_array, ',')) {
|
||||
$attach_id_array = explode(',', $attach_id_array);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue