summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-06-01 13:34:57 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2016-06-01 13:34:57 +0200
commit13892417c45156f9546d70ac97882b5812e24f58 (patch)
tree64bfd12903b84f9a81a0c79b1c18bd4a56105ee9 /lib
parent7b4459d28d40523c70ec05a733e158f2c14faac4 (diff)
downloadnextcloud-server-13892417c45156f9546d70ac97882b5812e24f58.tar.gz
nextcloud-server-13892417c45156f9546d70ac97882b5812e24f58.zip
Do not show the hint when it's the same as the message
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/template.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index ce3b3dba38d..5023e3a60c8 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -316,6 +316,11 @@ class OC_Template extends \OC\Template\Base {
* @param string $hint An optional hint message - needs to be properly escaped
*/
public static function printErrorPage( $error_msg, $hint = '' ) {
+ if ($error_msg === $hint) {
+ // If the hint is the same as the message there is no need to display it twice.
+ $hint = '';
+ }
+
try {
$content = new \OC_Template( '', 'error', 'error', false );
$errors = array(array('error' => $error_msg, 'hint' => $hint));