s/implode/Tag::implode/
This commit is contained in:
parent
0aec16aa5b
commit
60a28af000
12 changed files with 15 additions and 15 deletions
|
@ -579,7 +579,7 @@ class Image {
|
|||
throw new SCoreException('Tried to set zero tags');
|
||||
}
|
||||
|
||||
if(implode(" ", $tags) != $this->get_tag_list()) {
|
||||
if(Tag::implode($tags) != $this->get_tag_list()) {
|
||||
// delete old
|
||||
$this->delete_tags_from_image();
|
||||
// insert each new tags
|
||||
|
@ -619,7 +619,7 @@ class Image {
|
|||
);
|
||||
}
|
||||
|
||||
log_info("core_image", "Tags for Image #{$this->id} set to: ".implode(" ", $tags), null, array("image_id" => $this->id));
|
||||
log_info("core_image", "Tags for Image #{$this->id} set to: ".Tag::implode($tags), null, array("image_id" => $this->id));
|
||||
$database->cache->delete("image-{$this->id}-tags");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class AdminPage extends Extension {
|
|||
public function onPostListBuilding(PostListBuildingEvent $event) {
|
||||
global $user;
|
||||
if($user->can("manage_admintools") && !empty($event->search_terms)) {
|
||||
$event->add_control($this->theme->dbq_html(implode(" ", $event->search_terms)));
|
||||
$event->add_control($this->theme->dbq_html(Tag::implode($event->search_terms)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ class CommentListTheme extends Themelet {
|
|||
$next = $page_number + 1;
|
||||
|
||||
//$search_terms = array('I','have','no','idea','what','this','does!');
|
||||
//$u_tags = url_escape(implode(" ", $search_terms));
|
||||
//$u_tags = url_escape(Tag::implode($search_terms));
|
||||
//$query = empty($u_tags) ? "" : '/'.$u_tags;
|
||||
|
||||
$h_prev = ($page_number <= 1) ? "Prev" : "<a href='$prev'>Prev</a>";
|
||||
|
|
|
@ -64,7 +64,7 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||
|
||||
$orig_size = $this->video_size($inname);
|
||||
$scaled_size = get_thumbnail_size($orig_size[0], $orig_size[1]);
|
||||
$cmd = escapeshellcmd(implode(" ", [
|
||||
$cmd = escapeshellcmd(Tag::implode([
|
||||
escapeshellarg($ffmpeg),
|
||||
"-y", "-i", escapeshellarg($inname),
|
||||
"-vf", "scale={$scaled_size[0]}:{$scaled_size[1]}",
|
||||
|
@ -89,7 +89,7 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||
protected function video_size(string $filename) {
|
||||
global $config;
|
||||
$ffmpeg = $config->get_string("thumb_ffmpeg_path");
|
||||
$cmd = escapeshellcmd(implode(" ", [
|
||||
$cmd = escapeshellcmd(Tag::implode([
|
||||
escapeshellarg($ffmpeg),
|
||||
"-y", "-i", escapeshellarg($filename),
|
||||
"-vstats"
|
||||
|
|
|
@ -242,7 +242,7 @@ class Index extends Extension {
|
|||
$count_search_terms = count($search_terms);
|
||||
|
||||
try {
|
||||
#log_debug("index", "Search for ".implode(" ", $search_terms), false, array("terms"=>$search_terms));
|
||||
#log_debug("index", "Search for ".Tag::implode($search_terms), false, array("terms"=>$search_terms));
|
||||
$total_pages = Image::count_pages($search_terms);
|
||||
if(SPEED_HAX && $count_search_terms === 0 && ($page_number < 10)) { // extra caching for the first few post/list pages
|
||||
$images = $database->cache->get("post-list:$page_number");
|
||||
|
|
|
@ -69,7 +69,7 @@ and of course start organising your images :-)
|
|||
$prev = $page_number - 1;
|
||||
$next = $page_number + 1;
|
||||
|
||||
$u_tags = url_escape(implode(" ", $search_terms));
|
||||
$u_tags = url_escape(Tag::implode($search_terms));
|
||||
$query = empty($u_tags) ? "" : '/'.$u_tags;
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ and of course start organising your images :-)
|
|||
$h_index = "<a href='".make_link()."'>Index</a>";
|
||||
$h_next = ($page_number >= $total_pages) ? "Next" : '<a href="'.make_link('post/list'.$query.'/'.$next).'">Next</a>';
|
||||
|
||||
$h_search_string = html_escape(implode(" ", $search_terms));
|
||||
$h_search_string = html_escape(Tag::implode($search_terms));
|
||||
$h_search_link = make_link();
|
||||
$h_search = "
|
||||
<p><form action='$h_search_link' method='GET'>
|
||||
|
|
|
@ -36,7 +36,7 @@ class RandomListTheme extends Themelet {
|
|||
}
|
||||
|
||||
protected function build_navigation(array $search_terms): string {
|
||||
$h_search_string = html_escape(implode(" ", $search_terms));
|
||||
$h_search_string = html_escape(Tag::implode($search_terms));
|
||||
$h_search_link = make_link("random");
|
||||
$h_search = "
|
||||
<p><form action='$h_search_link' method='GET'>
|
||||
|
|
|
@ -71,7 +71,7 @@ class Ratings extends Extension {
|
|||
public function onPostListBuilding(PostListBuildingEvent $event) {
|
||||
global $user;
|
||||
if($user->is_admin() && !empty($event->search_terms)) {
|
||||
$this->theme->display_bulk_rater(implode(" ", $event->search_terms));
|
||||
$this->theme->display_bulk_rater(Tag::implode($event->search_terms));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class RegenThumb extends Extension {
|
|||
public function onPostListBuilding(PostListBuildingEvent $event) {
|
||||
global $user;
|
||||
if($user->can("delete_image") && !empty($event->search_terms)) {
|
||||
$event->add_control($this->theme->mtr_html(implode(" ", $event->search_terms)));
|
||||
$event->add_control($this->theme->mtr_html(Tag::implode($event->search_terms)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class RSS_Images extends Extension {
|
|||
$base_href = make_http(get_base_href());
|
||||
$search = "";
|
||||
if(count($search_terms) > 0) {
|
||||
$search = url_escape(implode(" ", $search_terms)) . "/";
|
||||
$search = url_escape(Tag::implode($search_terms)) . "/";
|
||||
}
|
||||
|
||||
if($page_number > 1) {
|
||||
|
|
|
@ -170,7 +170,7 @@ class TagEdit extends Extension {
|
|||
public function onPostListBuilding(PostListBuildingEvent $event) {
|
||||
global $user;
|
||||
if($user->can("bulk_edit_image_source") && !empty($event->search_terms)) {
|
||||
$event->add_control($this->theme->mss_html(implode(" ", $event->search_terms)));
|
||||
$event->add_control($this->theme->mss_html(Tag::implode($event->search_terms)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class TagEditTheme extends Themelet {
|
|||
$h_link = make_link("post/list/$u_tag/1");
|
||||
$tag_links[] = "<a href='$h_link'>$h_tag</a>";
|
||||
}
|
||||
$h_tag_links = implode(" ", $tag_links);
|
||||
$h_tag_links = Tag::implode($tag_links);
|
||||
$h_tags = html_escape($image->get_tag_list());
|
||||
|
||||
return "
|
||||
|
|
Reference in a new issue