move signature() into core
This commit is contained in:
parent
f24bd9a4b9
commit
eeb2f78770
979
CHANGES.md
979
CHANGES.md
File diff suppressed because it is too large
Load Diff
@ -1393,4 +1393,27 @@ class common
|
||||
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
public function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
}
|
@ -897,26 +897,4 @@ class blog extends common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
public function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
}
|
@ -548,29 +548,6 @@ class news extends common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
private function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du module
|
||||
* Appelée par les fonctions index et config
|
||||
|
Loading…
Reference in New Issue
Block a user