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


PHP KTUtil::setSystemSetting方法代码示例

本文整理汇总了PHP中KTUtil::setSystemSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP KTUtil::setSystemSetting方法的具体用法?PHP KTUtil::setSystemSetting怎么用?PHP KTUtil::setSystemSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KTUtil的用法示例。


在下文中一共展示了KTUtil::setSystemSetting方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check

 function check()
 {
     $this->checkOpenOffice();
     $this->checkLucene();
     $this->checkDF();
     KTUtil::setSystemSetting('externalResourceIssues', serialize($this->resources));
 }
开发者ID:jpbauer,项目名称:knowledgetree,代码行数:7,代码来源:cronResources.php

示例2: optimise

 /**
  * Possibly we can optimise indexes. This method must be overriden.
  * The new function must call the parent!
  *
  */
 public function optimise()
 {
     KTUtil::setSystemSetting('luceneOptimisationDate', time());
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:9,代码来源:indexerCore.inc.php

示例3: do_resetPassword

 function do_resetPassword()
 {
     $email = $_REQUEST['email'];
     $user = $_REQUEST['username'];
     $password = $_REQUEST['password'];
     $confirm = $_REQUEST['confirm'];
     if (!($password == $confirm)) {
         return _kt('The passwords do not match, please re-enter them.');
     }
     $password = md5($password);
     // Get user from db
     $sQuery = 'SELECT id FROM users WHERE username = ? AND email = ?';
     $aParams = array($user, $email);
     $id = DBUtil::getOneResultKey(array($sQuery, $aParams), 'id');
     if (!is_numeric($id) || $id < 1) {
         //PEAR::isError($res) || is_null($res)){
         return _kt('Please check that you have entered a valid username and email address.');
     }
     // Check expiry
     $expiry = KTUtil::getSystemSetting('password_reset_expire-' . $id);
     if ($expiry < time()) {
         return _kt('The password reset key has expired, please send a new request.');
     }
     // Update password
     $res = DBUtil::autoUpdate('users', array('password' => $password), $id);
     if (PEAR::isError($res) || is_null($res)) {
         return _kt('Your password could not be reset, please try again.');
     }
     // Unset expiry date and key
     KTUtil::setSystemSetting('password_reset_expire-' . $id, '');
     KTUtil::setSystemSetting('password_reset_key-' . $id, '');
     // Email confirmation
     $url = KTUtil::addQueryStringSelf('');
     $subject = APP_NAME . ': ' . _kt('password successfully reset');
     $body = '<dd><p>';
     $body .= _kt('Your password has been successfully reset, click the link below to login.');
     $body .= "</p><p><a href = '{$url}'>" . _kt('Login') . '</a></p></dd>';
     $oEmail = new Email();
     $res = $oEmail->send($email, $subject, $body);
     if ($res === true) {
         return _kt('Your password has been successfully reset.');
     }
     return _kt('An error occurred while sending the email, please try again or contact the System Administrator.');
 }
开发者ID:sfsergey,项目名称:knowledgetree,代码行数:44,代码来源:loginResetDispatcher.php

示例4: getKTUsageStats

 public static function getKTUsageStats($update = true)
 {
     $usage = array();
     $oRegistry =& KTPluginRegistry::getSingleton();
     $oPlugin =& $oRegistry->getPlugin('ktcore.housekeeper.plugin');
     $folders = self::getDirectories();
     foreach ($folders as $folder) {
         $directory = $folder['folder'];
         $pattern = $folder['pattern'];
         $canClean = $folder['canClean'];
         $name = $folder['name'];
         $temp = self::scanPath($directory, $pattern);
         $usage[] = array('description' => $name, 'folder' => $directory, 'files' => number_format($temp['files'], 0, '.', ','), 'filesize' => KTUtil::filesizeToString($temp['filesize']), 'action' => $i, 'canClean' => $canClean);
     }
     if ($update) {
         KTUtil::setSystemSetting('KTUsage', serialize($usage));
     }
     return $usage;
 }
开发者ID:sfsergey,项目名称:knowledgetree,代码行数:19,代码来源:HouseKeeper.inc.php


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