Skip to content
Snippets Groups Projects
Commit f37d519d authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #24946 from owncloud/issue-24943-duplicate-downgrade-unsupported-message

Do not show the hint when it's the same as the message
parents 6b142292 13892417
No related branches found
No related tags found
No related merge requests found
...@@ -316,6 +316,11 @@ class OC_Template extends \OC\Template\Base { ...@@ -316,6 +316,11 @@ class OC_Template extends \OC\Template\Base {
* @param string $hint An optional hint message - needs to be properly escaped * @param string $hint An optional hint message - needs to be properly escaped
*/ */
public static function printErrorPage( $error_msg, $hint = '' ) { 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 { try {
$content = new \OC_Template( '', 'error', 'error', false ); $content = new \OC_Template( '', 'error', 'error', false );
$errors = array(array('error' => $error_msg, 'hint' => $hint)); $errors = array(array('error' => $error_msg, 'hint' => $hint));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment