Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2012-02-11 14:07:05 +0400
committermattpiwik <matthieu.aubry@gmail.com>2012-02-11 14:07:05 +0400
commitae8e02dc37222bcdb42696c8f7e33aff24f1e1fb (patch)
treee72ca50eb36951426dc6336da1bc0a2e1e81db24 /plugins
parent7f0793738b0c3d94135b852b63b1ec6e5284091e (diff)
Fixes #2701
* Iframe busting ALL pages except widgets/dashboard * Refactored iframe busting code * This new behavior might break some backward compatibility but can be disabled by setting enable_framed_pages = 1 in the config file @vipsoft your review is welcome on this one! git-svn-id: http://dev.piwik.org/svn/trunk@5805 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreAdminHome/templates/header.tpl20
-rw-r--r--plugins/CoreHome/templates/header.tpl4
-rw-r--r--plugins/CoreHome/templates/iframe_buster_body.tpl14
-rw-r--r--plugins/CoreHome/templates/iframe_buster_header.tpl5
-rw-r--r--plugins/Login/templates/header.tpl21
5 files changed, 29 insertions, 35 deletions
diff --git a/plugins/CoreAdminHome/templates/header.tpl b/plugins/CoreAdminHome/templates/header.tpl
index a0bca8f1a9..c35e4dd22e 100644
--- a/plugins/CoreAdminHome/templates/header.tpl
+++ b/plugins/CoreAdminHome/templates/header.tpl
@@ -14,25 +14,11 @@
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="themes/default/ieonly.css" />
<![endif]-->
-{if isset($enableFrames) && !$enableFrames}
-{literal}
- <style type="text/css">body { display : none; }</style>
-{/literal}
-{/if}
+{include file="CoreHome/templates/iframe_buster_header.tpl"}
</head>
<body>
-{if isset($enableFrames) && !$enableFrames}
-{literal}
- <script type="text/javascript">
- if(self == top) {
- var theBody = document.getElementsByTagName('body')[0];
- theBody.style.display = 'block';
- } else {
- top.location = self.location;
- }
- </script>
-{/literal}
-{/if}
+
+{include file="CoreHome/templates/iframe_buster_body.tpl"}
<div id="root">
{if !isset($showTopMenu) || $showTopMenu}
{include file="CoreHome/templates/top_bar.tpl"}
diff --git a/plugins/CoreHome/templates/header.tpl b/plugins/CoreHome/templates/header.tpl
index b6be7544c2..239b956bc9 100644
--- a/plugins/CoreHome/templates/header.tpl
+++ b/plugins/CoreHome/templates/header.tpl
@@ -16,8 +16,10 @@
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="themes/default/ieonly.css" />
<![endif]-->
+{include file="CoreHome/templates/iframe_buster_header.tpl"}
</head>
<body>
+{include file="CoreHome/templates/iframe_buster_body.tpl"}
<div id="root">{if !isset($showTopMenu) || $showTopMenu}
{include file="CoreHome/templates/top_bar.tpl"}
{/if}
@@ -26,4 +28,4 @@
<div class="ui-confirm" id="alert">
<h2></h2>
<input id="yes" type="button" value="{'General_Ok'|translate}" />
-</div>
+</div> \ No newline at end of file
diff --git a/plugins/CoreHome/templates/iframe_buster_body.tpl b/plugins/CoreHome/templates/iframe_buster_body.tpl
new file mode 100644
index 0000000000..99d072efc6
--- /dev/null
+++ b/plugins/CoreHome/templates/iframe_buster_body.tpl
@@ -0,0 +1,14 @@
+
+{if isset($enableFrames) && !$enableFrames}
+{literal}
+ <script type="text/javascript">
+ if(self == top) {
+ var theBody = document.getElementsByTagName('body')[0];
+ theBody.style.display = 'block';
+ } else {
+ top.location = self.location;
+ }
+ </script>
+{/literal}
+{/if}
+
diff --git a/plugins/CoreHome/templates/iframe_buster_header.tpl b/plugins/CoreHome/templates/iframe_buster_header.tpl
new file mode 100644
index 0000000000..319aa7db66
--- /dev/null
+++ b/plugins/CoreHome/templates/iframe_buster_header.tpl
@@ -0,0 +1,5 @@
+{if isset($enableFrames) && !$enableFrames}
+{literal}
+ <style type="text/css">body { display : none; }</style>
+{/literal}
+{/if} \ No newline at end of file
diff --git a/plugins/Login/templates/header.tpl b/plugins/Login/templates/header.tpl
index a26f7a0218..3cd9011b46 100644
--- a/plugins/Login/templates/header.tpl
+++ b/plugins/Login/templates/header.tpl
@@ -8,11 +8,8 @@
<link rel="stylesheet" type="text/css" href="plugins/Login/templates/login.css" />
<meta name="description" content="{'General_OpenSourceWebAnalytics'|translate|escape}" />
-{if isset($enableFrames) && !$enableFrames}
-{literal}
- <style type="text/css">body { display : none; }</style>
-{/literal}
-{/if}
+
+
{if isset($forceSslLogin) && $forceSslLogin}
{literal}
<script type="text/javascript">
@@ -40,20 +37,10 @@
{if 'General_LayoutDirection'|translate =='rtl'}
<link rel="stylesheet" type="text/css" href="themes/default/rtl.css" />
{/if}
+{include file="CoreHome/templates/iframe_buster_header.tpl"}
</head>
<body class="login">
-{if isset($enableFrames) && !$enableFrames}
-{literal}
- <script type="text/javascript">
- if(self == top) {
- var theBody = document.getElementsByTagName('body')[0];
- theBody.style.display = 'block';
- } else {
- top.location = self.location;
- }
- </script>
-{/literal}
-{/if}
+{include file="CoreHome/templates/iframe_buster_body.tpl"}
{include file="default/ie6.tpl"}
<div id="logo">
{if !$isCustomLogo}<a href="http://piwik.org" alt="Piwik" title="{$linkTitle}">{/if}