]> wagnertech.de Git - timetracker.git/blobdiff - reports.php
Refactoring in export to use a generic get function to keep things simple.
[timetracker.git] / reports.php
index 31028f2f29031bc7c0707133694e1dccea8cac89..efbf96421e09de550036744f212af67a1c090339 100644 (file)
@@ -149,7 +149,7 @@ if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isCli
   // Prepare user and assigned projects arrays.
   if ($user->can('view_reports') || $user->can('view_all_reports')) {
     $max_rank = $user->rank-1;
-    if ($user->can('view_all_reports')) $max_rank = 512;
+    if ($user->can('view_all_reports')) $max_rank = MAX_RANK;
     if ($user->can('view_own_reports'))
       $options = array('max_rank'=>$max_rank,'include_self'=>true);
     else
@@ -298,7 +298,7 @@ if ($request->isPost()) {
     if (!ttValidString($bean->getAttribute('new_fav_report'))) $err->add($i18n->get('error.field'), $i18n->get('form.reports.save_as_favorite'));
 
     if ($err->no()) {
-      $id = ttFavReportHelper::saveReport($user->id, $bean);
+      $id = ttFavReportHelper::saveReport($user->id, $bean); // TODO: review "on behalf" situations (both user and group), redesign if needed.
       if (!$id)
         $err->add($i18n->get('error.db'));
       if ($err->no()) {