本文整理汇总了PHP中ForgeConfig类的典型用法代码示例。如果您正苦于以下问题:PHP ForgeConfig类的具体用法?PHP ForgeConfig怎么用?PHP ForgeConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ForgeConfig类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testFactoryShouldReturnModStuffIfStuffAuthIsConfiguredForThisProjectAndDefaultConfigIsModPerl
function testFactoryShouldReturnModStuffIfStuffAuthIsConfiguredForThisProjectAndDefaultConfigIsModPerl()
{
$projectInfo = array();
ForgeConfig::set(SVN_Apache_SvnrootConf::CONFIG_SVN_AUTH_KEY, SVN_Apache_SvnrootConf::CONFIG_SVN_AUTH_PERL);
$factory = $this->GivenAAuthFactoryWithStuffPlugin();
$this->assertIsA($factory->get($projectInfo), 'SVN_Apache_ModStuff');
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SVN_Apache_Auth_FactoryTest.php
示例2: displayBody
private function displayBody()
{
$items = $this->data_mapper->fetchAll($this->getProjectFromRequest());
$presenter = new ChooseNewsPresenter($items, $this->request->get('project_id'));
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/news/');
$renderer->renderToPage('choose_news', $presenter);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:ChooseNewsItemController.class.php
示例3: stripOutlookTextQuote
private function stripOutlookTextQuote($mail_content)
{
if (ForgeConfig::get('sys_strip_outlook') == 1) {
return $this->stripOutlook($this->stripOutlook($mail_content, 'en'), 'fr');
}
return $mail_content;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CitationStripper.class.php
示例4: send_new_user_email
function send_new_user_email($to, $login, $password, $confirm_hash, $template, $isAdminPresenter)
{
//needed by new_user_email.txt
$base_url = get_server_url();
$defaultTheme = $GLOBALS['sys_themedefault'];
$color_logo = "#0000";
$color_button = "#347DBA";
if (themeIsFlamingParrot($defaultTheme)) {
$defaultThemeVariant = $GLOBALS['sys_default_theme_variant'];
$color_logo = FlamingParrot_Theme::getColorOfCurrentTheme($defaultThemeVariant);
$color_button = $color_logo;
}
$logo_url = $base_url . "/themes/" . $defaultTheme . "/images/organization_logo.png";
$has_logo = file_exists(dirname(__FILE__) . '/../themes/' . $defaultTheme . '/images/organization_logo.png');
if ($isAdminPresenter) {
$subject = $GLOBALS['Language']->getText('account_register', 'welcome_email_title', $GLOBALS['sys_name']);
include $GLOBALS['Language']->getContent('account/new_account_email');
$presenter = new MailRegisterByAdminPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $section_three, $section_after_password, $password);
} else {
$subject = $GLOBALS['Language']->getText('include_proj_email', 'account_register', $GLOBALS['sys_name']);
include $GLOBALS['Language']->getContent('include/new_user_email');
$redirect_url = $base_url . "/account/verify.php?confirm_hash={$confirm_hash}";
$presenter = new MailRegisterByUserPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $redirect_url, $redirect_button, $color_button);
}
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
$mail = initializeMail($subject, $GLOBALS['sys_noreply'], $to, $renderer->renderToString($template, $presenter), $message);
return $mail->send();
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:28,代码来源:proj_email.php
示例5: stream
public function stream(Git_HTTP_Command $command)
{
$cwd = '/tmp';
$descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"));
if (ForgeConfig::get('sys_logger_level') == Logger::DEBUG) {
$descriptorspec[2] = array('file', ForgeConfig::get('codendi_log') . '/git_http_error_log', 'a');
}
$pipes = array();
$this->logger->debug('Command: ' . $command->getCommand());
$this->logger->debug('Environment: ' . print_r($command->getEnvironment(), true));
$process = proc_open($command->getCommand(), $descriptorspec, $pipes, $cwd, $command->getEnvironment());
if (is_resource($process)) {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
fwrite($pipes[0], file_get_contents('php://input'));
}
fclose($pipes[0]);
$first = true;
while ($result = stream_get_contents($pipes[1], self::CHUNK_LENGTH)) {
if ($first) {
list($headers, $body) = http_split_header_body($result);
foreach (explode("\r\n", $headers) as $header) {
header($header);
}
file_put_contents('php://output', $body);
} else {
file_put_contents('php://output', $result);
}
$first = false;
}
fclose($pipes[1]);
$return_value = proc_close($process);
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:33,代码来源:Wrapper.class.php
示例6: html_get_timezone_popup
function html_get_timezone_popup($selected = 0)
{
$GLOBALS['HTML']->includeFooterJavascriptFile('/scripts/jstimezonedetect/jstz.min.js');
$GLOBALS['HTML']->includeFooterJavascriptFile('/scripts/tuleap/timezone.js');
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/account/');
return $renderer->renderToString('timezone', new Account_TimezoneSelectorPresenter($selected));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:html.php
示例7: display
public function display(Codendi_Request $request)
{
$title = $GLOBALS['Language']->getText('plugin_git', 'descriptor_name');
$renderer = TemplateRendererFactory::build()->getRenderer(dirname(GIT_BASE_DIR) . '/templates');
$presenter = null;
switch ($request->get('action')) {
case 'list-repositories':
$presenter = $this->getListRepositoriesPresenter($request);
break;
case 'manage-allowed-projects':
case 'set-mirror-restriction':
case 'update-allowed-project-list':
$presenter = $this->getManageAllowedProjectsPresenter($request);
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/resource_restrictor');
break;
case 'show-edit-mirror':
case 'show-add-mirror':
break;
default:
$presenter = $this->getAllMirrorsPresenter($title);
break;
}
if (!$presenter) {
return;
}
$GLOBALS['HTML']->header(array('title' => $title, 'selected_top_tab' => 'admin'));
$renderer->renderToPage($presenter->getTemplate(), $presenter);
$GLOBALS['HTML']->footer(array());
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:29,代码来源:AdminMirrorController.class.php
示例8: getStdErrFilePath
/**
* Return path of the file that contains ssh command stderr
*
* @return String
*/
public function getStdErrFilePath()
{
if (!$this->filepath) {
$this->filepath = tempnam(ForgeConfig::get('tmp_dir'), 'stderr_');
}
return $this->filepath;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:RemoteSSHCommand.class.php
示例9: itCreatesUserWithPrefixSetFromConfig
public function itCreatesUserWithPrefixSetFromConfig()
{
$suffix = '-team';
ForgeConfig::set(GenericUserFactory::CONFIG_KEY_SUFFIX, $suffix);
$generic_user = $this->factory->create('120', 'my_password');
$this->assertEqual(substr($generic_user->getUnixName(), -strlen($suffix)), $suffix);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:GenericUserFactoryTest.php
示例10: getUserGroupDisplayName
public static function getUserGroupDisplayName($name)
{
switch ($name) {
case self::NOBODY:
return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_nobody');
case self::ANON:
return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_anonymous_users');
case self::AUTHENTICATED:
$label = ForgeConfig::get(self::CONFIG_AUTHENTICATED_LABEL);
if ($label == false) {
$label = $GLOBALS['Language']->getText('project_ugroup', 'ugroup_authenticated_users');
}
return $label;
case self::REGISTERED:
$label = ForgeConfig::get(self::CONFIG_REGISTERED_LABEL);
if ($label == false) {
$label = $GLOBALS['Language']->getText('project_ugroup', 'ugroup_registered_users');
}
return $label;
case self::PROJECT_MEMBERS:
return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_project_members');
case self::PROJECT_ADMINS:
return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_project_admins');
default:
return util_translate_name_ugroup($name);
}
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:27,代码来源:ForgeUGroup.php
示例11: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::set('codendi_log', '/tmp');
$this->log_file = tempnam(ForgeConfig::get('codendi_log'), 'codendi_syslog');
$this->logger = new BackendLogger($this->log_file);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:BackendLoggerTest.php
示例12: testFactoryShouldSetADefaultLanguageForUnknownLocales
public function testFactoryShouldSetADefaultLanguageForUnknownLocales()
{
$default_language = new BaseLanguage($this->supportedLanguages, ForgeConfig::get('sys_lang'));
$default_language->loadLanguage(ForgeConfig::get('sys_lang'));
$factory = new BaseLanguageFactory();
$this->assertEqual($default_language, $factory->getBaseLanguage('unknown_locale'));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:BaseLanguageFactoryTest.php
示例13: itSavesNothingIfThereAreNoProjectLanguageAndMoreThanOneSystemLanguage
public function itSavesNothingIfThereAreNoProjectLanguageAndMoreThanOneSystemLanguage()
{
ForgeConfig::set('sys_supported_languages', 'it_IT,ja_JP');
stub($this->dao)->getUsedLanguageForProject()->returns(false);
expect($this->dao)->updateLanguageOption()->never();
$this->language_manager->getUsedLanguageForProject($this->project);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:MediawikiLanguageManagerTest.php
示例14: registerShutdownFunction
public function registerShutdownFunction()
{
if (ForgeConfig::get('DEBUG_MODE') && strpos($_SERVER['REQUEST_URI'], '/soap/') !== 0) {
$php_code = '$request =& ' . get_class($this) . '::instance(); $request->checkThatAllVariablesAreValidated();';
register_shutdown_function(create_function('', $php_code));
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Codendi_Request.class.php
示例15: getAvatarIfEnabled
public function getAvatarIfEnabled()
{
if (ForgeConfig::get('sys_enable_avatars')) {
return '<div class="tracker_artifact_followup_avatar">' . $this->getHTMLAvatar() . '</div>';
}
return '';
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Tracker_Artifact_Followup_Item.class.php
示例16: __construct
/**
* @param string $request_uri '/plugins/agiledashboard/?group_id=1&action=show&....
*/
public function __construct($request_uri)
{
$proto = ForgeConfig::get('sys_force_ssl') ? 'https' : 'http';
$url = $proto . '://' . ForgeConfig::get('sys_default_domain') . $request_uri;
$dimensions = $this->width . 'x' . $this->height;
$this->class = Toggler::getClassname('plugin_cardwall_qrcode_toggler', false, true);
$this->url = 'http://chart.apis.google.com/chart?' . http_build_query(array('chs' => $dimensions, 'cht' => 'qr', 'chld' => 'L|0', 'chl' => $url));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:QrCode.class.php
示例17: getPasswordLifetimeInSeconds
private function getPasswordLifetimeInSeconds()
{
$password_lifetime_in_days = ForgeConfig::get('sys_password_lifetime');
if ($password_lifetime_in_days) {
return DateHelper::SECONDS_IN_A_DAY * $password_lifetime_in_days;
}
return false;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:PasswordExpirationChecker.class.php
示例18: searchSvnRepositories
public function searchSvnRepositories()
{
$auth_mod = $this->da->quoteSmart(ForgeConfig::get(SVN_Apache_SvnrootConf::CONFIG_SVN_AUTH_KEY));
$sql = "SELECT groups.*, service.*, unix_group_name AS repository_name, {$auth_mod} AS auth_mod\n FROM groups, service\n WHERE groups.group_id = service.group_id\n AND service.short_name = 'svn'\n AND service.is_used = '1'\n AND groups.status = 'A'";
$sql_fragments = array($sql);
$this->event_manager->processEvent(Event::GET_SVN_LIST_REPOSITORIES_SQL_FRAGMENTS, array('sql_fragments' => &$sql_fragments));
return $this->retrieve(implode(' UNION ', $sql_fragments));
}
开发者ID:blestab,项目名称:tuleap,代码行数:8,代码来源:SVN_DAO.class.php
示例19: tearDown
public function tearDown()
{
if (is_file(ForgeConfig::get('codendi_log') . '/tv3_to_tv5.log')) {
unlink(ForgeConfig::get('codendi_log') . '/tv3_to_tv5.log');
}
ForgeConfig::restore();
parent::tearDown();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:MigrateTrackerTest.php
示例20: notifyAdministrator
public function notifyAdministrator(PFuser $user)
{
$user_name = $user->getUserName();
$to = ForgeConfig::get('sys_email_admin');
if (!send_new_user_email_notification($to, $user_name)) {
$GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'mail_failed', $to));
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:PendingUserNotifier.php
注:本文中的ForgeConfig类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论