fixed several small bugs (saistart, todo,sql txt)

This commit is contained in:
Ulf Gebhardt 2015-06-25 01:50:48 +02:00
parent 6cb1f4ea02
commit d512d28475
4 changed files with 5 additions and 4 deletions

View File

@ -258,6 +258,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_password', 'jaJA', '丸秘のパスワード', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_password', 'basic');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_password', 'sai_login');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_password', 'sai_start');
DELETE FROM `system_text` WHERE id = 'basic_placeholder_username';
DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_username';
@ -269,6 +270,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_username', 'trTR', 'peter@world.org', 0, 0, '2015-04-15 18:29:17', '0000-00-00 00:00:00');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'basic');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'sai_login');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'sai_start');
DELETE FROM `system_text` WHERE id = 'basic_placeholder_search';
DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_search';

View File

@ -143,7 +143,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule {
$result['project_closed'] += $data->closed;
$result['project_all'] += $data->all;
}
$result['project'] = round($result['project'] / (count($result['data'])),2);
$result['project'] = sprintf("%.2f",$result['project'] / (count($result['data'])),2);
return $result;
}
@ -157,7 +157,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule {
$vars['userstats'] = '';
$userstats = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_USERS::QQ();
while($stat = $userstats->next()){
$stat['perc'] = round(($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']))*100,2);
$stat['perc'] = sprintf("%.2f",($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']))*100);
$vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'), $stat);
}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats.tpl'), $vars);

View File

@ -11,6 +11,6 @@ class todo_stats_data {
$this->open = $all-$closed;
$this->closed = $closed;
$this->all = $all;
$this->perc = round($this->closed / ($this->all == 0 ? 1 : $this->all) * 100,2);
$this->perc = $this->all == 0 ? 1 : sprintf("%.2f", $this->closed / $this->all * 100);
}
}

View File

@ -56,7 +56,6 @@
</div>
</div>
</div>
<h2 class="muted"><a href="#!login"></a></h2>
</div>
</div>
<div class="row">