本文整理汇总了PHP中AJXP_Utils::parseStandardFormParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Utils::parseStandardFormParameters方法的具体用法?PHP AJXP_Utils::parseStandardFormParameters怎么用?PHP AJXP_Utils::parseStandardFormParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AJXP_Utils
的用法示例。
在下文中一共展示了AJXP_Utils::parseStandardFormParameters方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConnexions
/**
* Helpers to test SQL connection and send a test email.
* @param $action
* @param $httpVars
* @param $fileVars
* @throws Exception
*/
public function testConnexions($action, $httpVars, $fileVars)
{
$data = array();
AJXP_Utils::parseStandardFormParameters($httpVars, $data, null, "DRIVER_OPTION_");
if ($action == "boot_test_sql_connexion") {
$p = AJXP_Utils::cleanDibiDriverParameters($data["db_type"]);
if ($p["driver"] == "sqlite3") {
$dbFile = AJXP_VarsFilter::filter($p["database"]);
if (!file_exists(dirname($dbFile))) {
mkdir(dirname($dbFile), 0755, true);
}
}
// Should throw an exception if there was a problem.
dibi::connect($p);
dibi::disconnect();
echo 'SUCCESS:Connexion established!';
} else {
if ($action == "boot_test_mailer") {
$mailerPlug = AJXP_PluginsService::findPluginById("mailer.phpmailer-lite");
$mailerPlug->loadConfigs(array("MAILER" => $data["MAILER_ENABLE"]["MAILER_SYSTEM"]));
$mailerPlug->sendMail(array("adress" => $data["MAILER_ENABLE"]["MAILER_ADMIN"]), "Pydio Test Mail", "Body of the test", array("adress" => $data["MAILER_ENABLE"]["MAILER_ADMIN"]));
echo 'SUCCESS:Mail sent to the admin adress, please check it is in your inbox!';
}
}
}
示例2: parseParameters
protected function parseParameters(&$repDef, &$options, $userId = null, $globalBinaries = false, $existingValues = array())
{
AJXP_Utils::parseStandardFormParameters($repDef, $options, $userId, "DRIVER_OPTION_", $globalBinaries ? array() : null);
if (!count($existingValues)) {
return;
}
$this->mergeExistingParameters($options, $existingValues);
}
示例3: switchAction
//.........这里部分代码省略.........
case "save_user_pref":
$userObject = AuthService::getLoggedUser();
$i = 0;
while (isset($httpVars["pref_name_" . $i]) && isset($httpVars["pref_value_" . $i])) {
$prefName = AJXP_Utils::sanitize($httpVars["pref_name_" . $i], AJXP_SANITIZE_ALPHANUM);
$prefValue = AJXP_Utils::sanitize(SystemTextEncoding::magicDequote($httpVars["pref_value_" . $i]));
if ($prefName == "password") {
continue;
}
if ($prefName != "pending_folder" && $userObject == null) {
$i++;
continue;
}
$userObject->setPref($prefName, $prefValue);
$userObject->save("user");
AuthService::updateUser($userObject);
//setcookie("AJXP_$prefName", $prefValue);
$i++;
}
header("Content-Type:text/plain");
print "SUCCESS";
break;
//------------------------------------
// SAVE USER PREFERENCE
//------------------------------------
//------------------------------------
// SAVE USER PREFERENCE
//------------------------------------
case "custom_data_edit":
case "user_create_user":
$data = array();
if ($action == "user_create_user" && isset($httpVars["NEW_new_user_id"])) {
$updating = false;
AJXP_Utils::parseStandardFormParameters($httpVars, $data, null, "NEW_");
$original_id = AJXP_Utils::decodeSecureMagic($data["new_user_id"]);
$data["new_user_id"] = AJXP_Utils::decodeSecureMagic($data["new_user_id"], AJXP_SANITIZE_EMAILCHARS);
if ($original_id != $data["new_user_id"]) {
throw new Exception(str_replace("%s", $data["new_user_id"], $mess["ajxp_conf.127"]));
}
if (AuthService::userExists($data["new_user_id"], "w")) {
throw new Exception($mess["ajxp_conf.43"]);
}
$loggedUser = AuthService::getLoggedUser();
$limit = $loggedUser->personalRole->filterParameterValue("core.conf", "USER_SHARED_USERS_LIMIT", AJXP_REPO_SCOPE_ALL, "");
if (!empty($limit) && intval($limit) > 0) {
$count = count($this->getUserChildren($loggedUser->getId()));
if ($count >= $limit) {
throw new Exception($mess['483']);
}
}
AuthService::createUser($data["new_user_id"], $data["new_password"]);
$userObject = ConfService::getConfStorageImpl()->createUserObject($data["new_user_id"]);
$userObject->setParent($loggedUser->getId());
$userObject->save('superuser');
$userObject->personalRole->clearAcls();
$userObject->setGroupPath($loggedUser->getGroupPath());
$userObject->setProfile("shared");
} else {
if ($action == "user_create_user" && isset($httpVars["NEW_existing_user_id"])) {
$updating = true;
AJXP_Utils::parseStandardFormParameters($httpVars, $data, null, "NEW_");
$userId = $data["existing_user_id"];
if (!AuthService::userExists($userId)) {
throw new Exception("Cannot find user");
}
$userObject = ConfService::getConfStorageImpl()->createUserObject($userId);
示例4: parseParameters
public function parseParameters(&$repDef, &$options, $userId = null, $globalBinaries = false)
{
AJXP_Utils::parseStandardFormParameters($repDef, $options, $userId, "DRIVER_OPTION_", $globalBinaries ? array() : null);
}