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);
 }
 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);
 }
Ejemplo n.º 3
0
 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);
 }
 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);
     }
 }
 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");
         }
     }
 }
 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());
 }
Ejemplo n.º 7
0
 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');
         }
     }
 }
Ejemplo n.º 8
0
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();
								<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 
Ejemplo n.º 10
0
 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()));
     }
 }
Ejemplo n.º 11
0
            ?>
				<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 
Ejemplo n.º 12
0
					<?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>
Ejemplo n.º 13
0
 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')));
 }
Ejemplo n.º 14
0
    ?>
">
		<?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 
        }
Ejemplo n.º 15
0
$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()) {
    ?>
Ejemplo n.º 16
0
			<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());
Ejemplo n.º 17
0
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>
Ejemplo n.º 18
0
<?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) {
    ?>
Ejemplo n.º 19
0
<?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 
Ejemplo n.º 20
0
 /**
  * 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())));
 }
Ejemplo n.º 21
0
 public function move($target_path)
 {
     if (TBGSettings::getUploadStorage() == 'files') {
         rename($this->getFullpath(), TBGSettings::getUploadsLocalpath() . $target_path);
     }
     $this->setRealFilename($target_path);
     $this->save();
 }
?>
</label></td>
						<td>
							<?php 
include_template('main/textarea', array('area_name' => 'changepw_message', 'area_id' => 'changepw_message', 'height' => '75px', 'width' => '100%', 'value' => TBGSettings::get('changepw_message'), 'hide_hint' => true));
?>
						</td>
					</tr>
					<tr>
						<td style="vertical-align: top"><label for="changedetails_message"><?php 
echo __('Change account details message');
?>
</label></td>
						<td>
							<?php 
include_template('main/textarea', array('area_name' => 'changedetails_message', 'area_id' => 'changedetails_message', 'height' => '75px', 'width' => '100%', 'value' => TBGSettings::get('changedetails_message'), 'hide_hint' => true));
?>
						</td>
					</tr>
				</table>
				<?php 
if ($access_level == TBGSettings::ACCESS_FULL) {
    ?>
						<div class="greybox" style="margin: 5px 0px 5px 0px; height: 23px; padding: 5px 10px 5px 10px;">
							<div style="float: left; font-size: 13px; padding-top: 2px;"><?php 
    echo __('Click "%save" to save your changes in all categories', array('%save' => __('Save')));
    ?>
</div>
							<input type="submit" id="config_auth_button" style="float: right; padding: 0 10px 0 10px; font-size: 14px; font-weight: bold;" value="<?php 
    echo __('Save');
    ?>
Ejemplo n.º 23
0
												</td>
											</tr>
										</table>
										<div class="rounded_box blue tab_menu_dropdown user_menu_dropdown shadowed">
											<?php 
if ($tbg_user->isGuest()) {
    ?>
												<a href="javascript:void(0);" onclick="showFadedBackdrop('<?php 
    echo make_url('get_partial_for_backdrop', array('key' => 'login'));
    ?>
')"><?php 
    echo image_tag('icon_login.png') . __('Login');
    ?>
</a>
												<?php 
    if (TBGSettings::isRegistrationAllowed()) {
        ?>
													<a href="javascript:void(0);" onclick="showFadedBackdrop('<?php 
        echo make_url('get_partial_for_backdrop', array('key' => 'login', 'section' => 'register'));
        ?>
');"><?php 
        echo image_tag('icon_register.png') . __('Register');
        ?>
</a>
												<?php 
    }
    ?>
											<?php 
} else {
    ?>
												<div class="header"><?php 
Ejemplo n.º 24
0
 public static function getCoreIssuetypeScheme()
 {
     if (self::$_core_issuetypescheme === null) {
         self::$_core_issuetypescheme = new TBGIssuetypeScheme(self::get(self::SETTING_DEFAULT_ISSUETYPESCHEME));
     }
     return self::$_core_issuetypescheme;
 }
Ejemplo n.º 25
0
$link = TBGSettings::getHeaderLink() == '' ? TBGContext::getTBGPath() : TBGSettings::getHeaderLink();
?>
		<a class="logo" href="<?php 
print $link;
?>
"><?php 
echo image_tag(TBGSettings::getHeaderIconUrl(), array('style' => 'max-height: 24px;'), TBGSettings::isUsingCustomHeaderIcon());
?>
</a>
		<div class="logo_name"><?php 
echo TBGSettings::getTBGname();
?>
</div>
	</div>
	<?php 
if (!TBGSettings::isMaintenanceModeEnabled()) {
    ?>
		<?php 
    if (TBGEvent::createNew('core', 'header_mainmenu_decider')->trigger()->getReturnValue() !== false) {
        ?>
			<?php 
        require THEBUGGENIE_CORE_PATH . 'templates/headermainmenu.inc.php';
        ?>
		<?php 
    }
    ?>
		<nav class="tab_menu header_menu" id="header_userinfo">
			<div class="notifications" id="user_notifications">
				<h1>
					<?php 
    echo __('Your notifications');
Ejemplo n.º 26
0
<?php

print '<?xml version="1.0" encoding="UTF-8"?>';
?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
	<ShortName><?php 
echo TBGContext::isProjectContext() ? __('%project_name% search', array('%project_name%' => TBGContext::getCurrentProject()->getName())) : __('%site_name% search', array('%site_name%' => TBGSettings::getTBGname()));
?>
</ShortName>
	<LongName><?php 
echo TBGContext::isProjectContext() ? __('%project_name% search', array('%project_name%' => TBGContext::getCurrentProject()->getName())) : __('%site_name% search', array('%site_name%' => TBGSettings::getTBGname()));
?>
</LongName>
	<Description><?php 
echo TBGContext::isProjectContext() ? __('%project_name% search', array('%project_name%' => TBGContext::getCurrentProject()->getName())) : __('%site_name% search', array('%site_name%' => TBGSettings::getTBGname()));
?>
</Description>
	<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAIgAAACIBB7P0uQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKISURBVDiNpZNPiE1xFMc%2F5%2F7ufX%2B853nzZh6G%2BYPBaESDovxPilKabEhZsJOFLBRjITuFiAULkqRYsLAxooiEGAzR%2BPcmRmP8mWnejDf3vXfvu8fmjaiRhbM5ncX5dL6n71dUlf8p%2B%2FehslIS8cnsTFRS7%2FuUst94le3mTi6nT%2F8JmFgv06Yv42Zjc3pqQ%2FUikukw99tv8LZj0E1OkmMDPdo6GsACEJFQopozk2Yyta7JZt2aDbif6tm19ShzlkWiTYvZm0zL7r8CQlFaYklWhmNQ1M8MeZ1s2bSNh239LF64lJomqJnDAceRFaMCii4NhWHwCqDAs54T9FlX0bGv6Xj%2BmHQdjK8jWlHNcRGpEBH5BRCRFOBlv8BALwwPQXbI5dabVqzG03TcHSA%2FBJGxEK9iLrAf2CcizSNPXOc4TktvxuscN4FZ8RTYIfB9sG2YvxYuH4aqGiAAYDmQBw4B2Kp6XkR6ReRs1xP1bAfHL0B6CsTGQSEPue9hd%2Fa0RWKnXtrFxr7Zve%2FMtVKp5IhIkbKRDDADOBaK0N2wAF3Ygi7dTBCvsPpOXWjVN59v65Hr03XHGYJYwr4CbATMiA8U6AcuFfN0vW9nfXcnlV6e2rmrgtTX6EXaug5ixgREoogJ%2BV40Gl3iuu5lG0BVAxH5AfQBMcAr5qg1xoQsUyLTlaHjFNnBTH3MC3%2FoH%2FyOgjsfaEZVR2RsB9oSicRJYDNw1hhzXyxexFN8C0dsf8%2B5ZH7eatqADUAjYOT3MImIKV%2BQBmqBfZZleUEQ3AMmWDY%2FAp%2FXwAMgo6reH2FS1VJZig8MA4%2BMMZkgCLoBO%2FDJAT3AR1X1AGS0OJedZgMOECl3gAKQA3wtL%2F4EbzL%2FhCjT%2FIEAAAAASUVORK5CYII%3D</Image>
	<Url type="text/html" template="<?php 
echo TBGContext::isProjectContext() ? make_url('project_issues', array('project_key' => TBGContext::getCurrentProject()->getKey()), false) : make_url('search', array(), false);
?>
?filters[text][operator]=%3A&amp;filters[text][value]={searchTerms}"/>
	<Url type="application/x-suggestions+json" template="<?php 
echo TBGContext::isProjectContext() ? make_url('project_quicksearch', array('project_key' => TBGContext::getCurrentProject()->getKey(), 'format' => 'json'), false) : make_url('quicksearch', array('format' => 'json'), false);
?>
?filters[text][operator]=%3A&amp;filters[text][value]={searchTerms}"/>
	<AdultContent>false</AdultContent>
	<OutputEncoding><?php 
echo TBGContext::getI18n()->getCharset();
?>
</OutputEncoding>
Ejemplo n.º 27
0
<?php

$tbg_response->setTitle(__('About %sitename', array('%sitename' => TBGSettings::getTBGname())));
$tbg_response->addBreadcrumb(__('About %sitename', array('%sitename' => TBGSettings::getTBGname())), make_url('about'), tbg_get_breadcrumblinks('main_links'));
?>
<div class="rounded_box borderless mediumgrey" style="margin: 10px auto 0 auto; width: 500px; padding: 5px 5px 15px 5px; font-size: 13px; text-align: center;">
	<div style="text-align: left; padding: 10px;">
		<h1 style="font-size: 25px; margin-bottom: 0px; padding-bottom: 3px;">
			The Bug Genie
			<span style="font-size: 14px; font-weight: normal; color: #888;">
				<?php 
echo __('Version %thebuggenie_version', array('%thebuggenie_version' => TBGSettings::getVersion(true)));
?>
			</span>
		</h1>
		<h3 style="margin-top: 0; padding-top: 0;">Beautiful issue tracking and project management</h3>
		<?php 
echo __('The Bug Genie is an issue tracking system with a strong focus on being friendly &ndash; both for regular users and power users');
?>
.<br>
		<br>
		<?php 
echo __('The Bug Genie follows an open development model, and is released under an open source software license called the MPL (Mozilla Public License). This license gives you the freedom to pick up the sourcecode for The Bug Genie and work with it any way you need.');
?>
<br>
		<br>
		<?php 
echo __('Extend, develop and change The Bug Genie in any way you want, and do whatever you want with the new piece of software (The only thing you cannot do is call your software The Bug Genie). Please do send us your modifications for inclusion in The Bug Genie.');
?>
<br>
		<br>
Ejemplo n.º 28
0
    ?>
					<?php 
    echo javascript_link_tag(image_tag('tabmenu_dropdown.png', array('class' => 'menu_dropdown')), array('onmouseover' => ""));
    ?>
				</div>
				<div id="project_information_menu" class="tab_menu_dropdown">
					<?php 
    include_template('project/projectinfolinks', array('submenu' => true));
    ?>
				</div>
			</li>
		<?php 
}
?>
		<?php 
if (!$tbg_user->isThisGuest() && !TBGSettings::isSingleProjectTracker() && !TBGContext::isProjectContext()) {
    ?>
			<li<?php 
    if ($tbg_response->getPage() == 'dashboard') {
        ?>
 class="selected"<?php 
    }
    ?>
><div class="menuitem_container"><?php 
    echo link_tag(make_url('dashboard'), image_tag('icon_dashboard_small.png') . __('Dashboard'));
    ?>
</div></li>
		<?php 
}
?>
		<?php 
Ejemplo n.º 29
0
</option>
										<?php 
foreach ($languages as $lang_code => $lang_desc) {
    ?>
											<option value="<?php 
    echo $lang_code;
    ?>
" <?php 
    if ($tbg_user->getLanguage() == $lang_code) {
        ?>
 selected<?php 
    }
    ?>
><?php 
    echo $lang_desc;
    if (TBGSettings::getLanguage() == $lang_code) {
        ?>
 <?php 
        echo __('(site default)');
    }
    ?>
</option>
										<?php 
}
?>
										</select>
									</td>
								</tr>
								<tr>
									<td class="config_explanation" colspan="2">
										<?php 
Ejemplo n.º 30
0
/**
 * Returns a formatted string of the given timestamp
 *
 * @param integer $tstamp the timestamp to format
 * @param integer $format[optional] the format
 * @param integer $skiptimestamp
 */
function tbg_formatTime($tstamp, $format = 0)
{
    // offset the timestamp properly
    if (TBGSettings::getGMToffset() > 0) {
        $tstamp += TBGSettings::getGMToffset() * 60 * 60;
    } elseif (TBGSettings::getGMToffset() < 0) {
        $tstamp -= TBGSettings::getGMToffset() * 60 * 60;
    }
    if (TBGSettings::getUserTimezone() > 0) {
        $tstamp += TBGSettings::getUserTimezone() * 60 * 60;
    } elseif (TBGSettings::getUserTimezone() < 0) {
        $tstamp -= TBGSettings::getUserTimezone() * 60 * 60;
    }
    switch ($format) {
        case 1:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(1), $tstamp);
            break;
        case 2:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(2), $tstamp);
            break;
        case 3:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(3), $tstamp);
            break;
        case 4:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(4), $tstamp);
            break;
        case 5:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(5), $tstamp);
            break;
        case 6:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(6), $tstamp);
            break;
        case 7:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(7), $tstamp);
            break;
        case 8:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(8), $tstamp);
            break;
        case 9:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(9), $tstamp);
            break;
        case 10:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(10), $tstamp);
            break;
        case 11:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(9), $tstamp);
            break;
        case 12:
            $tstring = '';
            if (date('dmY', $tstamp) == date('dmY')) {
                $tstring .= __('Today') . ', ';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') - 1))) {
                $tstring .= __('Yesterday') . ', ';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') + 1))) {
                $tstring .= __('Tomorrow') . ', ';
            } else {
                $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(12) . ', ', $tstamp);
            }
            $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(14), $tstamp);
            break;
        case 13:
            $tstring = '';
            if (date('dmY', $tstamp) == date('dmY')) {
                //$tstring .= __('Today') . ', ';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') - 1))) {
                $tstring .= __('Yesterday') . ', ';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') + 1))) {
                $tstring .= __('Tomorrow') . ', ';
            } else {
                $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(12) . ', ', $tstamp);
            }
            $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(14), $tstamp);
            break;
        case 14:
            $tstring = '';
            if (date('dmY', $tstamp) == date('dmY')) {
                $tstring .= __('Today');
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') - 1))) {
                $tstring .= __('Yesterday');
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') + 1))) {
                $tstring .= __('Tomorrow');
            } else {
                $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(12), $tstamp);
            }
            break;
        case 15:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(11), $tstamp);
            break;
        case 16:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(12), $tstamp);
            break;
        case 17:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(13), $tstamp);
            break;
        case 18:
            $old = date_default_timezone_get();
            date_default_timezone_set('UTC');
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(16), $tstamp);
            date_default_timezone_set($old);
            break;
        case 19:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(14), $tstamp);
            break;
        case 20:
            $tstring = '';
            if (date('dmY', $tstamp) == date('dmY')) {
                $tstring .= __('Today') . ' (' . strftime('%H:%M', $tstamp) . ')';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') - 1))) {
                $tstring .= __('Yesterday') . ' (' . strftime('%H:%M', $tstamp) . ')';
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') + 1))) {
                $tstring .= __('Tomorrow') . ' (' . strftime('%H:%M', $tstamp) . ')';
            } else {
                $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(15), $tstamp);
            }
            break;
        case 21:
            $tstring = TBGContext::isCLI() ? strftime('%a, %d %b %Y %H:%M:%S GMT', $tstamp) : strftime(TBGContext::getI18n()->getDateTimeFormat(17), $tstamp);
            if (TBGContext::getUser()->getTimezone() > 0) {
                $tstring .= '+';
            }
            if (TBGContext::getUser()->getTimezone() < 0) {
                $tstring .= '-';
            }
            if (TBGContext::getUser()->getTimezone() != 0) {
                $tstring .= TBGContext::getUser()->getTimezone();
            }
            break;
        case 22:
            $tstring = strftime(TBGContext::getI18n()->getDateTimeFormat(15), $tstamp);
            break;
        case 23:
            $tstring = '';
            if (date('dmY', $tstamp) == date('dmY')) {
                $tstring .= __('Today');
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') - 1))) {
                $tstring .= __('Yesterday');
            } elseif (date('dmY', $tstamp) == date('dmY', mktime(0, 0, 0, date('m'), date('d') + 1))) {
                $tstring .= __('Tomorrow');
            } else {
                $tstring .= strftime(TBGContext::getI18n()->getDateTimeFormat(15), $tstamp);
            }
            break;
        default:
            return $tstamp;
    }
    return htmlentities($tstring);
}