Skip to content

Commit

Permalink
refactor timetracker
Browse files Browse the repository at this point in the history
  • Loading branch information
philippK-de committed Sep 26, 2016
1 parent 06c358e commit 1879863
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions include/class.timetracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function getTrack($id)
}
}

function getUserTrack($user, $project = 0, $task = 0, $start = 0, $end = 0 , $lim = 50)
function getUserTrack($user, $project = 0, $task = 0, $start = 0, $end = 0 , $lim = 25, $offset = 0)
{
global $conn;
$user = (int) $user;
Expand Down Expand Up @@ -207,7 +207,7 @@ function getUserTrack($user, $project = 0, $task = 0, $start = 0, $end = 0 , $li
$sql = $sql . $order;

$start = 0;
$limi = " LIMIT $lim OFFSET $start ";
$limi = " LIMIT $lim OFFSET $offset ";
$sql = $sql . $limi;
}

Expand Down Expand Up @@ -266,8 +266,7 @@ function getProjectTrack($project, $user = 0, $task = 0, $start = 0, $end = 0, $
$task[$index] = (int) $task[$index];
}
$task = join(',', $task);
// $start = (int) $start; // those are strings, not numbers
// $end = (int) $end; // those are strings, not numbers

if ($user > 0) {
$sql = "SELECT * FROM timetracker WHERE project = $project AND user = $user";
$num = "SELECT COUNT(*) FROM timetracker WHERE project = $project AND user = $user";
Expand Down
9 changes: 5 additions & 4 deletions include/js/views/userProfileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ var userProfileProjects = {


var userProfileTimetracker = {
el: "",
el: "userTimetracker",
itemType: "timetracker",
url: "",
url: "manageuser.php?action=userTimetracker",
dependencies: []
}
var accord_tracker = new accordion('acc-tracker');
};


2 changes: 1 addition & 1 deletion include/js/views/userProfileView.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1879863

Please sign in to comment.