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
This commit is contained in:
Vincent Petry 2016-06-02 10:40:53 +02:00
commit f37d519d0d
1 changed files with 5 additions and 0 deletions

View File

@ -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));