Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/phpmyadmin/phpmyadmin int…
Browse files Browse the repository at this point in the history
…o UT_plu_parse
  • Loading branch information
adamgsoc2013 committed Jul 19, 2013
2 parents f2cf954 + 82a8c5d commit c4feb3e
Show file tree
Hide file tree
Showing 15 changed files with 1,656 additions and 86 deletions.
6 changes: 3 additions & 3 deletions libraries/operations.lib.php
Expand Up @@ -395,7 +395,7 @@ function PMA_getSqlQueryAndCreateDbBeforeCopy()
*
* @param array $tables_full array of all tables in given db or dbs
* @param object $export_sql_plugin export plugin instance
* @param boolean $move whether databse name is empty or not
* @param boolean $move whether database name is empty or not
* @param string $db database name
*
* @return string sql constraints query for full databases
Expand Down Expand Up @@ -459,7 +459,7 @@ function PMA_getViewsAndCreateSqlViewStandIn(
*
* @param array $tables_full array of all tables in given db or dbs
* @param string $sql_query sql query for all operations
* @param boolean $move whether databse name is empty or not
* @param boolean $move whether database name is empty or not
* @param string $db database name
*
* @return array ($sql_query, $error)
Expand Down Expand Up @@ -562,7 +562,7 @@ function PMA_runEventDefinitionsForDb($db)
* Handle the views, return the boolean value whether table rename/copy or not
*
* @param array $views views as an array
* @param boolean $move whether databse name is empty or not
* @param boolean $move whether database name is empty or not
* @param string $db database name
*
* @return boolean $_error whether table rename/copy or not
Expand Down
16 changes: 13 additions & 3 deletions libraries/plugins/auth/AuthenticationHttp.class.php
Expand Up @@ -37,7 +37,11 @@ public function auth()
&& ! empty($GLOBALS['cfg']['Server']['LogoutURL'])
) {
PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
exit;
if (! defined('TESTSUITE')) {
exit;
} else {
return false;
}
}

if (empty($GLOBALS['cfg']['Server']['auth_http_realm'])) {
Expand Down Expand Up @@ -81,7 +85,11 @@ public function auth()
include CUSTOM_FOOTER_FILE;
}

exit;
if (! defined('TESTSUITE')) {
exit;
} else {
return false;
}
}

/**
Expand Down Expand Up @@ -165,7 +173,9 @@ public function authCheck()
) {
$PHP_AUTH_USER = '';
// -> delete user's choices that were stored in session
session_destroy();
if (! defined('TESTSUITE')) {
session_destroy();
}
}

// Returns whether we get authentication settings or not
Expand Down
31 changes: 24 additions & 7 deletions libraries/plugins/auth/AuthenticationSignon.class.php
Expand Up @@ -42,7 +42,12 @@ public function auth()
} else {
PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['SignonURL']);
}
exit();

if (! defined('TESTSUITE')) {
exit();
} else {
return false;
}
}

/**
Expand Down Expand Up @@ -112,12 +117,16 @@ public function authCheck()
/* End current session */
$old_session = session_name();
$old_id = session_id();
session_write_close();
if (! defined('TESTSUITE')) {
session_write_close();
}

/* Load single signon session */
session_name($session_name);
session_id($_COOKIE[$session_name]);
session_start();
if (! defined('TESTSUITE')) {
session_start();
}

/* Clear error message */
unset($_SESSION['PMA_single_signon_error_message']);
Expand Down Expand Up @@ -157,14 +166,18 @@ public function authCheck()
}

/* End single signon session */
session_write_close();
if (! defined('TESTSUITE')) {
session_write_close();
}

/* Restart phpMyAdmin session */
session_name($old_session);
if (!empty($old_id)) {
session_id($old_id);
}
session_start();
if (! defined('TESTSUITE')) {
session_start();
}

/* Set the single signon host */
$GLOBALS['cfg']['Server']['host'] = $single_signon_host;
Expand Down Expand Up @@ -234,12 +247,16 @@ public function authFails()
/* Does session exist? */
if (isset($_COOKIE[$session_name])) {
/* End current session */
session_write_close();
if (! defined('TESTSUITE')) {
session_write_close();
}

/* Load single signon session */
session_name($session_name);
session_id($_COOKIE[$session_name]);
session_start();
if (! defined('TESTSUITE')) {
session_start();
}

/* Set error message */
if (! empty($GLOBALS['login_without_password_is_forbidden'])) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/relation.lib.php
Expand Up @@ -1282,7 +1282,7 @@ function PMA_getRelatives($all_tables, $master)
*
* usually called after a column in a table was renamed
*
* @param string $db databse name
* @param string $db database name
* @param string $table table name
* @param string $field old field name
* @param string $new_name new field name
Expand Down

0 comments on commit c4feb3e

Please sign in to comment.