USERHOMEMENU Plugin
Este plugin es muy útil ya que permite a cada usuario tener su propio espacio dentro del wiki donde publica lo que quiera.
Para la versión actual, dokuwiki tiene una serie de warnings respecto al plugin en modo desconectado. Es decir, cuando aun no se ha hecho login en dokuwiki.
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 518
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\helper.php on line 235
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\helper.php on line 32
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 97
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 100
- Warning: Undefined array key “do” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 115
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 518
- Warning: Undefined array key “REMOTE_USER” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 518
y esta es una forma de quitarlos, aunque hay que entrar en los archivos y editar algo de código:
action.php
1 Línea 518
if (($_SERVER['REMOTE_USER'] ?? null) != null) {
2 Líneas 97 y 100
if ((($_SERVER['REMOTE_USER'] ?? null) != null) && (!isset($_SESSION['uhptimestamp']))) { $_SESSION['uhptimestamp'] = time(); // If no user is logged in and a timestamp exists, set timestamp to null (ensures that redirection will work if user just logged out and comes back before closing browser) } elseif ((($_SERVER['REMOTE_USER'] ?? null) == null) && (isset($_SESSION['uhptimestamp']))) { $_SESSION['uhptimestamp'] = null; }
3 Línea 115
if (($this->multiNsOk()) and (($_GET['do'] ?? null) == null)) {
helper.php
4 Líneas 31-32
if ($userLogin == null) { $userLogin = $_SERVER['REMOTE_USER'] ?? null; }
5 Línea 235
} else { // simon return strtolower($_SERVER['REMOTE_USER'] ?? ''); }
Sin embarlo, al hacer login, da otros ambos en el script action.php, que tiene ya repadas las líneas anteriores:
- Warning: Undefined array key “public” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 210
- Warning: Undefined array key “private” in G:\xampp\0cms\dkCT\lib\plugins\userhomepage\action.php on line 214
1. Línea 210
if (($created['public'] ?? false) && (page_exists($this->public_page))) {
2. Línea 214
} elseif (($created['private'] ?? false) && (page_exists($this->private_page)) && ($this->getConf('edit_before_create'))) {