Skip to content
Extraits de code Groupes Projets
Valider 0c2e947c rédigé par mattab's avatar mattab
Parcourir les fichiers

Merge remote-tracking branch 'origin/master'

parents 80de9f14 1b1611d6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -21,6 +21,7 @@ use Piwik\Plugin; ...@@ -21,6 +21,7 @@ use Piwik\Plugin;
use Piwik\Settings\Manager as SettingsManager; use Piwik\Settings\Manager as SettingsManager;
use Piwik\Url; use Piwik\Url;
use Piwik\View; use Piwik\View;
use Piwik\Version;
use Exception; use Exception;
/** /**
...@@ -311,8 +312,16 @@ class Controller extends Plugin\ControllerAdmin ...@@ -311,8 +312,16 @@ class Controller extends Plugin\ControllerAdmin
return $pluginsFiltered; return $pluginsFiltered;
} }
public function safemode($lastError) public function safemode($lastError = array())
{ {
if (empty($lastError)) {
$lastError = array(
'message' => Common::getRequestVar('error_message', null, 'string'),
'file' => Common::getRequestVar('error_file', null, 'string'),
'line' => Common::getRequestVar('error_line', null, 'integer')
);
}
$outputFormat = Common::getRequestVar('format', 'html', 'string'); $outputFormat = Common::getRequestVar('format', 'html', 'string');
$outputFormat = strtolower($outputFormat); $outputFormat = strtolower($outputFormat);
...@@ -338,6 +347,7 @@ class Controller extends Plugin\ControllerAdmin ...@@ -338,6 +347,7 @@ class Controller extends Plugin\ControllerAdmin
$view->deactivateNonce = Nonce::getNonce(static::DEACTIVATE_NONCE); $view->deactivateNonce = Nonce::getNonce(static::DEACTIVATE_NONCE);
$view->uninstallNonce = Nonce::getNonce(static::UNINSTALL_NONCE); $view->uninstallNonce = Nonce::getNonce(static::UNINSTALL_NONCE);
$view->emailSuperUser = Piwik::getSuperUserEmail(); $view->emailSuperUser = Piwik::getSuperUserEmail();
$view->piwikVersion = Version::VERSION;
$view->pluginCausesIssue = ''; $view->pluginCausesIssue = '';
if (!empty($lastError['file'])) { if (!empty($lastError['file'])) {
......
...@@ -58,10 +58,6 @@ ...@@ -58,10 +58,6 @@
} }
} }
.old-ie .pluginslist .plugin .featuredIcon {
margin-top: -20px;
}
.pluginslist { .pluginslist {
margin-top: 20px; margin-top: 20px;
max-width: 980px; max-width: 980px;
...@@ -151,6 +147,9 @@ ...@@ -151,6 +147,9 @@
margin-bottom: 3px; margin-bottom: 3px;
height: 24px; height: 24px;
width: 24px; width: 24px;
position: absolute;
right: 1px;
margin-top: -22px;
} }
.footer { .footer {
......
<html> <html>
<head> <head>
<style type="text/css"> <style type="text/css">
html, body {
background-color: white;
}
td { td {
border: 1px solid #ccc; border: 1px solid #ccc;
border-collapse: collapse; border-collapse: collapse;
...@@ -46,27 +49,50 @@ ...@@ -46,27 +49,50 @@
</p> </p>
<table> <table>
{% for pluginName, plugin in plugins if plugin.uninstallable %} {% for pluginName, plugin in plugins if plugin.uninstallable and plugin.activated %}
<tr {% if loop.index is divisibleby(2) %}style="background-color: #eeeeee"{% endif %}> <tr {% if loop.index is divisibleby(2) %}style="background-color: #eeeeee"{% endif %}>
<td style="min-width:200px;"> <td style="min-width:200px;">
{{ pluginName }} {{ pluginName }}
</td> </td>
<td> <td>
{% if plugin.activated %} <a href="index.php?module=CorePluginsAdmin&action=deactivate&pluginName={{ pluginName }}&nonce={{ deactivateNonce }}"
<a href="index.php?module=CorePluginsAdmin&action=deactivate&pluginName={{ pluginName }}&nonce={{ deactivateNonce }}" target="_blank">deactivate</a>
target="_blank">deactivate</a>
{% else %}
<a href="index.php?module=CorePluginsAdmin&action=uninstall&pluginName={{ pluginName }}&nonce={{ uninstallNonce }}"
target="_blank">uninstall</a>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% set uninstalledPluginsFound = false %}
{% for pluginName, plugin in plugins if plugin.uninstallable and not plugin.activated %}
{% set uninstalledPluginsFound = true %}
{% endfor %}
{% if uninstalledPluginsFound %}
<p>
If this error still occurs after disabling all plugins, you might want to consider uninstalling some
plugins. Keep in mind: The plugin will be completely removed from your platform.
</p>
<table>
{% for pluginName, plugin in plugins if plugin.uninstallable and not plugin.activated %}
<tr {% if loop.index is divisibleby(2) %}style="background-color: #eeeeee"{% endif %}>
<td style="min-width:200px;">
{{ pluginName }}
</td>
<td>
<a href="index.php?module=CorePluginsAdmin&action=uninstall&pluginName={{ pluginName }}&nonce={{ uninstallNonce }}"
target="_blank" onclick="return confirm('{{ 'CorePluginsAdmin_UninstallConfirm'|translate(pluginName)|e('js') }}')">uninstall</a>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
<p> <p>
<br />
We appreciate if you send the We appreciate if you send the
<a href="mailto:hello@piwik.org?subject={{ 'Fatal error in Piwik'|e('url') }}&body={{ lastError.message|e('url') }}%20in%20{{ lastError.file|e('url') }}%20{{ lastError.line|e('url') }}">error report</a> <a href="mailto:hello@piwik.org?subject={{ 'Fatal error in Piwik ' ~ piwikVersion|e('url') }}&body={{ lastError.message|e('url') }}%20in%20{{ lastError.file|e('url') }}%20{{ lastError.line|e('url') }}">error report</a>
to the Piwik team. to the Piwik team.
</p> </p>
...@@ -77,7 +103,7 @@ ...@@ -77,7 +103,7 @@
{% else %} {% else %}
<p> <p>
If this error continues to happen you may want to send an If this error continues to happen you may want to send an
<a href="mailto:{{ emailSuperUser }}?subject={{ 'Fatal error in Piwik'|e('url') }}&body={{ lastError.message|e('url') }}%20in%20{{ lastError.file|e('url') }}%20{{ lastError.line|e('url') }}">error report</a> <a href="mailto:{{ emailSuperUser }}?subject={{ 'Fatal error in Piwik ' ~ piwikVersion|e('url') }}&body={{ lastError.message|e('url') }}%20in%20{{ lastError.file|e('url') }}%20{{ lastError.line|e('url') }}">error report</a>
to your system administrator. to your system administrator.
</p> </p>
{% endif %} {% endif %}
......
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