当前位置: 首页>>代码示例>>PHP>>正文


PHP AJXP_Utils::parseStandardFormParameters方法代码示例

本文整理汇总了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!';
         }
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:32,代码来源:class.BootConfLoader.php

示例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);
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:8,代码来源:class.ajxp_confAccessDriver.php

示例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);
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:67,代码来源:class.AbstractConfDriver.php

示例4: parseParameters

 public function parseParameters(&$repDef, &$options, $userId = null, $globalBinaries = false)
 {
     AJXP_Utils::parseStandardFormParameters($repDef, $options, $userId, "DRIVER_OPTION_", $globalBinaries ? array() : null);
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:4,代码来源:class.ajxp_confAccessDriver.php


注:本文中的AJXP_Utils::parseStandardFormParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。