Skip to content
Extraits de code Groupes Projets
Valider bdd02468 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

now displaying new logo in standard error message template

+ on the "welcome piwik must be updated" page 
and making some error messages better

git-svn-id: http://dev.piwik.org/svn/trunk@4337 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 325542f6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -57,9 +57,9 @@ abstract class Piwik_Controller ...@@ -57,9 +57,9 @@ abstract class Piwik_Controller
$aPluginName = explode('_', get_class($this)); $aPluginName = explode('_', get_class($this));
$this->pluginName = $aPluginName[1]; $this->pluginName = $aPluginName[1];
$date = Piwik_Common::getRequestVar('date', 'yesterday', 'string'); $date = Piwik_Common::getRequestVar('date', 'yesterday', 'string');
$this->idSite = Piwik_Common::getRequestVar('idSite', false, 'int');
$this->site = new Piwik_Site($this->idSite);
try { try {
$this->idSite = Piwik_Common::getRequestVar('idSite', false, 'int');
$this->site = new Piwik_Site($this->idSite);
$date = $this->getDateParameterInTimezone($date, $this->site->getTimezone()); $date = $this->getDateParameterInTimezone($date, $this->site->getTimezone());
$this->setDate($date); $this->setDate($date);
} catch(Exception $e){ } catch(Exception $e){
...@@ -67,6 +67,7 @@ abstract class Piwik_Controller ...@@ -67,6 +67,7 @@ abstract class Piwik_Controller
$this->date = null; $this->date = null;
} }
} }
/** /**
* Helper method to convert "today" or "yesterday" to the default timezone specified. * Helper method to convert "today" or "yesterday" to the default timezone specified.
* If the date is absolute, ie. YYYY-MM-DD, it will not be converted to the timezone * If the date is absolute, ie. YYYY-MM-DD, it will not be converted to the timezone
...@@ -316,6 +317,11 @@ abstract class Piwik_Controller ...@@ -316,6 +317,11 @@ abstract class Piwik_Controller
$view->date = $this->strDate; $view->date = $this->strDate;
try { try {
$view->idSite = $this->idSite;
if(empty($this->site) || empty($this->idSite))
{
throw new Exception("The requested website idSite is not found in the request, or is invalid");
}
$this->setPeriodVariablesView($view); $this->setPeriodVariablesView($view);
$rawDate = Piwik_Common::getRequestVar('date'); $rawDate = Piwik_Common::getRequestVar('date');
...@@ -331,11 +337,6 @@ abstract class Piwik_Controller ...@@ -331,11 +337,6 @@ abstract class Piwik_Controller
} }
$view->rawDate = $rawDate; $view->rawDate = $rawDate;
$view->prettyDate = $period->getPrettyString(); $view->prettyDate = $period->getPrettyString();
$view->idSite = $this->idSite;
if(is_null($this->site))
{
throw new Exception("invalid website");
}
$view->siteName = $this->site->getName(); $view->siteName = $this->site->getName();
$view->siteMainUrl = $this->site->getMainUrl(); $view->siteMainUrl = $this->site->getMainUrl();
......
...@@ -29,4 +29,4 @@ ...@@ -29,4 +29,4 @@
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<div id="title"><span id="h1">Piwik </span><span id="subh1"> # {'General_OpenSourceWebAnalytics'|translate}</span></div> <div id="title"><img title='Piwik' src='themes/default/images/logo-header.png' style='margin-left:10px'><span id="subh1"> # {'General_OpenSourceWebAnalytics'|translate}</span></div>
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
{/foreach} {/foreach}
</code> </code>
</div> </div>
</li>
</ul>
<br /><br /> <br /><br />
<h4>{'CoreUpdater_ReadyToGo'|translate}</h4> <h4>{'CoreUpdater_ReadyToGo'|translate}</h4>
<p>{'CoreUpdater_TheUpgradeProcessMayTakeAWhilePleaseBePatient'|translate}</p> <p>{'CoreUpdater_TheUpgradeProcessMayTakeAWhilePleaseBePatient'|translate}</p>
...@@ -90,6 +92,7 @@ code { ...@@ -90,6 +92,7 @@ code {
} }
li { li {
margin-top:10px; margin-top:10px;
margin-left:30px;
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -16,14 +16,22 @@ html { background: #eee; } ...@@ -16,14 +16,22 @@ html { background: #eee; }
font-weight: lighter; font-weight: lighter;
} }
#subh1 { #subh1 {
color: #879DBD; color: #6B320B;
font-size: 25px; font-family: tahoma,Georgia;
font-weight: lighter; font-size: 17pt;
}
#subh1 a {
color: #6B320B;
text-decoration:none;
}
#title img{
vertical-align:bottom;
} }
#title { #title {
padding-bottom:5px; padding-bottom:5px;
border-bottom:1px solid #F0F0F0; border-bottom:1px solid #F0F0F0;
font:42px Georgia, "Times New Roman", Times, serif; font:42px Georgia, serif;
} }
p, dt { p, dt {
line-height: 120%; line-height: 120%;
......
...@@ -9,5 +9,4 @@ ...@@ -9,5 +9,4 @@
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<div id="title"><span id="h1">Piwik </span><span id="subh1"> # open source web analytics</span></div> <div id="title"><img title='Piwik' src='themes/default/images/logo-header.png' style='margin-left:10px'><span id="subh1"> # <a href='http://piwik.org/'>web analytics</a></span></div>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter