Skip to content

Commit

Permalink
Apply PSR-2 fixers php-cs-fixer fix .
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuz committed Nov 25, 2015
1 parent e60cd19 commit 79e8908
Show file tree
Hide file tree
Showing 87 changed files with 6,557 additions and 6,924 deletions.
491 changes: 209 additions & 282 deletions accessories.php

Large diffs are not rendered by default.

235 changes: 103 additions & 132 deletions admin.php

Large diffs are not rendered by default.

176 changes: 73 additions & 103 deletions data.php

Large diffs are not rendered by default.

155 changes: 60 additions & 95 deletions database.php

Large diffs are not rendered by default.

70 changes: 30 additions & 40 deletions iframe_content.php
Expand Up @@ -7,9 +7,9 @@
// see file LICENCE for details

// do not overwrite $s_referer in script_start.inc.php
$no_session_referer = TRUE;
$no_session_referer = true;

require('./inc/script_start.inc.php');
require './inc/script_start.inc.php';

$key = get_request_data('key', 'GET');

Expand All @@ -21,32 +21,28 @@
break;

case 'dbstat':
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != FALSE) {
$content = fbird_db_info($service, $s_login['database'], $job['option']);
$content = trim(str_replace(array(chr(0x01), "\n\n"), array('', "\n"), $content));
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != false) {
$content = fbird_db_info($service, $s_login['database'], $job['option']);
$content = trim(str_replace(array(chr(0x01), "\n\n"), array('', "\n"), $content));
fbird_service_detach($service);
}
else {
} else {
$error = fbird_errmsg();
}
break;

case 'backup':
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != FALSE) {

$content = fbird_backup($service, $job['source'], $job['target'], $job['options'], TRUE);
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != false) {
$content = fbird_backup($service, $job['source'], $job['target'], $job['options'], true);
$content = str_replace(array(chr(0x01).chr(0x0a), 'gbak: '), '', $content);
fbird_service_detach($service);
}
else {
} else {
$error = fbird_errmsg();
}
break;

case 'restore':
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != FALSE) {

$content = fbird_restore($service, $job['source'], $job['target'], $job['options'], TRUE);
if (($service = fbird_service_attach($s_login['host'], $s_login['user'], $s_login['password'])) != false) {
$content = fbird_restore($service, $job['source'], $job['target'], $job['options'], true);
$content = str_replace(array(chr(0x01).chr(0x0a), 'gbak: '), '', $content);
fbird_service_detach($service);

Expand All @@ -60,26 +56,24 @@

if ($dbhandle = db_connect()) {
// connected successfully
$s_connected = TRUE;
$s_connected = true;
remove_edit_panels();
}
else {
} else {
// connect failed
$content .= '<p><span class="err">' . $info_strings['FBError'] . ':</span>' . fbird_errmsg()."</p>\n";
$content .= '<p><span class="err">'.$info_strings['FBError'].':</span>'.fbird_errmsg()."</p>\n";
$s_login['password'] = '';
$s_connected = FALSE;
$s_connected = false;
}
cleanup_session();
}
}
else {
} else {
$error = fbird_errmsg();
}
break;

case 'export':

include('./inc/export.inc.php');
include './inc/export.inc.php';

ob_start();
export_data($job['data']);
Expand All @@ -94,27 +88,23 @@
globalize_session_vars();
}


function get_iframejob($iframejobs, $key) {

function get_iframejob($iframejobs, $key)
{
if (isset($iframejobs[$key])) {

return $iframejobs[$key];
}

return FALSE;
return false;
}

function iframe_content($content, $error) {

return html_head('FirebirdWebAdmin ' . VERSION)
. "<body class=\"if\">\n"
. ($error ? '<p><span class="err">'.$GLOBALS['info_strings']['Error'].':</span> '.$error."</p>\n" : '')
. "<pre>\n"
. htmlspecialchars($content)."\n"
. "</pre>\n"
. "</body>\n"
. "</html>\n";
function iframe_content($content, $error)
{
return html_head('FirebirdWebAdmin '.VERSION)
."<body class=\"if\">\n"
.($error ? '<p><span class="err">'.$GLOBALS['info_strings']['Error'].':</span> '.$error."</p>\n" : '')
."<pre>\n"
.htmlspecialchars($content)."\n"
."</pre>\n"
."</body>\n"
."</html>\n";
}

?>

0 comments on commit 79e8908

Please sign in to comment.