diff --git a/htdocs/404.php b/htdocs/404.php
index 20dceac9..c3bd9415 100644
--- a/htdocs/404.php
+++ b/htdocs/404.php
@@ -19,43 +19,18 @@
$tpl->cache_lifetime = 300;
$tpl->cache_id = $sUserCountry;
- // simplify variables if exists
- $redirectUrl = '';
- $isRedirect404 = false;
- if (isset($_SERVER['REDIRECT_URL']))
- {
- $redirectUrl = $_SERVER['REDIRECT_URL'];
- $isRedirect404 = true;
- }
-
- // assign redirection status
+ // test for redirection to this page
+ $isRedirect404 = isset($_SERVER['REDIRECT_URL']);
$tpl->assign('isRedirect404', $isRedirect404);
-
- // check if original path starts with "/" and remove it
- if (substr($redirectUrl, 0, 1) == '/')
- $redirectUrl = substr($redirectUrl, 1);
-
- // get number of subdirectories (-1 because the last part of url is treated as file)
- $numDirs = count(explode('/', $redirectUrl)) - 1 -2;
-
- // put ../ together according to $numDirs
- $prePath = '';
- for ($i=0; $i<$numDirs; $i++)
- {
- $prePath .= '../';
- }
-
- // assign path
- $tpl->assign('actualpath',$prePath);
- // website, if is 404 redirection
+ // determine website url, if is 404 redirection
if ($isRedirect404)
{
// check length
$uril = 70;
$uri = 'http://'.strtolower($_SERVER['SERVER_NAME']).$_SERVER['REQUEST_URI'];
// limit to $uril
- if(strlen($uri) > $uril) {
+ if (strlen($uri) > $uril) {
$uri = substr($uri,0,$uril-3).'...';
}
@@ -73,7 +48,10 @@
// simplify $opt
foreach ($options as $option)
{
- $opt404[$option] = (isset($opt['page']['404'][$_SERVER['SERVER_NAME']][$option]) ? $opt['page']['404'][$_SERVER['SERVER_NAME']][$option] : $opt['page']['404']['www.opencaching.de'][$option]);
+ if (isset($opt['page']['404'][$_SERVER['SERVER_NAME']][$option]))
+ $opt404[$option] = $opt['page']['404'][$_SERVER['SERVER_NAME']][$option];
+ else
+ $opt404[$option] = $opt['page']['404']['www.opencaching.de'][$option];
}
// get feeds from $feeds array
diff --git a/htdocs/lib2/OcSmarty.class.php b/htdocs/lib2/OcSmarty.class.php
index 338fcc5f..b04947e9 100644
--- a/htdocs/lib2/OcSmarty.class.php
+++ b/htdocs/lib2/OcSmarty.class.php
@@ -164,6 +164,7 @@ class OcSmarty extends Smarty
$optn['page']['headimagepath'] = $opt['page']['headimagepath'];
$optn['page']['max_logins_per_hour'] = $opt['page']['max_logins_per_hour'];
$optn['page']['absolute_url'] = $opt['page']['absolute_url'];
+ $optn['page']['absolute_urlpath'] = parse_url($opt['page']['absolute_url'], PHP_URL_PATH);
$optn['page']['target'] = $this->target;
$optn['page']['showdonations'] = $opt['page']['showdonations'];
$optn['page']['title'] = $opt['page']['title'];
diff --git a/htdocs/templates2/ocstyle/res_cacheicon_22.tpl b/htdocs/templates2/ocstyle/res_cacheicon_22.tpl
index a2c58f56..149461b5 100644
--- a/htdocs/templates2/ocstyle/res_cacheicon_22.tpl
+++ b/htdocs/templates2/ocstyle/res_cacheicon_22.tpl
@@ -3,32 +3,29 @@
*
* Unicode Reminder メモ
***************************************************************************}
-{* check if actualpath is set *}
-{if !isset($actualpath)}{assign var='actualpath' value=''}{/if}
-
{strip} {* OCSTYLE *}
{*cachetype=1 status=1 logtype=0 owner=false small=false*}
{if $cachetype==1}
-
+
{elseif $cachetype==2}
-
+
{elseif $cachetype==3}
-
+
{elseif $cachetype==4}
-
+
{elseif $cachetype==5}
-
+
{elseif $cachetype==6}
-
+
{elseif $cachetype==7}
-
+
{elseif $cachetype==8}
-
+
{elseif $cachetype==9}
-
+
{elseif $cachetype==10}
-
+
{else}
{/if}
diff --git a/htdocs/templates2/ocstyle/res_newcaches.tpl b/htdocs/templates2/ocstyle/res_newcaches.tpl
index 59ce681c..20bfee82 100755
--- a/htdocs/templates2/ocstyle/res_newcaches.tpl
+++ b/htdocs/templates2/ocstyle/res_newcaches.tpl
@@ -3,9 +3,6 @@
*
* Unicode Reminder メモ
***************************************************************************}
-{* check if actualpath is set *}
-{if !isset($actualpath)}{assign var='actualpath' value=''}{/if}
-
{if $minimap_enabled}
| {include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type actualpath=$actualpath} | +{include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type} | {$cacheitem.date_created|date_format:$opt.format.date} | -{$cacheitem.name|escape} {include file="res_oconly.tpl" oconly=$cacheitem.oconly actualpath=$actualpath} + | {$cacheitem.name|escape} {include file="res_oconly.tpl" oconly=$cacheitem.oconly} {t}by{/t} {$cacheitem.username|escape} |