projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95c5359
)
Starting refactoring ttFavReportHelper class for subgroups.
author
Nik Okuntseff
<support@anuko.com>
Sat, 8 Dec 2018 15:12:26 +0000
(15:12 +0000)
committer
Nik Okuntseff
<support@anuko.com>
Sat, 8 Dec 2018 15:12:26 +0000
(15:12 +0000)
WEB-INF/lib/ttFavReportHelper.class.php
patch
|
blob
|
history
WEB-INF/templates/footer.tpl
patch
|
blob
|
history
notification_add.php
patch
|
blob
|
history
notification_edit.php
patch
|
blob
|
history
reports.php
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/ttFavReportHelper.class.php
b/WEB-INF/lib/ttFavReportHelper.class.php
index
36600e2
..
3625c9d
100644
(file)
--- a/
WEB-INF/lib/ttFavReportHelper.class.php
+++ b/
WEB-INF/lib/ttFavReportHelper.class.php
@@
-32,11
+32,17
@@
import('ttTeamHelper');
class ttFavReportHelper {
// getReports - returns an array of favorite reports for user.
class ttFavReportHelper {
// getReports - returns an array of favorite reports for user.
- static function getReports($user_id) {
+ static function getReports() {
+ global $user;
$mdb2 = getConnection();
$mdb2 = getConnection();
+ $user_id = $user->getUser();
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
+
$result = array();
$result = array();
- $sql = "select * from tt_fav_reports where user_id = $user_id and status = 1";
+ $sql = "select * from tt_fav_reports".
+ " where user_id = $user_id and group_id = $group_id and org_id = $org_id and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
while ($val = $res->fetchRow()) {
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
while ($val = $res->fetchRow()) {
diff --git
a/WEB-INF/templates/footer.tpl
b/WEB-INF/templates/footer.tpl
index
9c08602
..
8e93961
100644
(file)
--- a/
WEB-INF/templates/footer.tpl
+++ b/
WEB-INF/templates/footer.tpl
@@
-12,7
+12,7
@@
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.461
1
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.461
2
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
diff --git
a/notification_add.php
b/notification_add.php
index
f122111
..
e7f541b
100644
(file)
--- a/
notification_add.php
+++ b/
notification_add.php
@@
-57,7
+57,7
@@
if ($request->isPost()) {
}
// End of access checks.
}
// End of access checks.
-$fav_reports = ttFavReportHelper::getReports(
$user->getUser()
);
+$fav_reports = ttFavReportHelper::getReports();
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
diff --git
a/notification_edit.php
b/notification_edit.php
index
de09f75
..
5755e95
100644
(file)
--- a/
notification_edit.php
+++ b/
notification_edit.php
@@
-63,7
+63,7
@@
if ($request->isPost()) {
}
// End of access checks.
}
// End of access checks.
-$fav_reports = ttFavReportHelper::getReports(
$user->getUser()
);
+$fav_reports = ttFavReportHelper::getReports();
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
diff --git
a/reports.php
b/reports.php
index
8310f5d
..
e617285
100644
(file)
--- a/
reports.php
+++ b/
reports.php
@@
-53,7
+53,7
@@
if ($user->isPluginEnabled('cf')) {
$form = new Form('reportForm');
// Get saved favorite reports for user.
$form = new Form('reportForm');
// Get saved favorite reports for user.
-$report_list = ttFavReportHelper::getReports(
$user->id
);
+$report_list = ttFavReportHelper::getReports();
$form->addInput(array('type'=>'combobox',
'name'=>'favorite_report',
'onchange'=>'document.reportForm.fav_report_changed.value=1;document.reportForm.submit();',
$form->addInput(array('type'=>'combobox',
'name'=>'favorite_report',
'onchange'=>'document.reportForm.fav_report_changed.value=1;document.reportForm.submit();',