diff --git a/CHANGELOG b/CHANGELOG
index 23aad2bb..682476e7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+=== ** v1.0.1 ** ===
+
+* [BUG] Corregido mensaje al eliminar cuentas/usuarios/grupos/perfiles.
+* [BUG] Corregido fallo al obtener el perfil de usuario tras finalizar la sesión.
+* [MOD] Dar el foco a los "inputs" tras cargar el contenido.
+* [MOD] Revisión de traducción.
+
=== ** v1.0 ** ===
* [NUEVO] Se muestran los grupos secundarios en el menú contextual de los resultados de búsqueda.
@@ -126,6 +133,13 @@
---
+=== ** v1.0.1 ** ===
+
+* [BUG] Fix message text on deleting accounts/users/groups/profiles.
+* [BUG] Fix error on retrieving profile data while closing session.
+* [MOD] Give focus to "inputs" after loading content.
+* [MOD] Update translations.
+
=== ** v1.0 ** ===
* [NEW] Secondary groups are shown on search results context menu.
diff --git a/ajax/ajax_accountsave.php b/ajax/ajax_accountsave.php
index 55ed56a0..2d34d268 100644
--- a/ajax/ajax_accountsave.php
+++ b/ajax/ajax_accountsave.php
@@ -105,7 +105,7 @@ if ($frmSaveType == 1) {
SP_Common::printXML(_('Las claves no coinciden'));
}
} else {
- $SP_Common::printXML(_('No es una acción válida'));
+ $SP_Common::printXML(_('Acción Inválida'));
}
if ($frmSaveType == 1 || $frmSaveType == 4) {
@@ -228,5 +228,5 @@ switch ($frmSaveType) {
SP_Common::printXML(_('Error al actualizar la clave'));
break;
default:
- SP_Common::printXML(_('No es una acción válida'));
+ SP_Common::printXML(_('Acción Inválida'));
}
\ No newline at end of file
diff --git a/ajax/ajax_backup.php b/ajax/ajax_backup.php
index 20aba89e..b6698419 100644
--- a/ajax/ajax_backup.php
+++ b/ajax/ajax_backup.php
@@ -38,8 +38,6 @@ if (!$sk || !SP_Common::checkSessionKey($sk)) {
SP_Common::printXML(_('CONSULTA INVÁLIDA'));
}
-SP_Users::checkUserAccess("backup") || die ('
'._('No tiene permisos para acceder a esta página').'
'._('No tiene permisos para acceder a esta página').'' . _('Gestión de Perfiles') . '' : '';
echo '';
- $tplvars['active'] = 0;
+ $tplvars['active'] = 0;
if (SP_Users::checkUserAccess("users")) {
$arrUsersTableProp = array(
@@ -191,13 +191,14 @@ switch ($action) {
}
echo '';
-
+
echo '';
break;
@@ -255,13 +256,16 @@ switch ($action) {
echo '';
- echo '';
+ ';
break;
case "eventlog":
SP_Users::checkUserAccess($action) || SP_Html::showCommonError('unavailable');
diff --git a/ajax/ajax_migrate.php b/ajax/ajax_migrate.php
index 8773cfaf..49d32e1f 100644
--- a/ajax/ajax_migrate.php
+++ b/ajax/ajax_migrate.php
@@ -1 +1 @@
-.
*
*/
define('APP_ROOT', '..');
include_once (APP_ROOT . "/inc/init.php");
SP_Util::checkReferer('POST');
if (!SP_Init::isLoggedIn()) {
SP_Common::printXML(_('La sesión no se ha iniciado o ha caducado'), 10);
}
if (SP_Config::getValue('demoenabled', 0)) {
SP_Common::printXML(_('Opción inválida'));
}
$sk = SP_Common::parseParams('p', 'sk', FALSE);
if (!$sk || !SP_Common::checkSessionKey($sk)) {
SP_Common::printXML(_('CONSULTA INVÁLIDA'));
}
$frmDBUser = SP_Common::parseParams('p', 'dbuser');
$frmDBPass = SP_Common::parseParams('p', 'dbpass');
$frmDBName = SP_Common::parseParams('p', 'dbname');
$frmDBHost = SP_Common::parseParams('p', 'dbhost');
$frmMigrateEnabled = SP_Common::parseParams('p', 'chkmigrate', 0, FALSE, 1);
if (!$frmMigrateEnabled) {
SP_Common::printXML(_('Confirmar la importación de cuentas'));
}
if (!$frmDBUser) {
SP_Common::printXML(_('Es necesario un usuario de conexión'));
}
if (!$frmDBPass) {
SP_Common::printXML(_('Es necesaria una clave de conexión'));
}
if (!$frmDBName) {
SP_Common::printXML(_('Es necesario el nombre de la BBDD'));
}
if (!$frmDBHost) {
SP_Common::printXML(_('Es necesario un nombre de host'));
}
$options['dbhost'] = $frmDBHost;
$options['dbname'] = $frmDBName;
$options['dbuser'] = $frmDBUser;
$options['dbpass'] = $frmDBPass;
$res = SP_Migrate::migrate($options);
if (is_array($res['error'])) {
foreach ($res['error'] as $error) {
$errors [] = $error['description'];
$errors [] = $error['hint'];
error_log($error['hint']);
}
$out = implode(' ', $errors);
SP_Common::printXML($out);
} else if (is_array($res['ok'])) {
$out = implode(' ', $res['ok']);
SP_Common::printXML($out, 0);
}
\ No newline at end of file
+.
*
*/
define('APP_ROOT', '..');
include_once (APP_ROOT . "/inc/init.php");
SP_Util::checkReferer('POST');
if (!SP_Init::isLoggedIn()) {
SP_Common::printXML(_('La sesión no se ha iniciado o ha caducado'), 10);
}
if (SP_Config::getValue('demoenabled', 0)) {
SP_Common::printXML(_('Acción Inválida').'(DEMO)');
}
$sk = SP_Common::parseParams('p', 'sk', FALSE);
if (!$sk || !SP_Common::checkSessionKey($sk)) {
SP_Common::printXML(_('CONSULTA INVÁLIDA'));
}
$frmDBUser = SP_Common::parseParams('p', 'dbuser');
$frmDBPass = SP_Common::parseParams('p', 'dbpass');
$frmDBName = SP_Common::parseParams('p', 'dbname');
$frmDBHost = SP_Common::parseParams('p', 'dbhost');
$frmMigrateEnabled = SP_Common::parseParams('p', 'chkmigrate', 0, FALSE, 1);
if (!$frmMigrateEnabled) {
SP_Common::printXML(_('Confirmar la importación de cuentas'));
}
if (!$frmDBUser) {
SP_Common::printXML(_('Es necesario un usuario de conexión'));
}
if (!$frmDBPass) {
SP_Common::printXML(_('Es necesaria una clave de conexión'));
}
if (!$frmDBName) {
SP_Common::printXML(_('Es necesario el nombre de la BBDD'));
}
if (!$frmDBHost) {
SP_Common::printXML(_('Es necesario un nombre de host'));
}
$options['dbhost'] = $frmDBHost;
$options['dbname'] = $frmDBName;
$options['dbuser'] = $frmDBUser;
$options['dbpass'] = $frmDBPass;
$res = SP_Migrate::migrate($options);
if (is_array($res['error'])) {
foreach ($res['error'] as $error) {
$errors [] = $error['description'];
$errors [] = $error['hint'];
error_log($error['hint']);
}
$out = implode(' ', $errors);
SP_Common::printXML($out);
} else if (is_array($res['ok'])) {
$out = implode(' ', $res['ok']);
SP_Common::printXML($out, 0);
}
\ No newline at end of file
diff --git a/ajax/ajax_search.php b/ajax/ajax_search.php
index 198fcb4a..58abcafd 100644
--- a/ajax/ajax_search.php
+++ b/ajax/ajax_search.php
@@ -184,7 +184,12 @@ foreach ( $resQuery as $account ){
echo'
getUserLoginById($frmItemId);
+
+ if ( SP_Config::getValue('demoenabled', 0) && $userLogin == 'demo'){
+ SP_Common::printXML(_('Acción Inválida').'(DEMO)');
+ }
+
if (!$frmUsrPass || !$frmUsrPassV) {
SP_Common::printXML(_('La clave no puede estar en blanco'), 2);
}
@@ -158,7 +158,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
if ($objUser->manageUser("updatepass")) {
$message['action'] = _('Modificar Clave Usuario');
- $message['text'][] = _('Nombre') . ': ' . $frmUsrName . ' (' . $frmUsrLogin . ')';
+ $message['text'][] = _('Login') . ': ' . $userLogin;
SP_Common::wrLogInfo($message);
SP_Common::sendEmail($message);
@@ -168,8 +168,14 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
SP_Common::printXML(_('Error al modificar la clave'));
// Eliminar usuario
- } elseif ($frmAction == 4 && !SP_Config::getValue('demoenabled', 0)) {
+ } elseif ($frmAction == 4) {
+ $userLogin = $objUser->getUserLoginById($frmItemId);
+
+ if ( SP_Config::getValue('demoenabled', 0) && $userLogin == 'demo' ){
+ SP_Common::printXML(_('Acción Inválida').'(DEMO)');
+ }
+
$objUser->userId = $frmItemId;
if ($frmItemId == $_SESSION["uid"]) {
@@ -178,7 +184,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
if ($objUser->manageUser("delete")) {
$message['action'] = _('Eliminar Usuario');
- $message['text'][] = _('Login') . ': ' . $frmUsrName . ' (' . $frmUsrLogin . ')';
+ $message['text'][] = _('Login') . ': ' . $userLogin;
SP_Common::wrLogInfo($message);
SP_Common::sendEmail($message);
@@ -189,11 +195,11 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
SP_Common::printXML(_('Error al eliminar el usuario'));
}
- SP_Common::printXML(_('No es una acción válida'));
+ SP_Common::printXML(_('Acción Inválida'));
} elseif ($frmSaveType == 3 || $frmSaveType == 4) {
// Variables POST del formulario
- $frmGrpName = ( isset($_POST["name"]) ) ? SP_Html::sanitize($_POST["name"]) : "";
- $frmGrpDesc = ( isset($_POST["description"]) ) ? SP_Html::sanitize($_POST["description"]) : "";
+ $frmGrpName = SP_Common::parseParams('p', 'name');
+ $frmGrpDesc = SP_Common::parseParams('p', 'description');
// Nuevo grupo o editar
if ($frmAction == 1 OR $frmAction == 2) {
@@ -235,7 +241,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
SP_Common::printXML(_('Error al actualizar el grupo'));
}
- // Eliminar grupo
+ // Eliminar grupo
} elseif ($frmAction == 4) {
$objUser->groupId = $frmItemId;
@@ -244,9 +250,11 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
if (is_string($resGroupUse)) {
SP_Common::printXML(_('No es posible eliminar:Grupo en uso por') . ' ' . $resGroupUse);
} else {
+ $groupName = $objUser->getGroupNameById($frmItemId);
+
if ($objUser->manageGroup("delete")) {
$message['action'] = _('Eliminar Grupo');
- $message['text'][] = _('Nombre') . ': ' . $frmGrpName;
+ $message['text'][] = _('Nombre') . ': ' . $groupName;
SP_Common::wrLogInfo($message);
SP_Common::sendEmail($message);
@@ -258,12 +266,12 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
}
}
- SP_Common::printXML(_('No es una acción válida'));
+ SP_Common::printXML(_('Acción Inválida'));
} elseif ($frmSaveType == 5 || $frmSaveType == 6) {
$profileProp = array();
// Variables POST del formulario
- $frmProfileName = ( isset($_POST["profile_name"]) ) ? SP_Html::sanitize($_POST["profile_name"]) : "";
+ $frmProfileName = SP_Common::parseParams('p', 'profile_name');
$objUser->profileId = $frmItemId;
// Profile properties Array
@@ -322,16 +330,18 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
SP_Common::printXML(_('Error al actualizar el perfil'));
}
- // Eliminar perfil
+ // Eliminar perfil
} elseif ($frmAction == 4) {
$resProfileUse = $objUser->checkProfileInUse();
if (is_string($resProfileUse)) {
SP_Common::printXML(_('No es posible eliminar: Perfil en uso por') . ' ' . $resProfileUse);
} else {
+ $profileName = $objUser->getProfileNameById($frmItemId);
+
if ($objUser->manageProfiles("delete")) {
$message['action'] = _('Eliminar Perfil');
- $message['text'][] = _('Nombre') . ': ' . $frmProfileName;
+ $message['text'][] = _('Nombre') . ': ' . $profileName;
SP_Common::wrLogInfo($message);
SP_Common::sendEmail($message);
@@ -343,5 +353,5 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
}
}
- SP_Common::printXML(_('No es una acción válida'));
+ SP_Common::printXML(_('Acción Inválida'));
}
\ No newline at end of file
diff --git a/ajax/ajax_usrpass.php b/ajax/ajax_usrpass.php
index 7fc9ebb5..ef475bd3 100644
--- a/ajax/ajax_usrpass.php
+++ b/ajax/ajax_usrpass.php
@@ -42,7 +42,6 @@ $strError = '
'._('No tiene permisos para re
SP_Users::checkUserAccess("acceditpass",$userId) || die ($strError);
-$isDemoMode = SP_Config::getValue('demoenabled', 0);
?>