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


PHP TBGSettings类代码示例

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


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


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