• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TBGSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: do_execute

 public function do_execute()
 {
     /* Prepare variables */
     try {
         $project_id = $this->getProvidedArgument('projectid');
         $project_row = TBGProjectsTable::getTable()->getById($project_id, false);
         TBGContext::setScope(new TBGScope($project_row[TBGProjectsTable::SCOPE]));
         $project = new TBGProject($project_id, $project_row);
     } catch (Exception $e) {
         throw $e;
         $this->cliEcho("The project with the ID " . $this->getProvidedArgument('projectid') . " does not exist\n", 'red', 'bold');
         exit;
     }
     $author = $this->getProvidedArgument('author');
     $new_rev = $this->getProvidedArgument('revno');
     $commit_msg = $this->getProvidedArgument('log');
     $changed = $this->getProvidedArgument('changed');
     $old_rev = $this->getProvidedArgument('oldrev', null);
     $date = $this->getProvidedArgument('date', null);
     $branch = $this->getProvidedArgument('branch', null);
     if (TBGSettings::get('access_method_' . $project->getKey()) == TBGVCSIntegration::ACCESS_HTTP) {
         $this->cliEcho("This project uses the HTTP access method, and so access via the CLI has been disabled\n", 'red', 'bold');
         exit;
     }
     if ($old_rev === null && !is_integer($new_rev)) {
         $this->cliEcho("Error: if only the new revision is specified, it must be a number so that old revision can be calculated from it (by substracting 1 from new revision number).");
     } else {
         if ($old_rev === null) {
             $old_rev = $new_rev - 1;
         }
     }
     $output = TBGVCSIntegration::processCommit($project, $commit_msg, $old_rev, $new_rev, $date, $changed, $author, $branch);
     $this->cliEcho($output);
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:34,代码来源:CliVCS_IntegrationReport.class.php


示例2: clearUserScopes

 public function clearUserScopes($user_id)
 {
     $crit = $this->getCriteria();
     $crit->addWhere(self::SCOPE, TBGSettings::getDefaultScopeID(), Criteria::DB_NOT_EQUALS);
     $crit->addWhere(self::USER_ID, $user_id);
     $this->doDelete($crit);
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:7,代码来源:TBGUserScopesTable.class.php


示例3: _preDelete

 public function _preDelete()
 {
     $crit = TBGUsersTable::getTable()->getCriteria();
     $crit->addWhere(TBGUsersTable::GROUP_ID, $this->getID());
     if ($this->getID() == TBGSettings::getDefaultGroup()->getID()) {
         $crit->addUpdate(TBGUsersTable::GROUP_ID, null);
     } else {
         $crit->addUpdate(TBGUsersTable::GROUP_ID, TBGSettings::getDefaultGroup()->getID());
     }
     $res = TBGUsersTable::getTable()->doUpdate($crit);
 }
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:11,代码来源:TBGGroup.class.php


示例4: loadFixtures

 public function loadFixtures(TBGScope $scope)
 {
     foreach (TBGIssueTypesTable::getTable()->getAllIDsByScopeID($scope->getID()) as $issuetype_id) {
         $crit = $this->getCriteria();
         $crit->addInsert(self::SCOPE, $scope->getID());
         $crit->addInsert(self::WORKFLOW_ID, TBGSettings::getCoreWorkflow()->getID());
         $crit->addInsert(self::WORKFLOW_SCHEME_ID, TBGSettings::getCoreWorkflowScheme()->getID());
         $crit->addInsert(self::ISSUETYPE_ID, $issuetype_id);
         $this->doInsert($crit);
     }
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:11,代码来源:TBGWorkflowIssuetypeTable.class.php


示例5: do_execute

 public function do_execute()
 {
     $this->cliEcho("\n");
     $this->cliEcho("Revert authentication backend\n", 'white', 'bold');
     $this->cliEcho("This command is useful if you've managed to lock yourself.\n");
     $this->cliEcho("out due to an authentication backend change gone bad.\n\n");
     if (TBGSettings::getAuthenticationBackend() == 'tbg' || TBGSettings::getAuthenticationBackend() == null) {
         $this->cliEcho("You are currently using the default authentication backend.\n\n");
     } else {
         $this->cliEcho("Please type 'yes' if you want to revert to the default authentication backend: ");
         $this->cliEcho("\n");
         if ($this->getInput() == 'yes') {
             TBGSettings::saveSetting(TBGSettings::SETTING_AUTH_BACKEND, 'tbg');
             $this->cliEcho("Authentication backend reverted.\n\n");
         } else {
             $this->cliEcho("No changes made.\n\n");
         }
     }
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:19,代码来源:CliMainRevertAuthBackend.class.php


示例6: loadFixtures

 public static function loadFixtures(TBGScope $scope)
 {
     $scope_id = $scope->getID();
     $bug_report = new TBGIssuetype();
     $bug_report->setName('Bug report');
     $bug_report->setIcon('bug_report');
     $bug_report->setDescription('Have you discovered a bug in the application, or is something not working as expected?');
     $bug_report->save();
     TBGSettings::saveSetting('defaultissuetypefornewissues', $bug_report->getID(), 'core', $scope_id);
     TBGSettings::saveSetting('issuetype_bug_report', $bug_report->getID(), 'core', $scope_id);
     $feature_request = new TBGIssuetype();
     $feature_request->setName('Feature request');
     $feature_request->setIcon('feature_request');
     $feature_request->setDescription('Are you missing some specific feature, or is your favourite part of the application a bit lacking?');
     $feature_request->save();
     TBGSettings::saveSetting('issuetype_feature_request', $feature_request->getID(), 'core', $scope_id);
     $enhancement = new TBGIssuetype();
     $enhancement->setName('Enhancement');
     $enhancement->setIcon('enhancement');
     $enhancement->setDescription('Have you found something that is working in a way that could be improved?');
     $enhancement->save();
     TBGSettings::saveSetting('issuetype_enhancement', $enhancement->getID(), 'core', $scope_id);
     $task = new TBGIssuetype();
     $task->setName('Task');
     $task->setIcon('task');
     $task->setIsTask();
     $task->save();
     TBGSettings::saveSetting('issuetype_task', $task->getID(), 'core', $scope_id);
     $user_story = new TBGIssuetype();
     $user_story->setName('User story');
     $user_story->setIcon('developer_report');
     $user_story->setDescription('Doing it Agile-style. Issue type perfectly suited for entering user stories');
     $user_story->save();
     TBGSettings::saveSetting('issuetype_user_story', $user_story->getID(), 'core', $scope_id);
     $idea = new TBGIssuetype();
     $idea->setName('Idea');
     $idea->setIcon('idea');
     $idea->setDescription('Express yourself - share your ideas with the rest of the team!');
     $idea->save();
     TBGSettings::saveSetting('issuetype_idea', $idea->getID(), 'core', $scope_id);
     return array($bug_report->getID(), $feature_request->getID(), $enhancement->getID(), $task->getID(), $user_story->getID(), $idea->getID());
 }
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:42,代码来源:TBGIssuetype.class.php


示例7: componentLeftmenu

 public function componentLeftmenu()
 {
     $config_sections = TBGSettings::getConfigSections(TBGContext::getI18n());
     $breadcrumblinks = array();
     foreach ($config_sections as $key => $sections) {
         foreach ($sections as $section) {
             if ($key == TBGSettings::CONFIGURATION_SECTION_MODULES) {
                 $url = is_array($section['route']) ? make_url($section['route'][0], $section['route'][1]) : make_url($section['route']);
                 $breadcrumblinks[] = array('url' => $url, 'title' => $section['description']);
             } else {
                 $breadcrumblinks[] = array('url' => make_url($section['route']), 'title' => $section['description']);
             }
         }
     }
     $this->breadcrumblinks = $breadcrumblinks;
     $this->config_sections = $config_sections;
     if ($this->selected_section == TBGSettings::CONFIGURATION_SECTION_MODULES) {
         if (TBGContext::getRouting()->getCurrentRouteName() == 'configure_modules') {
             $this->selected_subsection = 'core';
         } else {
             $this->selected_subsection = TBGContext::getRequest()->getParameter('config_module');
         }
     }
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:24,代码来源:actioncomponents.class.php


示例8: __

echo $team->getID();
?>
">
			<div class="dropdown_header"><?php 
echo __('Please specify what parts of this team you want to clone');
?>
</div>
			<div class="dropdown_content copy_team_link">
				<form id="clone_team_<?php 
echo $team->getID();
?>
_form" action="<?php 
echo make_url('configure_users_clone_team', array('team_id' => $team->getID()));
?>
" method="post" accept-charset="<?php 
echo TBGSettings::getCharset();
?>
" onsubmit="cloneTeam('<?php 
echo make_url('configure_users_clone_team', array('team_id' => $team->getID()));
?>
');return false;">
					<div id="add_team">
						<label for="clone_team_<?php 
echo $team->getID();
?>
_new_name"><?php 
echo __('New team name');
?>
</label>
						<input type="text" id="clone_team_<?php 
echo $team->getID();
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:_teambox.inc.php


示例9: __

								<td class="config_explanation" colspan="2"><?php 
    echo __('Specify whether you want to use the filesystem or database to store uploaded files. Using the database will make it easier to move your installation to another server.');
    ?>
</td>
							</tr>
							<tr>
								<td><label for="upload_localpath"><?php 
    echo __('Upload location');
    ?>
</label></td>
								<td>
									<input type="text" name="upload_localpath" id="upload_localpath" style="width: 250px;" value="<?php 
    echo TBGSettings::getUploadsLocalpath() != "" ? TBGSettings::getUploadsLocalpath() : THEBUGGENIE_PATH . 'files/';
    ?>
"<?php 
    if (!TBGSettings::isUploadsEnabled() || TBGSettings::getUploadStorage() == 'database') {
        ?>
 disabled<?php 
    }
    ?>
>
								</td>
							</tr>
							<tr>
								<td class="config_explanation" colspan="2"><?php 
    echo __("If you're storing files on the filesystem, specify where you want to save the files, here. Default location is the %files% folder in the main folder (not the public folder)", array('%files%' => '<b>files/</b>'));
    ?>
</td>
							</tr>
						</table>
					<?php 
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:configureuploads.html.php


示例10: runDeleteGroup

 public function runDeleteGroup(TBGRequest $request)
 {
     try {
         if (!!in_array($request->getParameter('group_id'), TBGSettings::getDefaultGroupIDs())) {
             throw new Exception(TBGContext::getI18n()->__("You cannot delete the default groups"));
         }
         try {
             $group = TBGContext::factory()->TBGGroup($request->getParameter('group_id'));
         } catch (Exception $e) {
         }
         if (!$group instanceof TBGGroup) {
             throw new Exception(TBGContext::getI18n()->__("You cannot delete this group"));
         }
         $group->delete();
         return $this->renderJSON(array('success' => true, 'message' => TBGContext::getI18n()->__('The group was deleted')));
     } catch (Exception $e) {
         $this->getResponse()->setHttpStatus(400);
         return $this->renderJSON(array('failed' => true, 'error' => $e->getMessage()));
     }
 }
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:20,代码来源:actions.class.php


示例11: image_tag

            ?>
				<li><a href="javascript:void(0);" id="attach_link_button" onclick="$('attach_link').toggle();"><?php 
            echo image_tag('action_add_link.png') . __('Attach a link');
            ?>
</a></li>
			<?php 
        }
        ?>
		<?php 
    }
    ?>
		<?php 
    if ($issue->isUpdateable() && TBGSettings::isUploadsEnabled() && $issue->canAttachFiles()) {
        ?>
			<?php 
        if (TBGSettings::isUploadsEnabled() && $issue->canAttachFiles()) {
            ?>
				<li><a href="javascript:void(0);" id="attach_file_button" onclick="TBG.Main.showUploader('<?php 
            echo make_url('get_partial_for_backdrop', array('key' => 'uploader', 'mode' => 'issue', 'issue_id' => $issue->getID()));
            ?>
');"><?php 
            echo image_tag('action_add_file.png') . __('Attach a file');
            ?>
</a></li>
			<?php 
        } else {
            ?>
				<li class="disabled"><a href="javascript:void(0);" id="attach_file_button" onclick="TBG.Main.Helpers.Message.error('<?php 
            echo __('File uploads are not enabled');
            ?>
', '<?php 
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:_issuemoreactions.inc.php


示例12: include_template

					<?php 
    }
    ?>
				</ul>
				<?php 
    include_template('main/dashboardjavascript');
    ?>
			<?php 
}
?>
			<?php 
TBGEvent::createNew('core', 'dashboard_main_bottom')->trigger();
?>
		</td>
		<td id="dashboard_righthand" class="side_bar<?php 
echo TBGSettings::getToggle('dashboard_righthand') ? ' collapsed' : '';
?>
">
			<div class="collapser_link" onclick="TBG.Main.Dashboard.sidebar('<?php 
echo make_url('set_toggle_state', array('key' => 'dashboard_righthand', 'state' => ''));
?>
', 'dashboard_righthand');">
				<a href="javascript:void(0);">
					<?php 
echo image_tag('sidebar_expand.png', array('class' => 'collapser'));
?>
					<?php 
echo image_tag('sidebar_collapse.png', array('class' => 'expander'));
?>
				</a>
			</div>
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:dashboard.html.php


示例13: runSaveColumnSettings

 public function runSaveColumnSettings(TBGRequest $request)
 {
     TBGSettings::saveSetting('search_scs_' . $request['template'], join(',', $request['columns']));
     return $this->renderJSON(array('failed' => false, 'message' => TBGContext::getI18n()->__('Visible columns has been set successfully')));
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:5,代码来源:actions.class.php


示例14: foreach

    ?>
">
		<?php 
}
?>
		<?php 
include THEBUGGENIE_PATH . THEBUGGENIE_PUBLIC_FOLDER_NAME . DS . 'themes' . DS . TBGSettings::getThemeName() . DS . 'theme.php';
?>
		<?php 
if (count(TBGContext::getModules())) {
    ?>
			<?php 
    foreach (TBGContext::getModules() as $module) {
        ?>
				<?php 
        if (file_exists(THEBUGGENIE_PATH . THEBUGGENIE_PUBLIC_FOLDER_NAME . DS . 'themes' . DS . TBGSettings::getThemeName() . DS . "{$module->getName()}.css")) {
            ?>
					<?php 
            $tbg_response->addStylesheet("{$module->getName()}.css");
            ?>
				<?php 
        }
        ?>
				<?php 
        if (file_exists(THEBUGGENIE_PATH . THEBUGGENIE_PUBLIC_FOLDER_NAME . DS . 'js' . DS . "{$module->getName()}.js")) {
            ?>
					<?php 
            $tbg_response->addJavascript("{$module->getName()}.js");
            ?>
				<?php 
        }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:layout.php


示例15: make_url

$tbg_response->setTitle(__('Configuration center'));
?>
<div class="configuration_update_check_container">
	<a class="button button-silver" id="update_button" href="javascript:void(0);" onclick="TBG.Config.updateCheck('<?php 
echo make_url('configure_update_check');
?>
');"><?php 
echo __('Check for updates now');
?>
</a>
	<?php 
echo image_tag('spinning_16.gif', array('id' => 'update_spinner', 'style' => 'display: none;'));
?>
	<?php 
echo __('You currently have version %thebuggenie_version of The Bug Genie.', array('%thebuggenie_version' => TBGSettings::getVersion()));
?>
</div>
<?php 
if (count($outdated_modules) > 0) {
    ?>
	<div class="update_div rounded_box yellow" style="margin-top: 20px;">
		<div class="header"><?php 
    echo __('You have %count outdated modules. They have been disabled until you upgrade them, you can upgrade them from Module settings.', array('%count' => count($outdated_modules)));
    ?>
</div>
	</div>
<?php 
}
if (get_magic_quotes_gpc()) {
    ?>
开发者ID:oparoz,项目名称:thebuggenie,代码行数:30,代码来源:index.html.php


示例16: image_url

			<url><?php 
    echo TBGContext::getUrlHost() . TBGContext::getTBGPath() . 'header.png';
    ?>
</url>
		<?php 
} else {
    ?>
			<url><?php 
    echo image_url('logo_24.png', false, null, false);
    ?>
</url>
		<?php 
}
?>
			<title><?php 
echo TBGSettings::getTBGname() . ' ~ ' . $searchtitle;
?>
</title>
			<link><?php 
echo make_url('home', array(), false);
?>
</link>
		</image>
<?php 
if ($issues != false) {
    foreach ($issues as $issue) {
        ?>
		
		<item>
			<title><?php 
        echo $issue->getFormattedIssueNo(true) . ' - ' . strip_tags($issue->getTitle());
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:findissues.rss.php


示例17:

pre { overflow: scroll; padding: 5px; }
.command_box { border: 1px dashed #DDD; background-color: #F5F5F5; padding: 4px; font-family: 'Droid Sans Mono', monospace; display: inline-block; margin-top: 5px; margin-bottom: 15px; }
</style>
<!--[if IE]>
<style>
body { background-color: #DFDFDF; font-family: sans-serif; font-size: 13px; }
</style>
<![endif]-->
</head>
<body>
	<div class="rounded_box" style="margin: 30px auto 0 auto; width: 700px;">
		<img style="float: left; margin: 10px;" src="<?php 
echo TBGContext::getTBGPath();
?>
header.png"><h1>An error occurred in <?php 
echo TBGSettings::getTBGname();
?>
</h1>
		<div class="error_content">
			<?php 
if (isset($exception) && $exception instanceof Exception) {
    ?>
				<?php 
    if ($exception instanceof TBGComposerException) {
        ?>
					<h2>External libraries not initialized</h2>
					<p>
						The Bug Genie uses the <a href="http://getcomposer.org">composer</a> dependency management tool to control external libraries.<br>
						<br>
						Before you can use or install The Bug Genie, you must initialize the vendor libraries by running the following command from the directory containing The Bug Genie:<br>
						<div class="command_box">php composer.phar install</div><br>
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:error.php


示例18: include_template

<?php

include_template('installation/header');
?>
<div class="installation_box">
	<h2 style="margin-top: 0px;">Pre-installation checks</h2>
	<p style="margin-bottom: 10px;">
	Before we can start the installation, we need to check a few things.<br>
	Please look through the list of prerequisites below, and take the necessary steps to correct any errors that may have been highlighted.</p>
	<div class="feature" id="upgrade_warning">
		<h4 style="padding-top: 0; margin-top: 0;">ARE YOU UPGRADING FROM A PREVIOUS VERSION?</h4>
		<h5>If you are upgrading from version 3.0</h5>
		You should not see this page if you are upgrading from version 3.0. Please see the upgrade instructions included in the release notes, or the UPGRADE file included with your download for information on how to upgrade to version <?php 
echo TBGSettings::getVersion(false, false);
?>
		<h5>If you are upgrading from version 2.x</h5>
		Please see the instructions in the Import of the configuration center after installation is complete
		<h5>If you are upgrading from version 1.x</h5>
		Users of The Bug Genie 1.x will need to upgrade to the latest release of The Bug Genie 2.1 before attempting to upgrade to this version.
		<div style="text-align: center;">
			<button onclick="$('upgrade_warning').hide();$('installation_main_box').show();" style="font-size: 16px; font-weight: bold; padding: 5px; margin: 25px auto 10px auto;">I am not upgrading from a previous version</button>
		</div>
	</div>
	<div id="installation_main_box" style="display: none;">
		<div class="install_progress prereq_ok"><?php 
echo image_tag('themes/oxygen/action_ok.png', array(), true);
?>
Mozilla Public License 1.1 accepted ...</div>
		<?php 
if ($php_ok) {
    ?>
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:installstep1.html.php


示例19: isset

<?php

$markuppable = !isset($markuppable) ? true : $markuppable;
if ($markuppable) {
    $syntax = isset($syntax) ? $syntax : TBGSettings::SYNTAX_MW;
    if (is_numeric($syntax)) {
        $syntax = TBGSettings::getSyntaxClass($syntax);
    }
} else {
    $syntax = TBGSettings::getSyntaxClass(TBGSettings::SYNTAX_MD);
}
switch ($syntax) {
    case 'mw':
        $syntaxname = __('Mediawiki');
        break;
    case 'md':
        $syntaxname = __('Markdown');
        break;
    case 'pt':
        $syntaxname = __('Plaintext');
        break;
}
$base_id = isset($area_id) ? $area_id : $area_name;
$mentionable = isset($target_type) && isset($target_id);
?>
<div class="textarea_container syntax_<?php 
echo $syntax;
?>
">
	<div class="syntax_picker_container">
		<input type="hidden" id="<?php 
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:_textarea.inc.php


示例20: runSavePlanningColumnSettings

 /**
  * Save Planning column settings for user
  *
  * @param TBGRequest $request
  * @return bool
  */
 public function runSavePlanningColumnSettings(TBGRequest $request)
 {
     if ($this->getUser() instanceof TBGUser) {
         try {
             TBGSettings::saveSetting('planning_columns_' . $this->selected_project->getID(), join(',', $request['planning_column']), 'project', TBGContext::getScope()->getID(), $this->getUser()->getID());
         } catch (Exception $e) {
         }
     }
     $this->forward(TBGContext::getRouting()->generate('project_planning', array('project_key' => $this->selected_project->getKey())));
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:16,代码来源:actions.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TBase类代码示例发布时间:2022-05-23
下一篇:
PHP TBGScopesTable类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap