viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
Filename | |
---|---|
src/views/elements/WikiElement.php |
diff --git a/src/views/elements/WikiElement.php b/src/views/elements/WikiElement.php index cfe0556a5..7955fd04f 100644 --- a/src/views/elements/WikiElement.php +++ b/src/views/elements/WikiElement.php @@ -1307,6 +1307,7 @@ class WikiElement extends Element implements CrawlConstants $current_animated_thumb = "$athumb_prefix$thumb_connect" . $encode_name; $is_a_default_thumb = false; + $alt_current_url = $current_url; if (!empty($data['SUB_PATH'])) { if (strpos($current_url, "sf=") === false && $url_is_folder_prefix) { @@ -1315,6 +1316,11 @@ class WikiElement extends Element implements CrawlConstants $current_url .= $add_sub_path; $clear_url .= $add_sub_path; } + $alt_current_url = "$folder_prefix&sf=". + urlencode($data['SUB_PATH']) . "&n=". + $encode_name; + $alt_current_url = preg_replace("/resources=true/u", + "resources=false", $alt_current_url); if (!$resource['has_thumb'] || ($use_editable_thumb && empty($read_mode))) { $current_thumb = $default_thumb; @@ -1322,11 +1328,7 @@ class WikiElement extends Element implements CrawlConstants if (empty($read_mode) &&!$disabled && $use_editable_thumb) { $current_thumb = $default_editable_thumb; - $current_url = "$folder_prefix&sf=". - urlencode($data['SUB_PATH']) . "&n=". - $encode_name; - $current_url = preg_replace("/resources=true/u", - "resources=false", $current_url); + $current_url = $alt_current_url; } } if (!empty($resource['is_dir'])) { @@ -1336,6 +1338,10 @@ class WikiElement extends Element implements CrawlConstants $is_a_default_thumb = true; } } else { + $alt_current_url = "$folder_prefix&n=". + urlencode($name); + $alt_current_url = preg_replace("/resources=true/u", + "resources=false", $alt_current_url); if (!$resource['has_thumb'] || ($use_editable_thumb && empty($read_mode))) { $current_thumb = $default_thumb; @@ -1343,10 +1349,7 @@ class WikiElement extends Element implements CrawlConstants if (empty($read_mode) &&!$disabled && $use_editable_thumb) { $current_thumb = $default_editable_thumb; - $current_url = "$folder_prefix&n=". - urlencode($name); - $current_url = preg_replace("/resources=true/u", - "resources=false", $current_url); + $current_url = $alt_current_url; } } if (!empty($resource['is_dir'])) { @@ -1363,6 +1366,8 @@ class WikiElement extends Element implements CrawlConstants "arg=media-detail-read"; $current_media_url = preg_replace('/arg=(media|edit|source)/', $media_detail, $current_url); + $alt_current_media_url = preg_replace('/arg=(media|edit|source)/', + $media_detail, $alt_current_url); $first_resource = ""; if ($is_list) { $tr = "tr"; @@ -1441,8 +1446,8 @@ class WikiElement extends Element implements CrawlConstants } $info_link = ($is_detail) ? "" : " <a class='info-link' ". "onclick='toggleDisplay(\"info-item\");elt(\"info-frame\").src=". - "\"$current_media_url\";window.event.stopPropagation();". - "return false;' href='$current_media_url'>ⓘ</a>"; + "\"$alt_current_media_url\";window.event.stopPropagation();". + "return false;' href='$alt_current_media_url'>ⓘ</a>"; if ($is_seen && $is_list) { e("<$td class='view-indicator huge-font'><span " . "id='$hash2_id' class='marked' onclick='" .