本文整理汇总了PHP中PMA_userprefsRedirect函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_userprefsRedirect函数的具体用法?PHP PMA_userprefsRedirect怎么用?PHP PMA_userprefsRedirect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_userprefsRedirect函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$form_display->fixErrors();
// redirect
$url_params = array('form' => $form_param);
PMA_sendHeaderLocation('./prefs_forms.php' . URL::getCommonRaw($url_params));
exit;
}
$error = null;
if ($form_display->process(false) && !$form_display->hasErrors()) {
// save settings
$result = PMA_saveUserprefs($cf->getConfigArray());
if ($result === true) {
// reload config
$GLOBALS['PMA_Config']->loadUserPreferences();
$tabHash = isset($_POST['tab_hash']) ? $_POST['tab_hash'] : null;
$hash = ltrim($tabHash, '#');
PMA_userprefsRedirect('prefs_forms.php', array('form' => $form_param), $hash);
exit;
} else {
$error = $result;
}
}
// display forms
$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('config.js');
require 'libraries/user_preferences.inc.php';
if ($error) {
$error->display();
}
if ($form_display->hasErrors()) {
示例2: PMA_saveUserprefs
exit;
} else {
$error = $result;
}
}
} else {
if (isset($_POST['submit_clear'])) {
$result = PMA_saveUserprefs(array());
if ($result === true) {
$params = array();
if ($GLOBALS['PMA_Config']->get('fontsize') != '82%') {
$GLOBALS['PMA_Config']->removeCookie('pma_fontsize');
}
$GLOBALS['PMA_Config']->removeCookie('pma_collaction_connection');
$GLOBALS['PMA_Config']->removeCookie('pma_lang');
PMA_userprefsRedirect('prefs_manage.php', $params);
exit;
} else {
$error = $result;
}
exit;
}
}
}
}
$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('config.js');
require 'libraries/user_preferences.inc.php';
if ($error) {
示例3: testUserprefsRedirect
/**
* Test for PMA_userprefsRedirect
*
* @return void
*/
public function testUserprefsRedirect()
{
if (!defined('PMA_TEST_HEADERS')) {
$this->markTestSkipped('Cannot redefine constant/function - missing runkit extension');
}
$GLOBALS['PMA_Config']->set('PmaAbsoluteUri', '');
$GLOBALS['cfg']['ServerDefault'] = 1;
$GLOBALS['lang'] = '';
$redefine = null;
if (!defined('PMA_IS_IIS')) {
define('PMA_IS_IIS', false);
} else {
$redefine = PMA_IS_IIS;
runkit_constant_redefine('PMA_IS_IIS', false);
}
PMA_userprefsRedirect('file.html', array('a' => 'b'), 'h ash');
$this->assertContains('Location: /phpmyadmin/file.html?a=b&saved=1&server=0#h+ash', $GLOBALS['header'][0]);
if ($redefine !== null) {
runkit_constant_redefine('PMA_IS_IIS', $redefine);
} else {
runkit_constant_remove('PMA_IS_IIS');
}
}