Bugfixes.

This commit is contained in:
Tom Slominski
2016-07-24 12:42:10 +01:00
parent d6e0a6548d
commit 94fa2a3285
2 changed files with 11 additions and 6 deletions

View File

@@ -7,15 +7,17 @@ if ( ISQ::$general['clipboard'] ) {
$dependencies[] = 'ZeroClipboard';
};
function display_error( $message, $action ) {
function display_error( $message, $action = null ) {
echo '<div class="content error">';
echo '<p class="message">' . $message . '</p>';
if( !empty( $action ) ) {
echo $action;
} else {
echo '<p class="action"><a href="javascript:history.go(-1)" class="button">' . yourls__( '&larr; Go back and try again', 'isq_translation' ) . '</a></p>';
}
echo '<p class="action">';
if( !empty( $action ) ) {
echo $action;
} else {
echo '<a href="' . YOURLS_SITE . '" class="button">' . yourls__( '&larr; Go home and try again', 'isq_translation' ) . '</a>';
}
echo '</p>';
echo '</div>';
include('footer.php');