mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 21:03:54 -07:00
Alias functions usage.
This commit is contained in:
parent
3712862832
commit
dcb828d983
3 changed files with 9 additions and 9 deletions
|
@ -157,7 +157,7 @@ if ($search_imagick) {
|
||||||
$paths = explode(' ', $retval);
|
$paths = explode(' ', $retval);
|
||||||
|
|
||||||
if (is_array($paths)) {
|
if (is_array($paths)) {
|
||||||
for ($i = 0; $i < sizeof($paths); $i++) {
|
for ($i = 0; $iMax = count($paths); $i < $iMax; $i++) {
|
||||||
$path = basename($paths[$i]);
|
$path = basename($paths[$i]);
|
||||||
|
|
||||||
if ($path == 'convert') {
|
if ($path == 'convert') {
|
||||||
|
|
|
@ -89,7 +89,7 @@ class TorrentFileList
|
||||||
$filelist = $html->array2html($this->files_ary);
|
$filelist = $html->array2html($this->files_ary);
|
||||||
return "<div class=\"tor-root-dir\">{$this->root_dir}</div>$filelist";
|
return "<div class=\"tor-root-dir\">{$this->root_dir}</div>$filelist";
|
||||||
} else {
|
} else {
|
||||||
return join('', $this->files_ary['/']);
|
return implode('', $this->files_ary['/']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ function strip_quotes($text)
|
||||||
}
|
}
|
||||||
} while ($pos !== false);
|
} while ($pos !== false);
|
||||||
|
|
||||||
if (sizeof($start_pos) == 0) {
|
if (count($start_pos) == 0) {
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ function strip_quotes($text)
|
||||||
}
|
}
|
||||||
} while ($pos !== false);
|
} while ($pos !== false);
|
||||||
|
|
||||||
if (sizeof($end_pos) == 0) {
|
if (count($end_pos) == 0) {
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ function strip_quotes($text)
|
||||||
$newtext = '[...] ';
|
$newtext = '[...] ';
|
||||||
$substr_pos = 0;
|
$substr_pos = 0;
|
||||||
foreach ($pos_list as $pos => $type) {
|
foreach ($pos_list as $pos => $type) {
|
||||||
$stacksize = sizeof($stack);
|
$stacksize = count($stack);
|
||||||
if ($type == 'start') {
|
if ($type == 'start') {
|
||||||
// empty stack, so add from the last close tag or the beginning of the string
|
// empty stack, so add from the last close tag or the beginning of the string
|
||||||
if ($stacksize == 0) {
|
if ($stacksize == 0) {
|
||||||
|
@ -377,7 +377,7 @@ function extract_search_words($text)
|
||||||
}
|
}
|
||||||
$text = $text_out;
|
$text = $text_out;
|
||||||
|
|
||||||
if (sizeof($text) > $max_words_count) {
|
if (count($text) > $max_words_count) {
|
||||||
# shuffle($text);
|
# shuffle($text);
|
||||||
$text = array_splice($text, 0, $max_words_count);
|
$text = array_splice($text, 0, $max_words_count);
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ function add_search_words($post_id, $post_message, $topic_title = '', $only_retu
|
||||||
$words = ($text) ? extract_search_words($text) : array();
|
$words = ($text) ? extract_search_words($text) : array();
|
||||||
|
|
||||||
if ($only_return_words || $bb_cfg['search_engine_type'] == 'sphinx') {
|
if ($only_return_words || $bb_cfg['search_engine_type'] == 'sphinx') {
|
||||||
return join("\n", $words);
|
return implode("\n", $words);
|
||||||
}
|
}
|
||||||
|
|
||||||
DB()->query("DELETE FROM " . BB_POSTS_SEARCH . " WHERE post_id = $post_id");
|
DB()->query("DELETE FROM " . BB_POSTS_SEARCH . " WHERE post_id = $post_id");
|
||||||
|
@ -543,7 +543,7 @@ class bbcode
|
||||||
$text = preg_replace_callback("#\[url=(www\.$url_exp)\]([^?\n\t].*?)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
$text = preg_replace_callback("#\[url=(www\.$url_exp)\]([^?\n\t].*?)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||||
|
|
||||||
// Normalize block level tags wrapped with new lines
|
// Normalize block level tags wrapped with new lines
|
||||||
$block_tags = join('|', $this->block_tags);
|
$block_tags = implode('|', $this->block_tags);
|
||||||
$text = str_replace("\n\n[hr]\n\n", '[br][hr][br]', $text);
|
$text = str_replace("\n\n[hr]\n\n", '[br][hr][br]', $text);
|
||||||
$text = preg_replace("#(\s*)(\[/?($block_tags)(.*?)\])(\s*)#", '$2', $text);
|
$text = preg_replace("#(\s*)(\[/?($block_tags)(.*?)\])(\s*)#", '$2', $text);
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ class bbcode
|
||||||
foreach ($found_spam as $keyword) {
|
foreach ($found_spam as $keyword) {
|
||||||
$spam_exp[] = preg_quote($keyword, '/');
|
$spam_exp[] = preg_quote($keyword, '/');
|
||||||
}
|
}
|
||||||
$spam_exp = join('|', $spam_exp);
|
$spam_exp = implode('|', $spam_exp);
|
||||||
|
|
||||||
$text = preg_replace("/($spam_exp)(\S*)/i", $spam_replace, $msg_decoded);
|
$text = preg_replace("/($spam_exp)(\S*)/i", $spam_replace, $msg_decoded);
|
||||||
$text = htmlCHR($text, false, ENT_NOQUOTES);
|
$text = htmlCHR($text, false, ENT_NOQUOTES);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue