Commit 12097401f1ad4e206879fffca0e7fbd4baf9dc06

Authored by Benjamin Renard
1 parent 2f61f3e5

Fix bug

Showing 1 changed file with 1 additions and 3 deletions   Show diff stats
php/classes/AmdaNews.php
@@ -7,7 +7,7 @@ class AmdaNews { @@ -7,7 +7,7 @@ class AmdaNews {
7 7
8 public $user, $userdir, $infodir; 8 public $user, $userdir, $infodir;
9 9
10 - public function __construct($user) { 10 + public function __construct($user = "") {
11 if ($user) { 11 if ($user) {
12 $this->user = $user; 12 $this->user = $user;
13 $this->userdir = USERPATH."/".$user."/"; 13 $this->userdir = USERPATH."/".$user."/";
@@ -19,7 +19,6 @@ class AmdaNews { @@ -19,7 +19,6 @@ class AmdaNews {
19 * Add new info message and mark user dir with newInfo file 19 * Add new info message and mark user dir with newInfo file
20 */ 20 */
21 public function addInfo($group){ 21 public function addInfo($group){
22 -  
23 // special dir for group news 22 // special dir for group news
24 if ($group) $this->infodir = BASE_PATH.'help/'.$group.'_INFO/'; 23 if ($group) $this->infodir = BASE_PATH.'help/'.$group.'_INFO/';
25 else $this->infodir = BASE_PATH.'help/INFO/'; 24 else $this->infodir = BASE_PATH.'help/INFO/';
@@ -56,7 +55,6 @@ class AmdaNews { @@ -56,7 +55,6 @@ class AmdaNews {
56 * Concate individual info messages into one to be shown to user 55 * Concate individual info messages into one to be shown to user
57 */ 56 */
58 public function makeInfo($groups){ 57 public function makeInfo($groups){
59 -  
60 if (file_exists($this->userdir.'lastLogin')) { 58 if (file_exists($this->userdir.'lastLogin')) {
61 59
62 $timeStamp = filemtime($this->userdir.'lastLogin'); 60 $timeStamp = filemtime($this->userdir.'lastLogin');