Fixing style errors.
This commit is contained in:
parent
a001913751
commit
fee113bfb5
@ -970,7 +970,8 @@ function monthArray($outputlangs, $short = 0)
|
||||
* @return array Week numbers
|
||||
*/
|
||||
|
||||
function getWeekNumbersOfMonth($month, $year) {
|
||||
function getWeekNumbersOfMonth($month, $year)
|
||||
{
|
||||
$nb_days = cal_days_in_month(CAL_GREGORIAN, $month, $year);
|
||||
$TWeek = array();
|
||||
for($day = 1; $day < $nb_days; $day++) {
|
||||
@ -987,7 +988,8 @@ function getWeekNumbersOfMonth($month, $year) {
|
||||
* @param int $year Year number
|
||||
* @return array First day of week
|
||||
*/
|
||||
function getFirstDayOfEachWeek($TWeek, $year) {
|
||||
function getFirstDayOfEachWeek($TWeek, $year)
|
||||
{
|
||||
$TFirstDayOfWeek = array();
|
||||
foreach($TWeek as $weekNb) {
|
||||
if(in_array('01', $TWeek) && in_array('52', $TWeek) && $weekNb == '01') $year++;//Si on a la 1re semaine et la semaine 52 c'est qu'on change d'année
|
||||
@ -1003,7 +1005,8 @@ function getFirstDayOfEachWeek($TWeek, $year) {
|
||||
* @param int $year Year number
|
||||
* @return array Last day of week
|
||||
*/
|
||||
function getLastDayOfEachWeek($TWeek, $year) {
|
||||
function getLastDayOfEachWeek($TWeek, $year)
|
||||
{
|
||||
$TLastDayOfWeek = array();
|
||||
foreach($TWeek as $weekNb) {
|
||||
$TLastDayOfWeek[$weekNb] = date('d', strtotime($year.'W'.$weekNb.'+6 days'));
|
||||
@ -1019,7 +1022,8 @@ function getLastDayOfEachWeek($TWeek, $year) {
|
||||
* @param int $year Year number
|
||||
* @return int Week number
|
||||
*/
|
||||
function getWeekNumber($day, $month, $year) {
|
||||
function getWeekNumber($day, $month, $year)
|
||||
{
|
||||
$date = new DateTime($year.'-'.$month.'-'.$day);
|
||||
$week = $date->format("W");
|
||||
return $week;
|
||||
|
||||
@ -1908,7 +1908,6 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
||||
}
|
||||
foreach ($TWeek as $weekNb)
|
||||
{
|
||||
|
||||
$weekWorkLoad = $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id];
|
||||
$totalforeachweek[$weekNb]+=$weekWorkLoad;
|
||||
|
||||
|
||||
@ -228,7 +228,6 @@ if ($action == 'addtime' && $user->rights->projet->lire)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
foreach($timetoadd as $taskid => $value) // Loop on each task
|
||||
{
|
||||
$updateoftaskdone=0;
|
||||
@ -559,7 +558,6 @@ if (count($tasksarray) > 0)
|
||||
{
|
||||
foreach($TWeek as $weekNb)
|
||||
{
|
||||
|
||||
$timeonothertasks=($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]);
|
||||
if ($timeonothertasks)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user