diff --git a/library/Class/Multimedia/Device.php b/library/Class/Multimedia/Device.php index fbf6f267900cf10113fe447024f42066dd23c407..10d3c86e1983de91bb76c341721d58b6d4d1da1c 100644 --- a/library/Class/Multimedia/Device.php +++ b/library/Class/Multimedia/Device.php @@ -128,7 +128,10 @@ class Class_Multimedia_Device extends Storm_Model_Abstract { return null; // si je n'ai pas de début de créneau, on sort - if (null == ($start = $this->getPreviousStartTime())) + /*if (null == ($start = $this->getPreviousStartTime())) + return null;*/ + + if (null == ($start = $this->getStartTimeForAutoHold())) return null; $end = $this->findHoldEndForTodayFrom($start, 1); @@ -262,6 +265,13 @@ class Class_Multimedia_Device extends Storm_Model_Abstract { } + /** @return int */ + public function getStartTimeForAutoHold() { + $time_source = new Class_TimeSource(); + return $time_source->time(); + } + + /** @return int */ public function getNextHoldStart() { if ($hold = $this->getNextHold()) diff --git a/library/Class/Multimedia/Users.php b/library/Class/Multimedia/Users.php index e412f44ab2c11832b0c12bf96df858e00142848d..0a560ef8b8092fbd349a695253aa95409d2feb14 100644 --- a/library/Class/Multimedia/Users.php +++ b/library/Class/Multimedia/Users.php @@ -90,7 +90,7 @@ class Class_Multimedia_Users { ->setDateDebut('') ->setDateFin($infoUser->datefin) ->setIdSite($infoUser->site->id); - if($infouser->pwd !== md5($user->getPassword())) + if($infoUser->pwd !== md5($user->getPassword())) $user->setPassword($infoUser->pwd); $user->save(); }