mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 00:24:08 +01:00
* [ADD] Added live update for master key changing process.
This commit is contained in:
@@ -32,6 +32,7 @@ use SP\Core\OldCrypt;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\Task;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\DataModel\AccountData;
|
||||
use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
@@ -51,7 +52,7 @@ class AccountCrypt
|
||||
* Actualiza las claves de todas las cuentas con la clave maestra actual
|
||||
* usando nueva encriptación.
|
||||
*
|
||||
* @param $currentMasterPass
|
||||
* @param string $currentMasterPass
|
||||
* @return bool
|
||||
*/
|
||||
public function updateOldPass(&$currentMasterPass)
|
||||
@@ -87,10 +88,9 @@ class AccountCrypt
|
||||
}
|
||||
|
||||
$AccountDataBase = new AccountData();
|
||||
$Task = Session::getTask();
|
||||
|
||||
$Message = new TaskMessage();
|
||||
$Message->setTask(__('Actualizar Clave Maestra'));
|
||||
TaskFactory::$Message->setTask(__('Actualizar Clave Maestra'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
$counter = 0;
|
||||
$startTime = time();
|
||||
@@ -107,11 +107,10 @@ class AccountCrypt
|
||||
if ($counter % 100 === 0) {
|
||||
$eta = Util::getETA($startTime, $counter, $numAccounts);
|
||||
|
||||
$Message->setMessage(__('Cuentas actualizadas') . ': ' . $counter . '/' . $numAccounts);
|
||||
$Message->setProgress(round(($counter * 100) / $numAccounts, 2));
|
||||
$Message->setTime(sprintf('ETA: %ds (%.2f/s)', $eta[0], $eta[1]));
|
||||
|
||||
$Task->writeJsonStatusAndFlush($Message);
|
||||
TaskFactory::$Message->setMessage(__('Cuentas actualizadas') . ': ' . $counter . '/' . $numAccounts);
|
||||
TaskFactory::$Message->setProgress(round(($counter * 100) / $numAccounts, 2));
|
||||
TaskFactory::$Message->setTime(sprintf('ETA: %ds (%.2f/s)', $eta[0], $eta[1]));
|
||||
TaskFactory::sendTaskMessage();
|
||||
}
|
||||
|
||||
$AccountData = clone $AccountDataBase;
|
||||
@@ -178,11 +177,12 @@ class AccountCrypt
|
||||
/**
|
||||
* Actualiza las claves de todas las cuentas con la nueva clave maestra.
|
||||
*
|
||||
* @param $currentMasterPass
|
||||
* @param $newMasterPass
|
||||
* @param string $currentMasterPass
|
||||
* @param string $newMasterPass
|
||||
* @param Task $Task
|
||||
* @return bool
|
||||
*/
|
||||
public function updatePass($currentMasterPass, $newMasterPass)
|
||||
public function updatePass($currentMasterPass, $newMasterPass, Task $Task)
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
@@ -208,11 +208,13 @@ class AccountCrypt
|
||||
}
|
||||
|
||||
$AccountDataBase = new AccountData();
|
||||
$Task = new Task(__FUNCTION__);
|
||||
|
||||
$Message = new TaskMessage();
|
||||
$Message->setTaskId($Task->getTaskId());
|
||||
$Message->setTask(__('Actualizar Clave Maestra'));
|
||||
|
||||
$Task->writeJsonStatusAndFlush($Message);
|
||||
|
||||
$counter = 0;
|
||||
$startTime = time();
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ use SP\Core\Exceptions\QueryException;
|
||||
use SP\Core\Messages\TaskMessage;
|
||||
use SP\Core\OldCrypt;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\Task;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
use SP\Storage\DB;
|
||||
@@ -55,7 +56,7 @@ class AccountHistoryCrypt
|
||||
* Actualiza las claves de todas las cuentas con la clave maestra actual
|
||||
* usando nueva encriptación.
|
||||
*
|
||||
* @param $currentMasterPass
|
||||
* @param string $currentMasterPass
|
||||
* @return bool
|
||||
*/
|
||||
public function updateOldPass(&$currentMasterPass)
|
||||
@@ -95,10 +96,8 @@ class AccountHistoryCrypt
|
||||
$AccountDataBase->key = '';
|
||||
$AccountDataBase->hash = Hash::hashKey($currentMasterPass);
|
||||
|
||||
$Task = Session::getTask();
|
||||
|
||||
$Message = new TaskMessage();
|
||||
$Message->setTask(__('Actualizar Clave Maestra (H)'));
|
||||
TaskFactory::$Message->setTask(__('Actualizar Clave Maestra (H)'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
$counter = 0;
|
||||
$startTime = time();
|
||||
@@ -115,11 +114,11 @@ class AccountHistoryCrypt
|
||||
if ($counter % 100 === 0) {
|
||||
$eta = Util::getETA($startTime, $counter, $numAccounts);
|
||||
|
||||
$Message->setMessage(__('Cuentas actualizadas') . ': ' . $counter . '/' . $numAccounts);
|
||||
$Message->setProgress(round(($counter * 100) / $numAccounts, 2));
|
||||
$Message->setTime(sprintf('ETA: %ds (%.2f/s)', $eta[0], $eta[1]));
|
||||
TaskFactory::$Message->setMessage(__('Cuentas actualizadas') . ': ' . $counter . '/' . $numAccounts);
|
||||
TaskFactory::$Message->setProgress(round(($counter * 100) / $numAccounts, 2));
|
||||
TaskFactory::$Message->setTime(sprintf('ETA: %ds (%.2f/s)', $eta[0], $eta[1]));
|
||||
|
||||
$Task->writeJsonStatusAndFlush($Message);
|
||||
TaskFactory::sendTaskMessage();
|
||||
}
|
||||
|
||||
$AccountData = clone $AccountDataBase;
|
||||
@@ -189,11 +188,12 @@ class AccountHistoryCrypt
|
||||
/**
|
||||
* Actualiza las claves de todas las cuentas con la nueva clave maestra.
|
||||
*
|
||||
* @param $currentMasterPass
|
||||
* @param $newMasterPass
|
||||
* @param string $currentMasterPass
|
||||
* @param string $newMasterPass
|
||||
* @param Task $Task
|
||||
* @return bool
|
||||
*/
|
||||
public function updatePass($currentMasterPass, $newMasterPass)
|
||||
public function updatePass($currentMasterPass, $newMasterPass, Task $Task)
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
@@ -223,11 +223,12 @@ class AccountHistoryCrypt
|
||||
$AccountDataBase->key = '';
|
||||
$AccountDataBase->hash = Hash::hashKey($newMasterPass);
|
||||
|
||||
$Task = Session::getTask();
|
||||
|
||||
$Message = new TaskMessage();
|
||||
$Message->setTaskId($Task->getTaskId());
|
||||
$Message->setTask(__('Actualizar Clave Maestra (H)'));
|
||||
|
||||
$Task->writeJsonStatusAndFlush($Message);
|
||||
|
||||
$counter = 0;
|
||||
$startTime = time();
|
||||
|
||||
|
||||
@@ -296,4 +296,20 @@ class AccountUtil
|
||||
|
||||
return DB::getResultsArray($Data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Devolver el número de cuentas a procesar
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function getTotalNumAccounts()
|
||||
{
|
||||
$query = /** @lang SQL */
|
||||
'SELECT SUM(n) AS num FROM (SELECT COUNT(*) AS n FROM accounts UNION SELECT COUNT(*) AS n FROM accHistory) a';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
|
||||
return (int)DB::getResults($Data)->num;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ class AccountController extends ControllerBase implements ActionsInterface
|
||||
|
||||
$publicLinkUrl = (Checks::publicLinksIsEnabled() && $PublicLinkData ? Init::$WEBURI . '/index.php?h=' . $PublicLinkData->getPublicLinkHash() . '&a=link' : null);
|
||||
$this->view->assign('publicLinkUrl', $publicLinkUrl);
|
||||
$this->view->assign('publicLinkId', $PublicLinkData->getPublicLinkId());
|
||||
$this->view->assign('publicLinkId', $PublicLinkData ? $PublicLinkData->getPublicLinkId() : 0);
|
||||
|
||||
$this->view->assign('accountPassDate', date('Y-m-d H:i:s', $this->AccountData->getAccountPassDate()));
|
||||
$this->view->assign('accountPassDateChange', date('Y-m-d', $this->AccountData->getAccountPassDateChange() ?: 0));
|
||||
@@ -324,6 +324,14 @@ class AccountController extends ControllerBase implements ActionsInterface
|
||||
$this->view->assign('customFields', CustomField::getItem(new CustomFieldData(ActionsInterface::ACTION_ACC))->getById($this->getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
private function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Account\Account|AccountHistory
|
||||
*/
|
||||
@@ -378,14 +386,6 @@ class AccountController extends ControllerBase implements ActionsInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
private function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtener los datos para mostrar el interface para editar cuenta
|
||||
*
|
||||
|
||||
@@ -38,6 +38,7 @@ use SP\Core\Init;
|
||||
use SP\Core\Messages\LogMessage;
|
||||
use SP\Core\Messages\NoticeMessage;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\Task;
|
||||
use SP\Core\XmlExport;
|
||||
use SP\Http\Request;
|
||||
use SP\Import\Import;
|
||||
@@ -420,7 +421,6 @@ class ConfigActionController implements ItemControllerInterface
|
||||
*/
|
||||
protected function mailAction()
|
||||
{
|
||||
$Log = Log::newLog(__('Modificar Configuración', false));
|
||||
$Config = Session::getConfig();
|
||||
|
||||
// Mail
|
||||
@@ -519,20 +519,27 @@ class ConfigActionController implements ItemControllerInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$Task = new Task(__FUNCTION__, Request::analyze('taskId'));
|
||||
$Task->register();
|
||||
|
||||
$Account = new AccountCrypt();
|
||||
|
||||
if (!$Account->updatePass($currentMasterPass, $newMasterPass)) {
|
||||
if (!$Account->updatePass($currentMasterPass, $newMasterPass, $Task)) {
|
||||
DB::rollbackTransaction();
|
||||
|
||||
$Task->end();
|
||||
|
||||
$this->JsonResponse->setDescription(__('Errores al actualizar las claves de las cuentas', false));
|
||||
return;
|
||||
}
|
||||
|
||||
$AccountHistory = new AccountHistoryCrypt();
|
||||
|
||||
if (!$AccountHistory->updatePass($currentMasterPass, $newMasterPass)) {
|
||||
if (!$AccountHistory->updatePass($currentMasterPass, $newMasterPass, $Task)) {
|
||||
DB::rollbackTransaction();
|
||||
|
||||
$Task->end();
|
||||
|
||||
$this->JsonResponse->setDescription(__('Errores al actualizar las claves de las cuentas del histórico', false));
|
||||
return;
|
||||
}
|
||||
@@ -540,15 +547,21 @@ class ConfigActionController implements ItemControllerInterface
|
||||
if (!CustomFieldsUtil::updateCustomFieldsCrypt($currentMasterPass, $newMasterPass)) {
|
||||
DB::rollbackTransaction();
|
||||
|
||||
$Task->end();
|
||||
|
||||
$this->JsonResponse->setDescription(__('Errores al actualizar datos de campos personalizados', false));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DB::endTransaction()) {
|
||||
$Task->end();
|
||||
|
||||
$this->JsonResponse->setDescription(__('No es posible finalizar una transacción', false));
|
||||
return;
|
||||
}
|
||||
|
||||
$Task->end();
|
||||
|
||||
Util::unlockApp();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace SP\Controller;
|
||||
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Account\AccountUtil;
|
||||
use SP\Config\Config;
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Config\ConfigDB;
|
||||
@@ -37,6 +38,7 @@ use SP\Core\Language;
|
||||
use SP\Core\Plugin\PluginUtil;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Task;
|
||||
use SP\Core\Template;
|
||||
use SP\Mgmt\Groups\Group;
|
||||
use SP\Mgmt\Profiles\Profile;
|
||||
@@ -312,6 +314,9 @@ class ConfigController extends ControllerBase implements ActionsInterface
|
||||
|
||||
$this->view->addTemplate('encryption');
|
||||
|
||||
$this->view->assign('numAccounts', AccountUtil::getTotalNumAccounts());
|
||||
$this->view->assign('taskId', Task::genTaskId('masterpass'));
|
||||
|
||||
$this->view->assign('lastUpdateMPass', isset($this->configDB['lastupdatempass']) ? $this->configDB['lastupdatempass'] : 0);
|
||||
$this->view->assign('tempMasterPassTime', isset($this->configDB['tempmaster_passtime']) ? $this->configDB['tempmaster_passtime'] : 0);
|
||||
$this->view->assign('tempMasterMaxTime', isset($this->configDB['tempmaster_maxtime']) ? $this->configDB['tempmaster_maxtime'] : 0);
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace SP\Controller;
|
||||
use SP\Config\Config;
|
||||
use SP\Core\Exceptions\ValidationException;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Core\Upgrade\Upgrade;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Http\Request;
|
||||
@@ -51,6 +52,7 @@ class MainActionController
|
||||
{
|
||||
$version = Request::analyze('version', $version);
|
||||
$type = Request::analyze('type');
|
||||
$taskId = Request::analyze('taskId');
|
||||
|
||||
if (Request::analyze('a') === 'upgrade'
|
||||
&& Request::analyze('upgrade', 0) === 1
|
||||
@@ -65,12 +67,17 @@ class MainActionController
|
||||
throw new ValidationException(__('Es necesario confirmar la actualización', false));
|
||||
}
|
||||
|
||||
TaskFactory::createTask('upgrade', $taskId);
|
||||
|
||||
$this->upgrade($version, $type);
|
||||
|
||||
|
||||
$JsonResponse->setDescription(__('Aplicación actualizada correctamente', false));
|
||||
$JsonResponse->addMessage(__('En 5 segundos será redirigido al login', false));
|
||||
$JsonResponse->setStatus(0);
|
||||
} catch (\Exception $e) {
|
||||
TaskFactory::endTask();
|
||||
|
||||
$JsonResponse->setDescription($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -94,6 +101,8 @@ class MainActionController
|
||||
{
|
||||
Upgrade::doUpgrade($version);
|
||||
|
||||
TaskFactory::endTask();
|
||||
|
||||
$Config = Config::getConfig();
|
||||
$Config->setMaintenance(false);
|
||||
$Config->setUpgradeKey('');
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace SP\Controller;
|
||||
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Account\AccountUtil;
|
||||
use SP\Config\Config;
|
||||
use SP\Core\Acl;
|
||||
use SP\Core\ActionsInterface;
|
||||
@@ -37,6 +38,7 @@ use SP\Core\Messages\NoticeMessage;
|
||||
use SP\Core\Plugin\PluginUtil;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Task;
|
||||
use SP\Core\Template;
|
||||
use SP\Core\Upgrade\Account;
|
||||
use SP\Core\Upgrade\Check;
|
||||
@@ -443,6 +445,7 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('version', $version);
|
||||
$this->view->assign('upgradeVersion', implode('.', Util::getVersion(true)));
|
||||
$this->view->assign('taskId', Task::genTaskId('masterpass'));
|
||||
|
||||
if ($version < 1316011001) {
|
||||
$this->view->assign('checkConstraints', Check::checkConstraints());
|
||||
@@ -459,7 +462,7 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
}
|
||||
|
||||
if ($version < 21017022601) {
|
||||
$this->view->assign('numAccounts', Account::getNumAccounts());
|
||||
$this->view->assign('numAccounts', AccountUtil::getTotalNumAccounts());
|
||||
}
|
||||
|
||||
$this->view();
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
namespace SP\Controller;
|
||||
|
||||
use SP\Core\Messages\TaskMessage;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\Task;
|
||||
use SP\Http\Request;
|
||||
use SP\Util\Util;
|
||||
|
||||
/**
|
||||
* Class TaskController
|
||||
@@ -52,6 +52,27 @@ class TaskController
|
||||
* @var string Archivo de bloqueo
|
||||
*/
|
||||
protected $lockFile;
|
||||
/**
|
||||
* @var string Directorio de las tareas
|
||||
*/
|
||||
protected $dir;
|
||||
/**
|
||||
* @var string ID de la tarea
|
||||
*/
|
||||
protected $taskId;
|
||||
/**
|
||||
* @var string Archivo de la tarea
|
||||
*/
|
||||
protected $taskFile;
|
||||
|
||||
/**
|
||||
* TaskController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->dir = Util::getTempDir();
|
||||
$this->taskId = Request::analyze('taskId');
|
||||
}
|
||||
|
||||
/**
|
||||
* Realizar acción
|
||||
@@ -60,93 +81,94 @@ class TaskController
|
||||
*/
|
||||
public function doAction()
|
||||
{
|
||||
session_write_close();
|
||||
|
||||
$source = Request::analyze('source');
|
||||
|
||||
if ($this->checkWait($source)) {
|
||||
if ($this->dir === false || !$this->getLock($source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->taskFile = $this->dir . DIRECTORY_SEPARATOR . $this->taskId . '.task';
|
||||
|
||||
$count = 0;
|
||||
|
||||
do {
|
||||
session_write_close();
|
||||
|
||||
while (!$this->checkTaskRegistered() || !$this->checkTaskFile()) {
|
||||
if ($count >= $this->startupWaitCount) {
|
||||
debugLog('Aborting ...');
|
||||
|
||||
$this->removeLock();
|
||||
|
||||
return false;
|
||||
die(1);
|
||||
}
|
||||
|
||||
debugLog('Waiting task ...');
|
||||
debugLog('Waiting for task ...');
|
||||
|
||||
sleep($this->startupWaitTime);
|
||||
|
||||
session_start();
|
||||
|
||||
$this->Task = Session::getTask();
|
||||
$count++;
|
||||
} while (!is_object($this->Task));
|
||||
|
||||
session_write_close();
|
||||
|
||||
if ($this->checkFile()) {
|
||||
$this->readTaskStatus();
|
||||
sleep($this->startupWaitTime);
|
||||
}
|
||||
|
||||
$this->removeLock();
|
||||
$this->readTaskStatus();
|
||||
|
||||
return true;
|
||||
die(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si hay una tarea a la espera
|
||||
* Comprueba si una tarea ha sido registrada en la sesión
|
||||
*
|
||||
* @param $source
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkWait($source)
|
||||
protected function checkTaskRegistered()
|
||||
{
|
||||
$this->lockFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $source . '.lock';
|
||||
if (is_object($this->Task)) {
|
||||
debugLog('Task detected: ' . $this->Task->getTaskId());
|
||||
|
||||
if (file_exists($this->lockFile) || !touch($this->lockFile)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (file_exists($this->taskFile)) {
|
||||
$task = file_get_contents($this->taskFile);
|
||||
|
||||
if ($task !== false) {
|
||||
$this->Task = unserialize($task);
|
||||
}
|
||||
|
||||
return is_object($this->Task);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si el archivo de salida de la tarea existe
|
||||
*/
|
||||
protected function checkFile()
|
||||
protected function checkTaskFile()
|
||||
{
|
||||
return file_exists($this->Task->getFile());
|
||||
return file_exists($this->Task->getFileOut());
|
||||
}
|
||||
|
||||
/**
|
||||
* Leer el estdo de una tarea y enviarlo
|
||||
* Leer el estado de una tarea y enviarlo
|
||||
*/
|
||||
protected function readTaskStatus()
|
||||
{
|
||||
debugLog('Tracking task: ' . $this->Task->getTaskId());
|
||||
|
||||
$id = 0;
|
||||
$failCount = 0;
|
||||
$file = $this->Task->getFile();
|
||||
$file = $this->Task->getFileOut();
|
||||
$interval = $this->Task->getInterval();
|
||||
|
||||
$Message = new TaskMessage();
|
||||
$Message->setTask($this->Task->getTaskId());
|
||||
$Message->setMessage(__('Esperando actualización de progreso ...'));
|
||||
|
||||
while ($failCount <= 10) {
|
||||
while ($failCount <= 30 && file_exists($this->taskFile)) {
|
||||
$content = file_get_contents($file);
|
||||
|
||||
if ($content !== false) {
|
||||
if (!empty($content)) {
|
||||
$this->sendMessage($id, $content);
|
||||
$id++;
|
||||
} else {
|
||||
debugLog($Message->composeText());
|
||||
debugLog($Message->composeJson());
|
||||
|
||||
$this->sendMessage($id, $Message->composeJson());
|
||||
$failCount++;
|
||||
@@ -170,6 +192,33 @@ class TaskController
|
||||
flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si hay una tarea a la espera
|
||||
*
|
||||
* @param $source
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkWait($source)
|
||||
{
|
||||
$this->lockFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $source . '.lock';
|
||||
|
||||
if (file_exists($this->lockFile)) {
|
||||
$timeout = $this->startupWaitCount * $this->startupWaitTime;
|
||||
|
||||
if (filemtime($this->lockFile) + $timeout < time()) {
|
||||
unlink($this->lockFile);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
touch($this->lockFile);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Eliminar bloqueo
|
||||
*/
|
||||
@@ -179,4 +228,42 @@ class TaskController
|
||||
|
||||
unlink($this->lockFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtener un bloqueo para la ejecución de la tarea
|
||||
*
|
||||
* @param $source
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function getLock($source)
|
||||
{
|
||||
if ($source === '') {
|
||||
$source = 'task';
|
||||
}
|
||||
|
||||
$this->lockFile = $this->dir . DIRECTORY_SEPARATOR . $source . '.lock';
|
||||
|
||||
if (file_exists($this->lockFile)) {
|
||||
$timeout = $this->startupWaitCount * $this->startupWaitTime;
|
||||
|
||||
if (filemtime($this->lockFile) + $timeout < time()) {
|
||||
unlink($this->lockFile);
|
||||
|
||||
return $this->updateLock();
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return $this->updateLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualizar el tiempo del archivo de bloqueo
|
||||
*/
|
||||
protected function updateLock()
|
||||
{
|
||||
return file_put_contents($this->lockFile, time()) !== false;
|
||||
}
|
||||
}
|
||||
@@ -563,7 +563,7 @@ class Init
|
||||
|
||||
if ($check === true
|
||||
|| Checks::isAjax()
|
||||
|| Request::analyze('a') === 'upgrade'
|
||||
|| (Request::analyze('a') === 'upgrade' && Request::analyze('type') !== '')
|
||||
|| Request::analyze('nodbupgrade', 0) === 1
|
||||
|| (self::$LOCK > 0 && self::isLoggedIn() && self::$LOCK === Session::getUserData()->getUserId())
|
||||
) {
|
||||
|
||||
@@ -33,6 +33,10 @@ use JsonSerializable;
|
||||
*/
|
||||
class TaskMessage implements MessageInterface, JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $taskId;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@@ -142,6 +146,7 @@ class TaskMessage implements MessageInterface, JsonSerializable
|
||||
public function composeText()
|
||||
{
|
||||
return implode(PHP_EOL, [
|
||||
'taskId' => $this->taskId,
|
||||
'task' => $this->task,
|
||||
'message' => $this->message,
|
||||
'time' => $this->time,
|
||||
@@ -158,6 +163,7 @@ class TaskMessage implements MessageInterface, JsonSerializable
|
||||
public function composeHtml()
|
||||
{
|
||||
return [
|
||||
'taskId' => $this->taskId,
|
||||
'task' => $this->task,
|
||||
'message' => $this->message,
|
||||
'time' => $this->time,
|
||||
@@ -186,4 +192,20 @@ class TaskMessage implements MessageInterface, JsonSerializable
|
||||
{
|
||||
return get_object_vars($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTaskId()
|
||||
{
|
||||
return $this->taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $taskId
|
||||
*/
|
||||
public function setTaskId($taskId)
|
||||
{
|
||||
$this->taskId = $taskId;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class Session
|
||||
*
|
||||
* @param UserData $UserData
|
||||
*/
|
||||
public static function setUserData($UserData = null)
|
||||
public static function setUserData(UserData $UserData = null)
|
||||
{
|
||||
self::setSessionKey('userData', $UserData);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ class Session
|
||||
*
|
||||
* @param Task $task
|
||||
*/
|
||||
public static function setTask(Task $task)
|
||||
public static function setTask(Task $task = null)
|
||||
{
|
||||
self::setSessionKey('task', $task);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core;
|
||||
|
||||
use SP\Core\Messages\TaskMessage;
|
||||
use SP\Util\Util;
|
||||
|
||||
/**
|
||||
* Class Task
|
||||
@@ -41,10 +42,14 @@ class Task
|
||||
* @var string ID de la tarea
|
||||
*/
|
||||
protected $taskId;
|
||||
/**
|
||||
* @var string Ruta y archivo salida de la tarea
|
||||
*/
|
||||
protected $fileOut;
|
||||
/**
|
||||
* @var string Ruta y archivo de la tarea
|
||||
*/
|
||||
protected $file;
|
||||
protected $fileTask;
|
||||
/**
|
||||
* @var resource Manejador del archivo
|
||||
*/
|
||||
@@ -62,11 +67,12 @@ class Task
|
||||
* Task constructor.
|
||||
*
|
||||
* @param string $name Nombre de la tarea
|
||||
* @param string $id
|
||||
*/
|
||||
public function __construct($name)
|
||||
public function __construct($name, $id)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->taskId = uniqid($this->name, true);
|
||||
$this->taskId = $id;
|
||||
$this->initialized = $this->checkFile();
|
||||
}
|
||||
|
||||
@@ -77,29 +83,41 @@ class Task
|
||||
*/
|
||||
protected function checkFile()
|
||||
{
|
||||
$fileName = $this->taskId . '.out';
|
||||
$fileTmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $fileName;
|
||||
$tempDir = Util::getTempDir();
|
||||
|
||||
if (touch($fileTmp)) {
|
||||
$this->file = $fileTmp;
|
||||
} else {
|
||||
$fileTmpAlt = Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . $fileName;
|
||||
$dirAlt = dirname($fileTmpAlt);
|
||||
if ($tempDir !== false) {
|
||||
$this->fileOut = $tempDir . DIRECTORY_SEPARATOR . $this->taskId . '.out';
|
||||
$this->fileTask = $tempDir . DIRECTORY_SEPARATOR . $this->taskId . '.task';
|
||||
|
||||
if (!file_exists($dirAlt) && !mkdir($dirAlt)) {
|
||||
return false;
|
||||
}
|
||||
$this->deleteTaskFiles();
|
||||
|
||||
if (!touch($fileTmpAlt)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->file = $fileTmpAlt;
|
||||
return true;
|
||||
}
|
||||
|
||||
debugLog('Start Task: ' . $this->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
/**
|
||||
* Eliminar los archivos de la tarea no usados
|
||||
*/
|
||||
protected function deleteTaskFiles()
|
||||
{
|
||||
$filesOut = dirname($this->fileOut) . DIRECTORY_SEPARATOR . $this->taskId . '*.out';
|
||||
$filesTask = dirname($this->fileOut) . DIRECTORY_SEPARATOR . $this->taskId . '*.task';
|
||||
|
||||
array_map('unlink', glob($filesOut));
|
||||
array_map('unlink', glob($filesTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generar un ID de tarea
|
||||
*
|
||||
* @param $name
|
||||
* @return string
|
||||
*/
|
||||
public static function genTaskId($name)
|
||||
{
|
||||
return uniqid($name, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,7 +138,7 @@ class Task
|
||||
protected function openFile()
|
||||
{
|
||||
if ($this->initialized === false
|
||||
|| !$this->fileHandler = fopen($this->file, 'wb')
|
||||
|| !$this->fileHandler = fopen($this->fileOut, 'wb')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -157,7 +175,7 @@ class Task
|
||||
{
|
||||
return $this->initialized === true
|
||||
&& !is_resource($this->fileHandler)
|
||||
&& file_put_contents($this->file, $Message->composeText()) !== false;
|
||||
&& file_put_contents($this->fileOut, $Message->composeText()) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,19 +188,34 @@ class Task
|
||||
{
|
||||
return $this->initialized === true
|
||||
&& !is_resource($this->fileHandler)
|
||||
&& file_put_contents($this->file, $Message->composeJson()) !== false;
|
||||
&& file_put_contents($this->fileOut, $Message->composeJson()) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iniciar la tarea
|
||||
*
|
||||
* @param bool $startSession
|
||||
* @return bool
|
||||
*/
|
||||
public function end()
|
||||
public function end($startSession = true)
|
||||
{
|
||||
debugLog('End Task: ' . $this->name);
|
||||
if ($startSession) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
return $this->closeFile() && @unlink($this->file);
|
||||
$this->deregister();
|
||||
|
||||
return $this->closeFile() && @unlink($this->fileOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desregistrar la tarea en la sesión
|
||||
*/
|
||||
public function deregister()
|
||||
{
|
||||
debugLog('Deregister Task: ' . $this->name);
|
||||
|
||||
unlink($this->fileTask);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,8 +259,34 @@ class Task
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFile()
|
||||
public function getFileOut()
|
||||
{
|
||||
return $this->file;
|
||||
return $this->fileOut;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registrar la tarea en la sesión.
|
||||
*
|
||||
* Es necesario bloquear la sesión para permitir la ejecución de otros scripts
|
||||
*
|
||||
* @param bool $lockSession Bloquear la sesión
|
||||
*/
|
||||
public function register($lockSession = true)
|
||||
{
|
||||
debugLog('Register Task: ' . $this->name);
|
||||
|
||||
file_put_contents($this->fileTask, serialize($this));
|
||||
|
||||
if ($lockSession === true) {
|
||||
session_write_close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFileTask()
|
||||
{
|
||||
return $this->fileTask;
|
||||
}
|
||||
}
|
||||
82
inc/SP/Core/TaskFactory.class.php
Normal file
82
inc/SP/Core/TaskFactory.class.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\Core;
|
||||
|
||||
use SP\Core\Messages\TaskMessage;
|
||||
|
||||
/**
|
||||
* Class TaskFactory
|
||||
*
|
||||
* @package SP\Core
|
||||
*/
|
||||
class TaskFactory
|
||||
{
|
||||
/**
|
||||
* @var TaskMessage
|
||||
*/
|
||||
public static $Message;
|
||||
/**
|
||||
* @var Task
|
||||
*/
|
||||
private static $Task;
|
||||
|
||||
/**
|
||||
* Crear una tarea para la actualización de estado de la actualización
|
||||
*
|
||||
* @param $name
|
||||
* @param $id
|
||||
*/
|
||||
public static function createTask($name, $id)
|
||||
{
|
||||
if (self::$Task === null) {
|
||||
self::$Task = new Task($name, $id);
|
||||
self::$Task->register();
|
||||
}
|
||||
|
||||
self::$Message = new TaskMessage();
|
||||
self::$Message->setTaskId($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalizar la tarea
|
||||
*/
|
||||
public static function endTask()
|
||||
{
|
||||
if (self::$Task !== null) {
|
||||
self::$Task->end();
|
||||
self::$Task = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enviar un mensaje de actualización a la tarea
|
||||
*/
|
||||
public static function sendTaskMessage()
|
||||
{
|
||||
if (self::$Task !== null) {
|
||||
self::$Task->writeJsonStatusAndFlush(self::$Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core\Upgrade;
|
||||
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
|
||||
@@ -42,6 +43,10 @@ class Account
|
||||
*/
|
||||
public static function fixAccountsId()
|
||||
{
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de cuentas'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
@@ -61,20 +66,4 @@ class Account
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Devolver el número de cuentas a procesar
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function getNumAccounts()
|
||||
{
|
||||
$query = /** @lang SQL */
|
||||
'SELECT SUM(n) AS num FROM (SELECT COUNT(*) AS n FROM accounts UNION SELECT COUNT(*) AS n FROM accHistory) a';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
|
||||
return (int)DB::getResults($Data)->num;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core\Upgrade;
|
||||
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
|
||||
@@ -43,6 +44,10 @@ class Category
|
||||
*/
|
||||
public static function fixCategoriesId($categoryId)
|
||||
{
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de categorías'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ use SP\Config\ConfigDB;
|
||||
use SP\Core\Crypt\Hash;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Init;
|
||||
use SP\Core\Messages\TaskMessage;
|
||||
use SP\Core\Session;
|
||||
use SP\Core\Task;
|
||||
use SP\Log\Log;
|
||||
use SP\Mgmt\CustomFields\CustomFieldsUtil;
|
||||
use SP\Mgmt\Users\UserMigrate;
|
||||
@@ -58,12 +55,6 @@ class Crypt
|
||||
global $timeStart;
|
||||
|
||||
try {
|
||||
$Task = new Task(__FUNCTION__);
|
||||
|
||||
Session::setTask($Task);
|
||||
|
||||
session_write_close();
|
||||
|
||||
AccountHistoryCrypt::$currentMPassHash = ConfigDB::getValue('masterPwd');
|
||||
|
||||
if (!DB::beginTransaction()) {
|
||||
@@ -82,20 +73,12 @@ class Crypt
|
||||
|
||||
debugLog('Total time: ' . (Init::microtime_float() - $timeStart));
|
||||
|
||||
$Task->end();
|
||||
|
||||
session_start();
|
||||
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
if (DB::rollbackTransaction()) {
|
||||
debugLog('Rollback: ' . __METHOD__);
|
||||
}
|
||||
|
||||
$Task->end();
|
||||
|
||||
session_start();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@@ -126,8 +109,8 @@ class Crypt
|
||||
|
||||
// Hash de clave maestra anterior a 2.0.0.17013101
|
||||
// Hash de clave maestra anterior a 2.0.0.17021601
|
||||
} elseif (hash_equals(crypt($masterPass, substr($configHashMPass, 0, 72)), substr($configHashMPass, 72))
|
||||
|| hash_equals(crypt($masterPass, substr($configHashMPass, 0, 30)), substr($configHashMPass, 30))
|
||||
} elseif ((substr($configHashMPass, 72) !== false && hash_equals(crypt($masterPass, substr($configHashMPass, 0, 72)), substr($configHashMPass, 72)))
|
||||
|| (substr($configHashMPass, 30) !== false && hash_equals(crypt($masterPass, substr($configHashMPass, 0, 30)), substr($configHashMPass, 30)))
|
||||
) {
|
||||
ConfigDB::setValue('masterPwd', Hash::hashKey($masterPass));
|
||||
Log::writeNewLog(__('Aviso', false), __('Se ha regenerado el HASH de clave maestra. No es necesaria ninguna acción.', false), Log::NOTICE);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core\Upgrade;
|
||||
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
|
||||
@@ -43,6 +44,10 @@ class Customer
|
||||
*/
|
||||
public static function fixCustomerId($customerId)
|
||||
{
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de clientes'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core\Upgrade;
|
||||
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
|
||||
@@ -46,6 +47,10 @@ class Group
|
||||
*/
|
||||
public static function fixGroupId($groupId)
|
||||
{
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de grupos'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core\Upgrade;
|
||||
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
@@ -49,6 +50,10 @@ class Profile
|
||||
$Data = new QueryData();
|
||||
|
||||
try {
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de perfil'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
if ($profileId === 0){
|
||||
|
||||
@@ -32,6 +32,7 @@ use SP\Controller\MainActionController;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Init;
|
||||
use SP\Core\Session as CoreSession;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\Http\Request;
|
||||
use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
@@ -109,10 +110,18 @@ class Upgrade
|
||||
*/
|
||||
private static function auxPreDbUpgrade($version)
|
||||
{
|
||||
if ((int)ConfigDB::getValue('version') >= $version) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch ($version) {
|
||||
case 1316011001:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return self::upgradeDB(1300000000);
|
||||
case 1316100601:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return
|
||||
Account::fixAccountsId()
|
||||
&& UserUpgrade::fixUsersId(Request::analyze('userid', 0))
|
||||
@@ -146,6 +155,12 @@ class Upgrade
|
||||
return true;
|
||||
}
|
||||
|
||||
TaskFactory::$Message->setTask(__('Actualizar BBDD'));
|
||||
TaskFactory::$Message->setMessage(sprintf('%s : %s', __('Versión'), $version));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
$Data = new QueryData();
|
||||
|
||||
foreach ($queries as $query) {
|
||||
@@ -221,10 +236,17 @@ class Upgrade
|
||||
$masterPass = Request::analyzeEncrypted('masterkey');
|
||||
$UserData = User::getItem()->getByLogin(Request::analyze('userlogin'));
|
||||
|
||||
if (!is_object($UserData)) {
|
||||
throw new SPException(SPException::SP_ERROR, __('Error al obtener los datos del usuario', false));
|
||||
}
|
||||
|
||||
@session_start();
|
||||
|
||||
CoreSession::setUserData($UserData);
|
||||
|
||||
@session_write_close();
|
||||
|
||||
return $dbResult === true
|
||||
&& is_object($UserData)
|
||||
&& !empty($masterPass)
|
||||
&& Crypt::migrate($masterPass);
|
||||
}
|
||||
@@ -243,12 +265,20 @@ class Upgrade
|
||||
try {
|
||||
switch ($version) {
|
||||
case 12001:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return (ProfileUtil::migrateProfiles() && UserMigrate::migrateUsersGroup());
|
||||
case 12002:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return UserMigrate::setMigrateUsers();
|
||||
case 20017010901:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return CustomFieldsUtil::migrateCustomFields() && UserPreferencesUtil::migrate();
|
||||
case 20017011202:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
return UserPreferencesUtil::migrate();
|
||||
}
|
||||
} catch (SPException $e) {
|
||||
@@ -284,6 +314,8 @@ class Upgrade
|
||||
if (version_compare($version, $upgradeVersion) < 0) {
|
||||
switch ($upgradeVersion) {
|
||||
case 20017011202:
|
||||
debugLog(__FUNCTION__ . ': ' . $version);
|
||||
|
||||
$Config->setSiteTheme('material-blue');
|
||||
$Config->setConfigVersion($upgradeVersion);
|
||||
Config::saveConfig($Config, false);
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace SP\Core\Upgrade;
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\OldCrypt;
|
||||
use SP\Core\TaskFactory;
|
||||
use SP\DataModel\UserLoginData;
|
||||
use SP\Mgmt\Users\UserPass;
|
||||
use SP\Storage\DB;
|
||||
@@ -47,6 +48,10 @@ class User
|
||||
*/
|
||||
public static function fixUsersId($userId)
|
||||
{
|
||||
TaskFactory::$Message->setTask(__FUNCTION__);
|
||||
TaskFactory::$Message->setMessage(__('Actualizando IDs de usuarios'));
|
||||
TaskFactory::sendTaskMessage();
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class Util
|
||||
/**
|
||||
* Generar una clave aleatoria
|
||||
*
|
||||
* @param int $length Longitud de la clave
|
||||
* @param int $length Longitud de la clave
|
||||
* @param bool $useNumbers Usar números
|
||||
* @param bool $useSpecial Usar carácteres especiales
|
||||
* @param bool $checKStrength
|
||||
@@ -246,10 +246,10 @@ class Util
|
||||
/**
|
||||
* Obtener datos desde una URL usando CURL
|
||||
*
|
||||
* @param string $url
|
||||
* @param array $data
|
||||
* @param string $url
|
||||
* @param array $data
|
||||
* @param bool|null $useCookie
|
||||
* @param bool $weak
|
||||
* @param bool $weak
|
||||
* @return bool|string
|
||||
* @throws SPException
|
||||
*/
|
||||
@@ -453,8 +453,8 @@ class Util
|
||||
* such as 'false','N','yes','on','off', etc.
|
||||
*
|
||||
* @author Samuel Levy <sam+nospam@samuellevy.com>
|
||||
* @param mixed $in The variable to check
|
||||
* @param bool $strict If set to false, consider everything that is not false to
|
||||
* @param mixed $in The variable to check
|
||||
* @param bool $strict If set to false, consider everything that is not false to
|
||||
* be true.
|
||||
* @return bool The boolean equivalent or null (if strict, and no exact equivalent)
|
||||
*/
|
||||
@@ -528,7 +528,7 @@ class Util
|
||||
/**
|
||||
* Cast an object to another class, keeping the properties, but changing the methods
|
||||
*
|
||||
* @param string $class Class name
|
||||
* @param string $class Class name
|
||||
* @param string|object $object
|
||||
* @return mixed
|
||||
* @link http://blog.jasny.net/articles/a-dark-corner-of-php-class-casting/
|
||||
@@ -584,9 +584,9 @@ class Util
|
||||
/**
|
||||
* Comprobar si un valor existe en un array de objetos
|
||||
*
|
||||
* @param array $objectArray
|
||||
* @param array $objectArray
|
||||
* @param string $method
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkInObjectArray(array $objectArray, $method, $value)
|
||||
@@ -660,4 +660,30 @@ class Util
|
||||
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprueba y devuelve un directorio temporal válido
|
||||
*
|
||||
* @return bool|string
|
||||
*/
|
||||
public static function getTempDir()
|
||||
{
|
||||
$sysTmp = sys_get_temp_dir();
|
||||
$appTmp = Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'tmp';
|
||||
$file = 'syspass.test';
|
||||
|
||||
if (file_exists($appTmp . DIRECTORY_SEPARATOR . $file)) {
|
||||
return $appTmp;
|
||||
} elseif (file_exists($sysTmp . DIRECTORY_SEPARATOR . $file)) {
|
||||
return $sysTmp;
|
||||
}
|
||||
|
||||
if (is_dir($appTmp) || @mkdir($appTmp)) {
|
||||
if (touch($appTmp . DIRECTORY_SEPARATOR . $file)) {
|
||||
return $appTmp;
|
||||
}
|
||||
}
|
||||
|
||||
return touch($sysTmp . DIRECTORY_SEPARATOR . $file) ? $sysTmp : false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -8,8 +8,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sysPass\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-26 11:46+0100\n"
|
||||
"PO-Revision-Date: 2017-02-26 13:19+0100\n"
|
||||
"POT-Creation-Date: 2017-02-28 12:31+0100\n"
|
||||
"PO-Revision-Date: 2017-02-28 12:31+0100\n"
|
||||
"Last-Translator: nuxsmin <nuxsmin@syspass.org>\n"
|
||||
"Language-Team: nuxsmin@syspass.org\n"
|
||||
"Language: en_US\n"
|
||||
@@ -69,7 +69,7 @@ msgstr "Invalid file"
|
||||
#: ../../../../ajax/ajax_filesMgmt.php:104
|
||||
#: ../../../../ajax/ajax_filesMgmt.php:166
|
||||
#: ../../../../inc/SP/Controller/ItemActionController.class.php:841
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:352
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:372
|
||||
#: ../../../../inc/SP/Mgmt/Files/File.class.php:95
|
||||
#: ../../../../inc/themes/material-blue/views/config/import.inc:66
|
||||
#: ../../../../inc/themes/material-blue/views/config/import.inc:69
|
||||
@@ -155,7 +155,7 @@ msgstr "Account"
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:512
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:530
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:538
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:118
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:116
|
||||
#: ../../../../inc/SP/Core/Init.class.php:445
|
||||
#: ../../../../inc/SP/Mgmt/Files/File.class.php:96
|
||||
#: ../../../../inc/SP/Mgmt/PublicLinks/PublicLink.class.php:75
|
||||
@@ -278,10 +278,10 @@ msgstr "Error while creating the account"
|
||||
|
||||
#: ../../../../inc/SP/Account/Account.class.php:321
|
||||
#: ../../../../inc/SP/Account/Account.class.php:324
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:127
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:237
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:137
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:256
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:138
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:258
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:149
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:278
|
||||
#: ../../../../inc/SP/Api/ApiBase.class.php:200
|
||||
#: ../../../../inc/SP/Api/ApiBase.class.php:203
|
||||
#: ../../../../inc/SP/Api/ApiRequest.class.php:147
|
||||
@@ -321,54 +321,54 @@ msgstr "Error while deleting the account"
|
||||
msgid "Error al actualizar la clave"
|
||||
msgstr "Error while updating the password"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:66
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:102
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:188
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:216
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:68
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:94
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:199
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:218
|
||||
#: ../../../../inc/SP/Controller/ConfigActionController.class.php:558
|
||||
#: ../../../../inc/SP/Controller/ConfigActionController.class.php:586
|
||||
msgid "Actualizar Clave Maestra"
|
||||
msgstr "Update Master Password"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:67
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:189
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:70
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:198
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:69
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:200
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:72
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:210
|
||||
msgid "Inicio"
|
||||
msgstr "Start"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:71
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:74
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:73
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:76
|
||||
msgid "Error en el módulo de encriptación"
|
||||
msgstr "Error on the encryption module"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:81
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:196
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:83
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:207
|
||||
msgid "Error al obtener las claves de las cuentas"
|
||||
msgstr "Error while retrieving the accounts' passwords"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:103
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:144
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:217
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:254
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:110
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:154
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:231
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:273
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:113
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:155
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:237
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:275
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:121
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:166
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:252
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:295
|
||||
msgid "Cuentas actualizadas"
|
||||
msgstr "Accounts updated"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:137
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:140
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:247
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:250
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:148
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:151
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:268
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:271
|
||||
msgid "Fallo al actualizar la clave de la cuenta"
|
||||
msgstr "Error while updating the account's password"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:145
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:255
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:155
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:274
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:156
|
||||
#: ../../../../inc/SP/Account/AccountCrypt.class.php:276
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:167
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:296
|
||||
#: ../../../../inc/SP/Controller/ItemActionController.class.php:1077
|
||||
msgid "Errores"
|
||||
msgstr "Errors"
|
||||
@@ -385,29 +385,29 @@ msgstr "Error while deleting favorite"
|
||||
msgid "Error al actualizar el historial"
|
||||
msgstr "Error while updating history"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:69
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:109
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:197
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:230
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:71
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:102
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:209
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:233
|
||||
msgid "Actualizar Clave Maestra (H)"
|
||||
msgstr "Update Master Password (H)"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:84
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:205
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:86
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:217
|
||||
#: ../../../../inc/themes/material-blue/views/accountsearch/index.inc:11
|
||||
#: ../../../../inc/themes/material-blue/views/eventlog/eventlog.inc:11
|
||||
msgid "No se encontraron registros"
|
||||
msgstr "No records found"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:124
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:243
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:136
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:265
|
||||
msgid "La clave maestra del registro no coincide"
|
||||
msgstr "The record's master password does not match"
|
||||
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:147
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:150
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:266
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:269
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:159
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:162
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:288
|
||||
#: ../../../../inc/SP/Account/AccountHistoryCrypt.class.php:291
|
||||
msgid "Fallo al actualizar la clave del histórico"
|
||||
msgstr "Error on updating the history's master password"
|
||||
|
||||
@@ -969,8 +969,8 @@ msgid "Modificar configuración"
|
||||
msgstr "Update Configuration"
|
||||
|
||||
#: ../../../../inc/SP/Config/ConfigDB.class.php:149
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:325
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:331
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:345
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:351
|
||||
msgid "Parámetro"
|
||||
msgstr "Parameter"
|
||||
|
||||
@@ -1115,10 +1115,10 @@ msgid "Conexión correcta"
|
||||
msgstr "Connection successful"
|
||||
|
||||
#: ../../../../inc/SP/Controller/ChecksController.class.php:138
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:117
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:115
|
||||
#: ../../../../inc/SP/Core/Init.class.php:444
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:139
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:345
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:147
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:365
|
||||
#: ../../../../inc/themes/material-blue/views/config/info.inc:40
|
||||
#: ../../../../inc/themes/material-blue/views/itemshow/plugins.inc:25
|
||||
msgid "Versión"
|
||||
@@ -1307,7 +1307,7 @@ msgid "La clave maestra actual no coincide"
|
||||
msgstr "The current master password does not match"
|
||||
|
||||
#: ../../../../inc/SP/Controller/ConfigActionController.class.php:518
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:59
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:70
|
||||
#: ../../../../inc/SP/Import/Import.class.php:89
|
||||
msgid "No es posible iniciar una transacción"
|
||||
msgstr "Unable to start a transaction"
|
||||
@@ -1325,7 +1325,7 @@ msgid "Errores al actualizar datos de campos personalizados"
|
||||
msgstr "Error while updating the custom fields data"
|
||||
|
||||
#: ../../../../inc/SP/Controller/ConfigActionController.class.php:548
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:68
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:80
|
||||
#: ../../../../inc/SP/Import/Import.class.php:95
|
||||
msgid "No es posible finalizar una transacción"
|
||||
msgstr "Unable to finish a transaction"
|
||||
@@ -2377,7 +2377,7 @@ msgstr "Using temporary password"
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:319
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:338
|
||||
#: ../../../../inc/SP/Controller/LoginController.class.php:340
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:61
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:72
|
||||
msgid "Clave maestra incorrecta"
|
||||
msgstr "Wrong Master Password"
|
||||
|
||||
@@ -2410,7 +2410,7 @@ msgid "Autentificación"
|
||||
msgstr "Authentication"
|
||||
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:60
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:115
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:113
|
||||
#: ../../../../inc/SP/Core/Init.class.php:442
|
||||
msgid "Actualización"
|
||||
msgstr "Update"
|
||||
@@ -2432,7 +2432,7 @@ msgstr "Application successfully updated"
|
||||
msgid "En 5 segundos será redirigido al login"
|
||||
msgstr "You will be redirected to log in within 5 seconds"
|
||||
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:116
|
||||
#: ../../../../inc/SP/Controller/MainActionController.class.php:114
|
||||
#: ../../../../inc/SP/Core/Init.class.php:443 ../../../../res/upgrade.php:121
|
||||
msgid "Actualización de versión realizada."
|
||||
msgstr "Version updating done."
|
||||
@@ -2510,6 +2510,10 @@ msgstr "Link viewed"
|
||||
msgid "Agente"
|
||||
msgstr "Agent"
|
||||
|
||||
#: ../../../../inc/SP/Controller/TaskController.class.php:140
|
||||
msgid "Esperando actualización de progreso ..."
|
||||
msgstr "Waiting for progress updating ..."
|
||||
|
||||
#: ../../../../inc/SP/Controller/UserPreferencesController.class.php:90
|
||||
msgid "Preferencias"
|
||||
msgstr "Preferences"
|
||||
@@ -2939,16 +2943,16 @@ msgstr "Template does not contain files"
|
||||
msgid "Error al crear la categoría"
|
||||
msgstr "Error while creating the category"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:104
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:115
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:122
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:133
|
||||
#: ../../../../inc/SP/Log/Email.class.php:141
|
||||
#: ../../../../inc/themes/material-blue/inc/Icons.class.php:70
|
||||
#: ../../../../js/strings.js.php:85
|
||||
msgid "Aviso"
|
||||
msgstr "Warning"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:104
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:115
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:122
|
||||
#: ../../../../inc/SP/Core/Upgrade/Crypt.class.php:133
|
||||
msgid ""
|
||||
"Se ha regenerado el HASH de clave maestra. No es necesaria ninguna acción."
|
||||
msgstr ""
|
||||
@@ -2959,12 +2963,12 @@ msgstr ""
|
||||
msgid "Error al crear el cliente"
|
||||
msgstr "Error while creating the customer"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Group.class.php:87
|
||||
#: ../../../../inc/SP/Core/Upgrade/Group.class.php:98
|
||||
#: ../../../../inc/SP/Mgmt/Groups/Group.class.php:67
|
||||
msgid "Error al crear el grupo"
|
||||
msgstr "Error while creating the group"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Profile.class.php:84
|
||||
#: ../../../../inc/SP/Core/Upgrade/Profile.class.php:92
|
||||
#: ../../../../inc/SP/Mgmt/Profiles/Profile.class.php:68
|
||||
msgid "Error al crear perfil"
|
||||
msgstr "Error while creating the profile"
|
||||
@@ -2982,7 +2986,7 @@ msgid "Compruebe el registro de eventos para más detalles"
|
||||
msgstr "Please, check the event log for more details"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:79
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:156
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:166
|
||||
msgid "Error al aplicar la actualización de la Base de Datos"
|
||||
msgstr "Error while updating the database"
|
||||
|
||||
@@ -2990,42 +2994,48 @@ msgstr "Error while updating the database"
|
||||
msgid "Error al aplicar la actualización de la aplicación"
|
||||
msgstr "Error while applying the application update"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:138
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:146
|
||||
msgid "Actualizar BBDD"
|
||||
msgstr "Update DB"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:144
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:152
|
||||
msgid "No es necesario actualizar la Base de Datos."
|
||||
msgstr "Database update not needed."
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:168
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:178
|
||||
msgid "Actualización de la Base de Datos realizada correctamente."
|
||||
msgstr "Database updating was completed successfully."
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:312
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:235
|
||||
#: ../../../../inc/SP/Mgmt/Users/User.class.php:336
|
||||
#: ../../../../inc/SP/Mgmt/Users/User.class.php:393
|
||||
msgid "Error al obtener los datos del usuario"
|
||||
msgstr "Error while retrieving the user's data"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:332
|
||||
msgid "Actualizar Configuración"
|
||||
msgstr "Update Configuration"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:351
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:371
|
||||
msgid "Error al actualizar la configuración"
|
||||
msgstr "Error while updating the configuration"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:478
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:498
|
||||
msgid "La aplicación necesita actualizarse"
|
||||
msgstr "The application needs to be updated"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:478
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:498
|
||||
#, php-format
|
||||
msgid "Si es un administrador pulse en el enlace: %s"
|
||||
msgstr "If you are an administrator, click on the link: %s"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:478
|
||||
#: ../../../../inc/SP/Core/Upgrade/Upgrade.class.php:498
|
||||
#: ../../../../inc/themes/material-blue/inc/Icons.class.php:57
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:162
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:167
|
||||
msgid "Actualizar"
|
||||
msgstr "Update"
|
||||
|
||||
#: ../../../../inc/SP/Core/Upgrade/User.class.php:149
|
||||
#: ../../../../inc/SP/Core/Upgrade/User.class.php:151
|
||||
#: ../../../../inc/SP/Mgmt/Users/User.class.php:88
|
||||
msgid "Error al crear el usuario"
|
||||
msgstr "Error while creating the user"
|
||||
@@ -3671,11 +3681,6 @@ msgstr "Error while retrieving the users"
|
||||
msgid "Error al modificar la clave"
|
||||
msgstr "Error while updating the password"
|
||||
|
||||
#: ../../../../inc/SP/Mgmt/Users/User.class.php:336
|
||||
#: ../../../../inc/SP/Mgmt/Users/User.class.php:393
|
||||
msgid "Error al obtener los datos del usuario"
|
||||
msgstr "Error while retrieving the user's data"
|
||||
|
||||
#: ../../../../inc/SP/Mgmt/Users/UserLdap.class.php:108
|
||||
#: ../../../../inc/themes/material-blue/inc/Icons.class.php:54
|
||||
msgid "Usuario de LDAP"
|
||||
@@ -4149,6 +4154,11 @@ msgstr "This action will reset all plugin data. Do you want to continue?"
|
||||
msgid "Este proceso puede durar algo de tiempo. Desea continuar?"
|
||||
msgstr "This process could long some time. Do you wish to continue?"
|
||||
|
||||
#: ../../../../js/strings.js.php:87
|
||||
msgid ""
|
||||
"Realizando tarea. Por favor, no cierre la ventana/pestaña del navegador."
|
||||
msgstr "Performing task. Please, do not close the browser window/tab."
|
||||
|
||||
#: ../../../../inc/themes/material-blue/views/account/account-editpass.inc:67
|
||||
#: ../../../../inc/themes/material-blue/views/account/account.inc:135
|
||||
#: ../../../../inc/themes/material-blue/views/account/account.inc:142
|
||||
@@ -5885,21 +5895,21 @@ msgstr ""
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Se van a actualizar %s cuentas. Este proceso puede tardar algo de tiempo."
|
||||
msgstr "It will be updated %s accounts. This process could take a some time."
|
||||
msgstr "It will be updated %s accounts. This process could take some time."
|
||||
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:135
|
||||
msgid "Introducir login de usuario válido"
|
||||
msgstr "Enter a valid user login"
|
||||
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:141
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:146
|
||||
msgid "He realizado una copia de seguridad completa de sysPass"
|
||||
msgstr "I've done a full sysPass backup"
|
||||
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:154
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:159
|
||||
msgid "Por favor espere mientras el proceso se ejecuta"
|
||||
msgstr "Please, wait while the process is running"
|
||||
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:164
|
||||
#: ../../../../inc/themes/material-blue/views/main/upgrade.inc:169
|
||||
msgid "Iniciar Actualización"
|
||||
msgstr "Start Update"
|
||||
|
||||
@@ -5950,9 +5960,3 @@ msgstr "Search results of '%s'"
|
||||
#: ../../../../inc/themes/material-blue/views/wiki/wikipage.inc:23
|
||||
msgid "Página"
|
||||
msgstr "Page"
|
||||
|
||||
#~ msgid "Error al eliminar archivo"
|
||||
#~ msgstr "Error while deleting the file"
|
||||
|
||||
#~ msgid "Error al aplicar la actualización de la Base de Datos."
|
||||
#~ msgstr "Error while updating database."
|
||||
|
||||
@@ -88,17 +88,20 @@
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('Guarde la nueva clave en un lugar seguro.'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('Se volverán a encriptar las claves de todas las cuentas.'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('Los usuarios deberán de introducir la nueva clave maestra.'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<strong><?php printf(__('Se van a actualizar %s cuentas. Este proceso puede tardar algo de tiempo.'), $numAccounts); ?></strong>
|
||||
<br>
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="confirmPassChange">
|
||||
<input type="checkbox" id="confirmPassChange" class="mdl-switch__input"
|
||||
@@ -108,6 +111,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ($numAccounts >= 500): ?>
|
||||
<input type="hidden" name="useTask" value="1">
|
||||
<input type="hidden" name="taskId" value="<?php echo $taskId; ?>">
|
||||
<input type="hidden" name="lock" value="masterpass">
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $encryption_tabIndex; ?>"/>
|
||||
<input type="hidden" name="actionId"
|
||||
value="<?php echo \SP\Core\ActionsInterface::ACTION_CFG_ENCRYPTION; ?>"/>
|
||||
@@ -133,16 +143,16 @@
|
||||
</div>
|
||||
</li>
|
||||
<?php if ($isAdminApp): ?>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="config/refreshMpass"
|
||||
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_CFG_ENCRYPTION_REFRESH; ?>"
|
||||
data-sk="<?php echo $sk; ?>"
|
||||
title="<?php echo __('Actualizar hash de clave maestra'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconRefresh()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="config/refreshMpass"
|
||||
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_CFG_ENCRYPTION_REFRESH; ?>"
|
||||
data-sk="<?php echo $sk; ?>"
|
||||
title="<?php echo __('Actualizar hash de clave maestra'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconRefresh()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<button form="frmCrypt"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<header class="mdl-layout__header mdl-color--indigo-400">
|
||||
<div class="mdl-layout__header-row">
|
||||
<!-- Title -->
|
||||
<span class="mdl-layout-icon"><img class="logo" src="<?php echo $logonobg; ?>" alt="logo"/></span>
|
||||
<span class="mdl-layout-icon">
|
||||
<img class="logo btn-menu" src="<?php echo $logonobg; ?>"
|
||||
alt="logo"
|
||||
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_ACC_SEARCH; ?>"
|
||||
data-view="search"
|
||||
data-historyReset="1"/>
|
||||
</span>
|
||||
<!-- <span class="mdl-layout-title">--><?php //echo '#', $appInfo['appname']; ?><!--</span>-->
|
||||
<?php if ($loggedIn): ?>
|
||||
<!-- Add spacer, to align navigation to the right -->
|
||||
|
||||
@@ -134,6 +134,12 @@
|
||||
<label class="mdl-textfield__label"
|
||||
for="userlogin"><?php echo __('Introducir login de usuario válido'); ?></label>
|
||||
</div>
|
||||
|
||||
<?php if ($numAccounts >= 500): ?>
|
||||
<input type="hidden" name="useTask" value="1">
|
||||
<input type="hidden" name="taskId" value="<?php echo $taskId; ?>">
|
||||
<input type="hidden" name="lock" value="upgrade">
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="chkConfirm">
|
||||
@@ -144,7 +150,6 @@
|
||||
<input type="hidden" name="a" value="<?php echo $action; ?>">
|
||||
<input type="hidden" name="type" value="<?php echo $type; ?>">
|
||||
<input type="hidden" name="version" value="<?php echo $version; ?>">
|
||||
<input type="hidden" name="lock" value="upgrade">
|
||||
<input type="hidden" name="upgrade" value="1">
|
||||
</fieldset>
|
||||
|
||||
|
||||
@@ -419,17 +419,26 @@ sysPass.Actions = function (Common) {
|
||||
positive: {
|
||||
title: Common.config().LANG[43],
|
||||
onClick: function (e) {
|
||||
var optsTask = Common.appRequests().getRequestOpts();
|
||||
optsTask.url = ajaxUrl.main.task;
|
||||
optsTask.data = {source: $obj.find("input[name='lock']").val()};
|
||||
var $useTask = $obj.find("input[name='useTask']");
|
||||
var $taskStatus = $("#taskStatus");
|
||||
|
||||
var task = Common.appRequests().getActionEvent(optsTask, function (result) {
|
||||
var $taskStatus = $("#taskStatus");
|
||||
$taskStatus.empty().html(Common.config().LANG[62]);
|
||||
|
||||
var text = result.task + " - " + result.message + " - " + result.time + " - " + result.progress + "%";
|
||||
if ($useTask.length > 0 && $useTask.val() == 1) {
|
||||
var optsTask = Common.appRequests().getRequestOpts();
|
||||
optsTask.url = ajaxUrl.main.task;
|
||||
optsTask.data = {
|
||||
source: $obj.find("input[name='lock']").val(),
|
||||
taskId: $obj.find("input[name='taskId']").val()
|
||||
};
|
||||
|
||||
$taskStatus.empty().html(text);
|
||||
});
|
||||
var task = Common.appRequests().getActionEvent(optsTask, function (result) {
|
||||
var text = result.task + " - " + result.message + " - " + result.time + " - " + result.progress + "%";
|
||||
text += "<br>" + Common.config().LANG[62];
|
||||
|
||||
$taskStatus.empty().html(text);
|
||||
});
|
||||
}
|
||||
|
||||
var opts = Common.appRequests().getRequestOpts();
|
||||
opts.url = ajaxUrl.main.upgrade;
|
||||
@@ -441,10 +450,12 @@ sysPass.Actions = function (Common) {
|
||||
Common.msg.out(json);
|
||||
|
||||
if (json.status !== 0) {
|
||||
task.close();
|
||||
|
||||
$obj.find(":input[name=h]").val("");
|
||||
} else {
|
||||
if (task !== undefined) {
|
||||
task.close();
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
Common.redirect("index.php");
|
||||
}, 5000);
|
||||
@@ -570,9 +581,41 @@ sysPass.Actions = function (Common) {
|
||||
positive: {
|
||||
title: Common.config().LANG[43],
|
||||
onClick: function (e) {
|
||||
config.save($obj);
|
||||
var $useTask = $obj.find("input[name='useTask']");
|
||||
var $taskStatus = $("#taskStatus");
|
||||
|
||||
$obj.find(":input[type=password]").val("");
|
||||
$taskStatus.empty().html(Common.config().LANG[62]);
|
||||
|
||||
if ($useTask.length > 0 && $useTask.val() == 1) {
|
||||
var optsTask = Common.appRequests().getRequestOpts();
|
||||
optsTask.url = ajaxUrl.main.task;
|
||||
optsTask.data = {
|
||||
source: $obj.find("input[name='lock']").val(),
|
||||
taskId: $obj.find("input[name='taskId']").val()
|
||||
};
|
||||
|
||||
var task = Common.appRequests().getActionEvent(optsTask, function (result) {
|
||||
var text = result.task + " - " + result.message + " - " + result.time + " - " + result.progress + "%";
|
||||
text += "<br>" + Common.config().LANG[62];
|
||||
|
||||
$taskStatus.empty().html(text);
|
||||
});
|
||||
}
|
||||
|
||||
var opts = Common.appRequests().getRequestOpts();
|
||||
opts.url = ajaxUrl.config.save;
|
||||
opts.useFullLoading = true;
|
||||
opts.data = $obj.serialize();
|
||||
|
||||
Common.appRequests().getActionCall(opts, function (json) {
|
||||
Common.msg.out(json);
|
||||
|
||||
$obj.find(":input[type=password]").val("");
|
||||
|
||||
if (task !== undefined) {
|
||||
task.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
84
js/app-actions.min.js
vendored
84
js/app-actions.min.js
vendored
@@ -1,43 +1,45 @@
|
||||
var $jscomp={scope:{},findInternal:function(c,e,k){c instanceof String&&(c=String(c));for(var f=c.length,g=0;g<f;g++){var l=c[g];if(e.call(k,l,g,c))return{i:g,v:l}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(c,e,k){if(k.get||k.set)throw new TypeError("ES3 does not support getters and setters.");c!=Array.prototype&&c!=Object.prototype&&(c[e]=k.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,e,k,f){if(e){k=$jscomp.global;c=c.split(".");for(f=0;f<c.length-1;f++){var g=c[f];g in k||(k[g]={});k=k[g]}c=c[c.length-1];f=k[c];e=e(f);e!=f&&null!=e&&$jscomp.defineProperty(k,c,{configurable:!0,writable:!0,value:e})}};
|
||||
var $jscomp={scope:{},findInternal:function(c,d,k){c instanceof String&&(c=String(c));for(var f=c.length,g=0;g<f;g++){var l=c[g];if(d.call(k,l,g,c))return{i:g,v:l}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,k){if(k.get||k.set)throw new TypeError("ES3 does not support getters and setters.");c!=Array.prototype&&c!=Object.prototype&&(c[d]=k.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,k,f){if(d){k=$jscomp.global;c=c.split(".");for(f=0;f<c.length-1;f++){var g=c[f];g in k||(k[g]={});k=k[g]}c=c[c.length-1];f=k[c];d=d(f);d!=f&&null!=d&&$jscomp.defineProperty(k,c,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,k){return $jscomp.findInternal(this,c,k).v}},"es6-impl","es3");
|
||||
sysPass.Actions=function(c){var e=c.log,k=0,f={doAction:"/ajax/ajax_getContent.php",updateItems:"/ajax/ajax_getItems.php",user:{savePreferences:"/ajax/ajax_userPrefsSave.php",password:"/ajax/ajax_usrpass.php",passreset:"/ajax/ajax_passReset.php"},main:{login:"/ajax/ajax_doLogin.php",install:"/ajax/ajax_install.php",upgrade:"/ajax/ajax_upgrade.php",getUpdates:"/ajax/ajax_checkUpds.php",task:"/ajax/ajax_task.php"},checks:"/ajax/ajax_checkConnection.php",config:{save:"/ajax/ajax_configSave.php","export":"/ajax/ajax_configSave.php",
|
||||
sysPass.Actions=function(c){var d=c.log,k=0,f={doAction:"/ajax/ajax_getContent.php",updateItems:"/ajax/ajax_getItems.php",user:{savePreferences:"/ajax/ajax_userPrefsSave.php",password:"/ajax/ajax_usrpass.php",passreset:"/ajax/ajax_passReset.php"},main:{login:"/ajax/ajax_doLogin.php",install:"/ajax/ajax_install.php",upgrade:"/ajax/ajax_upgrade.php",getUpdates:"/ajax/ajax_checkUpds.php",task:"/ajax/ajax_task.php"},checks:"/ajax/ajax_checkConnection.php",config:{save:"/ajax/ajax_configSave.php","export":"/ajax/ajax_configSave.php",
|
||||
"import":"/ajax/ajax_configSave.php"},file:"/ajax/ajax_filesMgmt.php",link:"/ajax/ajax_itemSave.php",plugin:"/ajax/ajax_itemSave.php",account:{save:"/ajax/ajax_itemSave.php",saveFavorite:"/ajax/ajax_itemSave.php",request:"/ajax/ajax_itemSave.php",getFiles:"/ajax/ajax_accGetFiles.php",search:"/ajax/ajax_accSearch.php"},appMgmt:{show:"/ajax/ajax_itemShow.php",save:"/ajax/ajax_itemSave.php",search:"/ajax/ajax_itemSearch.php"},eventlog:"/ajax/ajax_eventlog.php",wiki:{show:"/ajax/ajax_wiki.php"},notice:{show:"/ajax/ajax_noticeShow.php",
|
||||
search:"/ajax/ajax_noticeSearch.php"}},g=function(a,b){var d={actionId:a.actionId,itemId:"undefined"!==a.itemId?a.itemId:0,isAjax:1},h=c.appRequests().getRequestOpts();h.url=f.doAction;h.method="get";h.type="html";h.addHistory=!0;h.data=d;c.appRequests().getActionCall(h,function(c){var a=$("#content");a.empty().html(c);c=sysPassApp.triggers().views;c.common(a);if(void 0!==b&&"function"===typeof c[b])c[b]();a=$(".mdl-layout__content");0<a.scrollTop()&&a.animate({scrollTop:0},1E3)})},l=function(a,b){$.magnificPopup.open({items:{src:b,
|
||||
type:"inline"},callbacks:{open:function(){var a=$("#box-popup");c.appTriggers().views.common(a);a.find(":input:text:visible:first").focus()},close:function(){a.data("item-dst")&&p.update(a)}},showCloseBtn:!1})},t=function(a,b){var d=$('<div id="box-popup" class="image">'+b+"</div>"),h=d.find("img");if(0===h.length)return l(a,b);h.hide();$.magnificPopup.open({items:{src:d,type:"inline"},callbacks:{open:function(){var a=this;h.on("click",function(){a.close()});setTimeout(function(){var a=c.resizeImage(h);
|
||||
d.css({backgroundColor:"#fff",width:a.width,height:"auto"});h.show("slow")},500)}}})},p={get:function(a){e.info("items:get");var b=a[0].selectize;b.clearOptions();b.load(function(d){var h=c.appRequests().getRequestOpts();h.url=f.updateItems;h.method="get";h.cache=!0;h.data={sk:a.data("sk"),itemType:a.data("item-type"),itemId:a.data("item-id")};c.appRequests().getActionCall(h,function(h){d(h.data);b.setValue(a.data("selected-id"),!0);c.appTriggers().updateFormHash()})})},update:function(a){e.info("items:update");
|
||||
var b=$("#"+a.data("item-dst"))[0].selectize;b.clearOptions();b.load(function(b){var d=c.appRequests().getRequestOpts();d.url=f.updateItems;d.method="get";d.data={sk:c.sk.get(),itemType:a.data("item-type")};c.appRequests().getActionCall(d,function(a){b(a.data)})})}},q={logout:function(){var a=window.location.search;c.redirect(0<a.length?"index.php"+a+"&logout=1":"index.php?logout=1")},login:function(a){e.info("main:login");var b=c.appRequests().getRequestOpts();b.url=f.main.login;b.method="get";b.data=
|
||||
a.serialize();c.appRequests().getActionCall(b,function(d){var b=$(".extra-hidden");switch(d.status){case 0:c.redirect(d.data.url);break;case 2:c.msg.out(d);a.find("input[type='text'],input[type='password']").val("");a.find("input:first").focus();0<b.length&&b.hide();$("#mpass").prop("disabled",!1).val("");$("#smpass").show();break;case 5:c.msg.out(d);a.find("input[type='text'],input[type='password']").val("");a.find("input:first").focus();0<b.length&&b.hide();$("#oldpass").prop("disabled",!1).val("");
|
||||
$("#soldpass").show();break;default:c.msg.out(d),a.find("input[type='text'],input[type='password']").val(""),a.find("input:first").focus()}})},install:function(a){e.info("main:install");var b=c.appRequests().getRequestOpts();b.url=f.main.install;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);0==a.status&&setTimeout(function(){c.redirect("index.php")},1E3)})},upgrade:function(a){e.info("main:upgrade");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[59]+"</p></div>";
|
||||
showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.main.task;b.data={source:a.find("input[name='lock']").val()};var d=c.appRequests().getActionEvent(b,function(a){var c=$("#taskStatus");a=a.task+" - "+a.message+" - "+a.time+" - "+a.progress+"%";c.empty().html(a)});b=c.appRequests().getRequestOpts();b.url=f.main.upgrade;b.method=
|
||||
"get";b.useFullLoading=!0;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0!==b.status?(d.close(),a.find(":input[name=h]").val("")):setTimeout(function(){c.redirect("index.php")},5E3)})}}})},getUpdates:function(a){e.info("main:getUpdates");a=c.appRequests().getRequestOpts();a.url=f.main.getUpdates;a.type="html";a.method="get";a.timeout=1E4;a.useLoading=!1;a.data={isAjax:1};c.appRequests().getActionCall(a,function(a){$("#updates").html(a);"undefined"!==typeof componentHandler&&
|
||||
componentHandler.upgradeDom()},function(){$("#updates").html("!")})}},r={save:function(a){e.info("config:save");var b=c.appRequests().getRequestOpts();b.url=f.config.save;b.data=a.serialize();"masterpass"===a.data("type")&&(b.useFullLoading=!0);c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&(void 0!==a.data("nextaction-id")?g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")}):void 0!==a.data("reload")&&setTimeout(function(){c.redirect("index.php")},2E3))})},masterpass:function(a){var b=
|
||||
'<div id="alert"><p id="alert-text">'+c.config().LANG[59]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(b){b.preventDefault();c.msg.error(c.config().LANG[44]);a.find(":input[type=password]").val("")}},positive:{title:c.config().LANG[43],onClick:function(c){r.save(a);a.find(":input[type=password]").val("")}}})},backup:function(a){e.info("config:backup");var b=c.appRequests().getRequestOpts();b.url=f.config["export"];b.method="post";b.useFullLoading=!0;b.data=
|
||||
a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},"export":function(a){e.info("config:export");var b=c.appRequests().getRequestOpts();b.url=f.config["export"];b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},"import":function(a){e.info("config:import");
|
||||
var b=c.appRequests().getRequestOpts();b.url=f.config["import"];b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},refreshMpass:function(a){e.info("config:import");var b=c.appRequests().getRequestOpts();b.url=f.config.save;b.data={actionId:a.data("action-id"),itemId:a.data("item-id"),sk:a.data("sk"),isAjax:1};c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}},
|
||||
m={show:function(a){e.info("account:show");g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},showHistory:function(a){e.info("account:showHistory");g({actionId:a.data("action-id"),itemId:a.val()},"account")},edit:function(a){e.info("account:edit");g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},"delete":function(a){e.info("account:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[3]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],
|
||||
onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.account.save;b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get()};c.appRequests().getActionCall(b,function(a){c.msg.out(a);m.search()})}}})},showpass:function(a){e.info("account:showpass");var b=a.data("parent-id"),d=c.appRequests().getRequestOpts();d.url=f.appMgmt.show;d.method="get";d.data={itemId:0==
|
||||
b?a.data("item-id"):b,actionId:a.data("action-id"),isHistory:a.data("history"),isLinked:0<b?1:0,isFull:1,sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(d,function(b){0!==b.status?c.msg.out(b):(b=$(b.data.html),l(a,b),b.on("mouseleave",function(){clearTimeout(k);k=setTimeout(function(){$.magnificPopup.close()},3E4)}).on("mouseenter",function(){0!==k&&clearTimeout(k)}))})},copypass:function(a){e.info("account:copypass");var b=a.data("parent-id"),d=c.appRequests().getRequestOpts();d.url=f.appMgmt.show;
|
||||
d.method="get";d.async=!1;d.data={itemId:0==b?a.data("item-id"):b,actionId:a.data("action-id"),isHistory:a.data("history"),isFull:0,sk:c.sk.get(),isAjax:1};a=c.appRequests().getActionCall(d);void 0!==a.responseJSON.csrf&&c.sk.set(a.responseJSON.csrf);return a},copy:function(a){e.info("account:copy");g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},savefavorite:function(a,b){e.info("account:saveFavorite");var d="on"===a.data("status"),h={actionId:d?a.data("action-id-off"):a.data("action-id-on"),
|
||||
itemId:a.data("item-id"),sk:c.sk.get(),isAjax:1},g=c.appRequests().getRequestOpts();g.url=f.account.saveFavorite;g.data=h;c.appRequests().getActionCall(g,function(h){c.msg.out(h);0===h.status&&(a.data("status",d?"off":"on"),"function"===typeof b&&b())})},request:function(a){e.info("account:request");var b=c.appRequests().getRequestOpts();b.url=f.account.request;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a)})},menu:function(a){a.hide();a.parent().children(".actions-optional").show(250)},
|
||||
sort:function(a){e.info("account:sort");var c=$("#frmSearch");c.find('input[name="skey"]').val(a.data("key"));c.find('input[name="sorder"]').val(a.data("dir"));c.find('input[name="start"]').val(a.data("start"));m.search()},editpass:function(a){e.info("account:editpass");var c=a.data("parent-id");g({actionId:a.data("action-id"),itemId:0==c?a.data("item-id"):c},"account")},restore:function(a){e.info("account:restore");m.save(a)},getfiles:function(a){e.info("account:getfiles");var b=c.appRequests().getRequestOpts();
|
||||
b.method="get";b.type="html";b.url=f.account.getFiles;b.data={id:a.data("item-id"),del:a.data("delete"),sk:c.sk.get()};c.appRequests().getActionCall(b,function(c){a.html(c)})},search:function(a){e.info("account:search");var b=$("#frmSearch");b.find("input[name='sk']").val(c.sk.get());b.find("input[name='skey']").val();b.find("input[name='sorder']").val();void 0!==a&&b.find("input[name='start']").val(0);a=c.appRequests().getRequestOpts();a.url=f.account.search;a.method="get";a.data=b.serialize();c.appRequests().getActionCall(a,
|
||||
function(a){10===a.status&&c.msg.out(a);c.sk.set(a.sk);$("#res-content").empty().html(a.html)})},save:function(a){e.info("account:save");var b=c.appRequests().getRequestOpts();b.url=f.account.save;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);void 0!==a.data.itemId&&void 0!==a.data.nextActionId&&g({actionId:a.data.nextActionId,itemId:a.data.itemId},"account")})}},n={refreshTab:!0,show:function(a){e.info("appMgmt:show");if(a.data("item-dst")||void 0===a.data("activetab"))e.info(a.data("activetab")),
|
||||
n.refreshTab=!1;var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.show;b.method="get";b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),activeTab:a.data("activetab"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==b.status?c.msg.out(b):l(a,b.data.html)})},"delete":function(a){e.info("appMgmt:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[12]+"</p></div>",d=a.data("selection"),h=[];if(d&&($(d).find(".is-selected").each(function(a,c){var b=
|
||||
$(this);h.push(b.data("item-id"))}),0===h.length))return;showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b.preventDefault();b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data={itemId:d?h:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){c.msg.out(b);a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),
|
||||
itemId:a.data("activetab")})})}}})},save:function(a){e.info("appMgmt:save");var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&(b=a.data("activetab"),!0===n.refreshTab&&void 0!==b&&g({actionId:a.data("nextaction-id"),itemId:b}),$.magnificPopup.close())})},search:function(a){e.info("appMgmt:search");var b=$(a.data("target")),d=c.appRequests().getRequestOpts();d.url=f.appMgmt.search;d.method="get";d.data=
|
||||
a.serialize();c.appRequests().getActionCall(d,function(a){0===a.status?b.html(a.data.html):b.html(c.msg.html.error(a.description));c.sk.set(a.csrf)})},nav:function(a){e.info("appMgmt:nav");var b=$("#"+a.data("action-form"));b.find("[name='start']").val(a.data("start"));b.find("[name='count']").val(a.data("count"));b.find("[name='sk']").val(c.sk.get());n.search(b)},ldapSync:function(a){e.info("appMgmt:ldapSync");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[57]+"</p></div>";showDialog({text:b,
|
||||
negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data={actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}}})}};return{doAction:g,appMgmt:n,account:m,file:{view:function(a){e.info("file:view");var b=c.appRequests().getRequestOpts();b.url=f.file;b.type="html";b.data=
|
||||
{fileId:a.data("item-id"),sk:c.sk.get(),actionId:a.data("action-id")};c.appRequests().getActionCall(b,function(b){void 0!==b.status&&1===b.status?c.msg.out(b):b?t(a,b):c.msg.error(c.config().LANG[14])})},download:function(a){e.info("file:download");a={fileId:a.data("item-id"),sk:c.sk.get(),actionId:a.data("action-id")};$.fileDownload(c.config().APP_ROOT+f.file,{httpMethod:"POST",data:a})},"delete":function(a){e.info("file:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[15]+"</p></div>";
|
||||
showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.file;b.data={fileId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get()};c.appRequests().getActionCall(b,function(a){c.msg.out(a);0===a.status&&(a=$("#list-account-files"),m.getfiles(a))})}}})}},checks:{ldap:function(a){e.info("checks:ldap");a=$(a.data("src"));a.find("[name='sk']").val(c.sk.get());
|
||||
var b=c.appRequests().getRequestOpts();b.url=f.checks;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);var b=$("#ldap-results");b.find(".list-wrap").html(c.appTheme().html.getList(a.data));b.show("slow")})},wiki:function(a){e.info("checks:wiki");a=$(a.data("src"));a.find("[name='sk']").val(c.sk.get());var b=c.appRequests().getRequestOpts();b.url=f.checks;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);0===a.status&&$("#dokuWikiResCheck").html(a.data)})}},
|
||||
config:r,main:q,user:{savePreferences:function(a){e.info("user:savePreferences");var b=c.appRequests().getRequestOpts();b.url=f.user.savePreferences;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);setTimeout(function(){c.redirect("index.php")},2E3)})},saveSecurity:function(a){e.info("user:saveSecurity");var b=c.appRequests().getRequestOpts();b.url=f.user.savePreferences;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);g({actionId:a.data("nextaction-id"),
|
||||
itemId:a.data("activetab")})})},password:function(a){e.info("user:password");var b=c.appRequests().getRequestOpts();b.type="html";b.method="get";b.url=f.user.password;b.data={actionId:a.data("action-id"),itemId:a.data("item-id"),sk:a.data("sk"),isAjax:1};c.appRequests().getActionCall(b,function(c){0===c.length?q.logout():l(a,c)})},passreset:function(a){e.info("user:passreset");var b=c.appRequests().getRequestOpts();b.url=f.user.passreset;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);
|
||||
0==a.status&&setTimeout(function(){c.redirect("index.php")},1E3)})}},link:{save:function(a){e.info("link:save");var b=c.appRequests().getRequestOpts();b.url=f.link;b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};var d='<div id="alert"><p id="alert-text">'+c.config().LANG[48]+"</p></div>";showDialog({text:d,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}},positive:{title:c.config().LANG[43],
|
||||
onClick:function(d){d.preventDefault();b.data.notify=1;c.appRequests().getActionCall(b,function(b){c.msg.out(b);g({actionId:a.data("nextaction-id"),itemId:a.data("item-id")})})}}})},refresh:function(a){e.info("link:refresh");var b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),activeTab:a.data("activetab")},d=c.appRequests().getRequestOpts();d.url=f.link;d.data=b;c.appRequests().getActionCall(d,function(b){c.msg.out(b);0===b.status&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})}},
|
||||
eventlog:{nav:function(a){if(void 0===a.data("start"))return!1;var b=c.appRequests().getRequestOpts();b.url=f.eventlog;b.method="get";b.type="html";b.data={actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1,start:a.data("start"),count:a.data("count"),current:a.data("current")};c.appRequests().getActionCall(b,function(a){$("#content").html(a);c.scrollUp()})},clear:function(a){var b='<div id="alert"><p id="alert-text">'+c.config().LANG[20]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],
|
||||
onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b.preventDefault();b=c.appRequests().getRequestOpts();b.url=f.eventlog;b.method="get";b.data={clear:1,sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){c.msg.out(b);0==b.status&&g({actionId:a.data("nextaction-id")})})}}})}},ajaxUrl:f,plugin:{toggle:function(a){e.info("plugin:enable");a={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),
|
||||
activeTab:a.data("activetab")};var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data=a;c.appRequests().getActionCall(b,function(a){c.msg.out(a);0===a.status&&setTimeout(function(){c.redirect("index.php")},2E3)})},reset:function(a){e.info("plugin:reset");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[58]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],
|
||||
onClick:function(b){b.preventDefault();b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),activeTab:a.data("activetab")};var d=c.appRequests().getRequestOpts();d.url=f.appMgmt.save;d.data=b;c.appRequests().getActionCall(d,function(a){c.msg.out(a)})}}})}},notice:{check:function(a){e.info("notice:check");var b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get()},d=c.appRequests().getRequestOpts();d.url=f.appMgmt.save;d.data=b;c.appRequests().getActionCall(d,function(b){c.msg.out(b);
|
||||
0===b.status&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},search:function(a){e.info("notice:search");var b=$(a.data("target")),d=c.appRequests().getRequestOpts();d.url=f.notice.search;d.method="get";d.data=a.serialize();c.appRequests().getActionCall(d,function(a){0===a.status?b.html(a.data.html):b.html(c.msg.html.error(a.description));c.sk.set(a.csrf)})},show:function(a){e.info("notice:show");var b=c.appRequests().getRequestOpts();b.url=f.notice.show;b.method="get";b.data=
|
||||
{itemId:a.data("item-id"),actionId:a.data("action-id"),activeTab:a.data("activetab"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==b.status?c.msg.out(b):l(a,b.data.html)})}},wiki:{show:function(a){e.info("wiki:show");var b=c.appRequests().getRequestOpts();b.url=f.wiki.show;b.method="get";b.data={pageName:a.data("pagename"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==b.status?c.msg.out(b):l(a,b.data.html)})}},items:p}};
|
||||
search:"/ajax/ajax_noticeSearch.php"}},g=function(a,b){var e={actionId:a.actionId,itemId:"undefined"!==a.itemId?a.itemId:0,isAjax:1},h=c.appRequests().getRequestOpts();h.url=f.doAction;h.method="get";h.type="html";h.addHistory=!0;h.data=e;c.appRequests().getActionCall(h,function(c){var a=$("#content");a.empty().html(c);c=sysPassApp.triggers().views;c.common(a);if(void 0!==b&&"function"===typeof c[b])c[b]();a=$(".mdl-layout__content");0<a.scrollTop()&&a.animate({scrollTop:0},1E3)})},l=function(a,b){$.magnificPopup.open({items:{src:b,
|
||||
type:"inline"},callbacks:{open:function(){var a=$("#box-popup");c.appTriggers().views.common(a);a.find(":input:text:visible:first").focus()},close:function(){a.data("item-dst")&&p.update(a)}},showCloseBtn:!1})},r=function(a,b){var e=$('<div id="box-popup" class="image">'+b+"</div>"),h=e.find("img");if(0===h.length)return l(a,b);h.hide();$.magnificPopup.open({items:{src:e,type:"inline"},callbacks:{open:function(){var a=this;h.on("click",function(){a.close()});setTimeout(function(){var a=c.resizeImage(h);
|
||||
e.css({backgroundColor:"#fff",width:a.width,height:"auto"});h.show("slow")},500)}}})},p={get:function(a){d.info("items:get");var b=a[0].selectize;b.clearOptions();b.load(function(e){var h=c.appRequests().getRequestOpts();h.url=f.updateItems;h.method="get";h.cache=!0;h.data={sk:a.data("sk"),itemType:a.data("item-type"),itemId:a.data("item-id")};c.appRequests().getActionCall(h,function(h){e(h.data);b.setValue(a.data("selected-id"),!0);c.appTriggers().updateFormHash()})})},update:function(a){d.info("items:update");
|
||||
var b=$("#"+a.data("item-dst"))[0].selectize;b.clearOptions();b.load(function(e){var b=c.appRequests().getRequestOpts();b.url=f.updateItems;b.method="get";b.data={sk:c.sk.get(),itemType:a.data("item-type")};c.appRequests().getActionCall(b,function(a){e(a.data)})})}},q={logout:function(){var a=window.location.search;c.redirect(0<a.length?"index.php"+a+"&logout=1":"index.php?logout=1")},login:function(a){d.info("main:login");var b=c.appRequests().getRequestOpts();b.url=f.main.login;b.method="get";b.data=
|
||||
a.serialize();c.appRequests().getActionCall(b,function(e){var b=$(".extra-hidden");switch(e.status){case 0:c.redirect(e.data.url);break;case 2:c.msg.out(e);a.find("input[type='text'],input[type='password']").val("");a.find("input:first").focus();0<b.length&&b.hide();$("#mpass").prop("disabled",!1).val("");$("#smpass").show();break;case 5:c.msg.out(e);a.find("input[type='text'],input[type='password']").val("");a.find("input:first").focus();0<b.length&&b.hide();$("#oldpass").prop("disabled",!1).val("");
|
||||
$("#soldpass").show();break;default:c.msg.out(e),a.find("input[type='text'],input[type='password']").val(""),a.find("input:first").focus()}})},install:function(a){d.info("main:install");var b=c.appRequests().getRequestOpts();b.url=f.main.install;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);0==a.status&&setTimeout(function(){c.redirect("index.php")},1E3)})},upgrade:function(a){d.info("main:upgrade");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[59]+"</p></div>";
|
||||
showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=a.find("input[name='useTask']");var e=$("#taskStatus");e.empty().html(c.config().LANG[62]);if(0<b.length&&1==b.val()){b=c.appRequests().getRequestOpts();b.url=f.main.task;b.data={source:a.find("input[name='lock']").val(),taskId:a.find("input[name='taskId']").val()};var d=c.appRequests().getActionEvent(b,function(a){a=
|
||||
a.task+" - "+a.message+" - "+a.time+" - "+a.progress+"%";a+="<br>"+c.config().LANG[62];e.empty().html(a)})}b=c.appRequests().getRequestOpts();b.url=f.main.upgrade;b.method="get";b.useFullLoading=!0;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0!==b.status?a.find(":input[name=h]").val(""):(void 0!==d&&d.close(),setTimeout(function(){c.redirect("index.php")},5E3))})}}})},getUpdates:function(a){d.info("main:getUpdates");a=c.appRequests().getRequestOpts();a.url=f.main.getUpdates;
|
||||
a.type="html";a.method="get";a.timeout=1E4;a.useLoading=!1;a.data={isAjax:1};c.appRequests().getActionCall(a,function(a){$("#updates").html(a);"undefined"!==typeof componentHandler&&componentHandler.upgradeDom()},function(){$("#updates").html("!")})}},m={show:function(a){d.info("account:show");g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},showHistory:function(a){d.info("account:showHistory");g({actionId:a.data("action-id"),itemId:a.val()},"account")},edit:function(a){d.info("account:edit");
|
||||
g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},"delete":function(a){d.info("account:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[3]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.account.save;b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get()};
|
||||
c.appRequests().getActionCall(b,function(a){c.msg.out(a);m.search()})}}})},showpass:function(a){d.info("account:showpass");var b=a.data("parent-id"),e=c.appRequests().getRequestOpts();e.url=f.appMgmt.show;e.method="get";e.data={itemId:0==b?a.data("item-id"):b,actionId:a.data("action-id"),isHistory:a.data("history"),isLinked:0<b?1:0,isFull:1,sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(e,function(b){0!==b.status?c.msg.out(b):(b=$(b.data.html),l(a,b),b.on("mouseleave",function(){clearTimeout(k);
|
||||
k=setTimeout(function(){$.magnificPopup.close()},3E4)}).on("mouseenter",function(){0!==k&&clearTimeout(k)}))})},copypass:function(a){d.info("account:copypass");var b=a.data("parent-id"),e=c.appRequests().getRequestOpts();e.url=f.appMgmt.show;e.method="get";e.async=!1;e.data={itemId:0==b?a.data("item-id"):b,actionId:a.data("action-id"),isHistory:a.data("history"),isFull:0,sk:c.sk.get(),isAjax:1};a=c.appRequests().getActionCall(e);void 0!==a.responseJSON.csrf&&c.sk.set(a.responseJSON.csrf);return a},
|
||||
copy:function(a){d.info("account:copy");g({actionId:a.data("action-id"),itemId:a.data("item-id")},"account")},savefavorite:function(a,b){d.info("account:saveFavorite");var e="on"===a.data("status"),h={actionId:e?a.data("action-id-off"):a.data("action-id-on"),itemId:a.data("item-id"),sk:c.sk.get(),isAjax:1},g=c.appRequests().getRequestOpts();g.url=f.account.saveFavorite;g.data=h;c.appRequests().getActionCall(g,function(h){c.msg.out(h);0===h.status&&(a.data("status",e?"off":"on"),"function"===typeof b&&
|
||||
b())})},request:function(a){d.info("account:request");var b=c.appRequests().getRequestOpts();b.url=f.account.request;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a)})},menu:function(a){a.hide();a.parent().children(".actions-optional").show(250)},sort:function(a){d.info("account:sort");var c=$("#frmSearch");c.find('input[name="skey"]').val(a.data("key"));c.find('input[name="sorder"]').val(a.data("dir"));c.find('input[name="start"]').val(a.data("start"));m.search()},editpass:function(a){d.info("account:editpass");
|
||||
var c=a.data("parent-id");g({actionId:a.data("action-id"),itemId:0==c?a.data("item-id"):c},"account")},restore:function(a){d.info("account:restore");m.save(a)},getfiles:function(a){d.info("account:getfiles");var b=c.appRequests().getRequestOpts();b.method="get";b.type="html";b.url=f.account.getFiles;b.data={id:a.data("item-id"),del:a.data("delete"),sk:c.sk.get()};c.appRequests().getActionCall(b,function(c){a.html(c)})},search:function(a){d.info("account:search");var b=$("#frmSearch");b.find("input[name='sk']").val(c.sk.get());
|
||||
b.find("input[name='skey']").val();b.find("input[name='sorder']").val();void 0!==a&&b.find("input[name='start']").val(0);a=c.appRequests().getRequestOpts();a.url=f.account.search;a.method="get";a.data=b.serialize();c.appRequests().getActionCall(a,function(a){10===a.status&&c.msg.out(a);c.sk.set(a.sk);$("#res-content").empty().html(a.html)})},save:function(a){d.info("account:save");var b=c.appRequests().getRequestOpts();b.url=f.account.save;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);
|
||||
void 0!==a.data.itemId&&void 0!==a.data.nextActionId&&g({actionId:a.data.nextActionId,itemId:a.data.itemId},"account")})}},n={refreshTab:!0,show:function(a){d.info("appMgmt:show");if(a.data("item-dst")||void 0===a.data("activetab"))d.info(a.data("activetab")),n.refreshTab=!1;var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.show;b.method="get";b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),activeTab:a.data("activetab"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==
|
||||
b.status?c.msg.out(b):l(a,b.data.html)})},"delete":function(a){d.info("appMgmt:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[12]+"</p></div>",e=a.data("selection"),h=[];if(e&&($(e).find(".is-selected").each(function(a,c){var b=$(this);h.push(b.data("item-id"))}),0===h.length))return;showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b.preventDefault();
|
||||
b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data={itemId:e?h:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){c.msg.out(b);a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})}}})},save:function(a){d.info("appMgmt:save");var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&(b=a.data("activetab"),
|
||||
!0===n.refreshTab&&void 0!==b&&g({actionId:a.data("nextaction-id"),itemId:b}),$.magnificPopup.close())})},search:function(a){d.info("appMgmt:search");var b=$(a.data("target")),e=c.appRequests().getRequestOpts();e.url=f.appMgmt.search;e.method="get";e.data=a.serialize();c.appRequests().getActionCall(e,function(a){0===a.status?b.html(a.data.html):b.html(c.msg.html.error(a.description));c.sk.set(a.csrf)})},nav:function(a){d.info("appMgmt:nav");var b=$("#"+a.data("action-form"));b.find("[name='start']").val(a.data("start"));
|
||||
b.find("[name='count']").val(a.data("count"));b.find("[name='sk']").val(c.sk.get());n.search(b)},ldapSync:function(a){d.info("appMgmt:ldapSync");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[57]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data={actionId:a.data("action-id"),sk:c.sk.get(),
|
||||
isAjax:1};c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}}})}};return{doAction:g,appMgmt:n,account:m,file:{view:function(a){d.info("file:view");var b=c.appRequests().getRequestOpts();b.url=f.file;b.type="html";b.data={fileId:a.data("item-id"),sk:c.sk.get(),actionId:a.data("action-id")};c.appRequests().getActionCall(b,function(b){void 0!==b.status&&1===b.status?c.msg.out(b):b?r(a,b):c.msg.error(c.config().LANG[14])})},download:function(a){d.info("file:download");a={fileId:a.data("item-id"),
|
||||
sk:c.sk.get(),actionId:a.data("action-id")};$.fileDownload(c.config().APP_ROOT+f.file,{httpMethod:"POST",data:a})},"delete":function(a){d.info("file:delete");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[15]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b=c.appRequests().getRequestOpts();b.url=f.file;b.data={fileId:a.data("item-id"),
|
||||
actionId:a.data("action-id"),sk:c.sk.get()};c.appRequests().getActionCall(b,function(a){c.msg.out(a);0===a.status&&(a=$("#list-account-files"),m.getfiles(a))})}}})}},checks:{ldap:function(a){d.info("checks:ldap");a=$(a.data("src"));a.find("[name='sk']").val(c.sk.get());var b=c.appRequests().getRequestOpts();b.url=f.checks;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);var b=$("#ldap-results");b.find(".list-wrap").html(c.appTheme().html.getList(a.data));b.show("slow")})},
|
||||
wiki:function(a){d.info("checks:wiki");a=$(a.data("src"));a.find("[name='sk']").val(c.sk.get());var b=c.appRequests().getRequestOpts();b.url=f.checks;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);0===a.status&&$("#dokuWikiResCheck").html(a.data)})}},config:{save:function(a){d.info("config:save");var b=c.appRequests().getRequestOpts();b.url=f.config.save;b.data=a.serialize();"masterpass"===a.data("type")&&(b.useFullLoading=!0);c.appRequests().getActionCall(b,function(b){c.msg.out(b);
|
||||
0===b.status&&(void 0!==a.data("nextaction-id")?g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")}):void 0!==a.data("reload")&&setTimeout(function(){c.redirect("index.php")},2E3))})},masterpass:function(a){var b='<div id="alert"><p id="alert-text">'+c.config().LANG[59]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(b){b.preventDefault();c.msg.error(c.config().LANG[44]);a.find(":input[type=password]").val("")}},positive:{title:c.config().LANG[43],
|
||||
onClick:function(b){b=a.find("input[name='useTask']");var e=$("#taskStatus");e.empty().html(c.config().LANG[62]);if(0<b.length&&1==b.val()){b=c.appRequests().getRequestOpts();b.url=f.main.task;b.data={source:a.find("input[name='lock']").val(),taskId:a.find("input[name='taskId']").val()};var d=c.appRequests().getActionEvent(b,function(a){a=a.task+" - "+a.message+" - "+a.time+" - "+a.progress+"%";a+="<br>"+c.config().LANG[62];e.empty().html(a)})}b=c.appRequests().getRequestOpts();b.url=f.config.save;
|
||||
b.useFullLoading=!0;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);a.find(":input[type=password]").val("");void 0!==d&&d.close()})}}})},backup:function(a){d.info("config:backup");var b=c.appRequests().getRequestOpts();b.url=f.config["export"];b.method="post";b.useFullLoading=!0;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},
|
||||
"export":function(a){d.info("config:export");var b=c.appRequests().getRequestOpts();b.url=f.config["export"];b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},"import":function(a){d.info("config:import");var b=c.appRequests().getRequestOpts();b.url=f.config["import"];b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);0===b.status&&
|
||||
void 0!==a.data("nextaction-id")&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},refreshMpass:function(a){d.info("config:import");var b=c.appRequests().getRequestOpts();b.url=f.config.save;b.data={actionId:a.data("action-id"),itemId:a.data("item-id"),sk:a.data("sk"),isAjax:1};c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}},main:q,user:{savePreferences:function(a){d.info("user:savePreferences");var b=c.appRequests().getRequestOpts();b.url=f.user.savePreferences;b.data=
|
||||
a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);setTimeout(function(){c.redirect("index.php")},2E3)})},saveSecurity:function(a){d.info("user:saveSecurity");var b=c.appRequests().getRequestOpts();b.url=f.user.savePreferences;b.data=a.serialize();c.appRequests().getActionCall(b,function(b){c.msg.out(b);g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},password:function(a){d.info("user:password");var b=c.appRequests().getRequestOpts();b.type="html";b.method="get";
|
||||
b.url=f.user.password;b.data={actionId:a.data("action-id"),itemId:a.data("item-id"),sk:a.data("sk"),isAjax:1};c.appRequests().getActionCall(b,function(b){0===b.length?q.logout():l(a,b)})},passreset:function(a){d.info("user:passreset");var b=c.appRequests().getRequestOpts();b.url=f.user.passreset;b.data=a.serialize();c.appRequests().getActionCall(b,function(a){c.msg.out(a);0==a.status&&setTimeout(function(){c.redirect("index.php")},1E3)})}},link:{save:function(a){d.info("link:save");var b=c.appRequests().getRequestOpts();
|
||||
b.url=f.link;b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};var e='<div id="alert"><p id="alert-text">'+c.config().LANG[48]+"</p></div>";showDialog({text:e,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.appRequests().getActionCall(b,function(a){c.msg.out(a)})}},positive:{title:c.config().LANG[43],onClick:function(e){e.preventDefault();b.data.notify=1;c.appRequests().getActionCall(b,function(b){c.msg.out(b);g({actionId:a.data("nextaction-id"),
|
||||
itemId:a.data("item-id")})})}}})},refresh:function(a){d.info("link:refresh");var b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),activeTab:a.data("activetab")},e=c.appRequests().getRequestOpts();e.url=f.link;e.data=b;c.appRequests().getActionCall(e,function(b){c.msg.out(b);0===b.status&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})}},eventlog:{nav:function(a){if(void 0===a.data("start"))return!1;var b=c.appRequests().getRequestOpts();b.url=f.eventlog;b.method=
|
||||
"get";b.type="html";b.data={actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1,start:a.data("start"),count:a.data("count"),current:a.data("current")};c.appRequests().getActionCall(b,function(a){$("#content").html(a);c.scrollUp()})},clear:function(a){var b='<div id="alert"><p id="alert-text">'+c.config().LANG[20]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b.preventDefault();
|
||||
b=c.appRequests().getRequestOpts();b.url=f.eventlog;b.method="get";b.data={clear:1,sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){c.msg.out(b);0==b.status&&g({actionId:a.data("nextaction-id")})})}}})}},ajaxUrl:f,plugin:{toggle:function(a){d.info("plugin:enable");a={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),activeTab:a.data("activetab")};var b=c.appRequests().getRequestOpts();b.url=f.appMgmt.save;b.data=a;c.appRequests().getActionCall(b,function(a){c.msg.out(a);
|
||||
0===a.status&&setTimeout(function(){c.redirect("index.php")},2E3)})},reset:function(a){d.info("plugin:reset");var b='<div id="alert"><p id="alert-text">'+c.config().LANG[58]+"</p></div>";showDialog({text:b,negative:{title:c.config().LANG[44],onClick:function(a){a.preventDefault();c.msg.error(c.config().LANG[44])}},positive:{title:c.config().LANG[43],onClick:function(b){b.preventDefault();b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get(),activeTab:a.data("activetab")};var e=c.appRequests().getRequestOpts();
|
||||
e.url=f.appMgmt.save;e.data=b;c.appRequests().getActionCall(e,function(a){c.msg.out(a)})}}})}},notice:{check:function(a){d.info("notice:check");var b={itemId:a.data("item-id"),actionId:a.data("action-id"),sk:c.sk.get()},e=c.appRequests().getRequestOpts();e.url=f.appMgmt.save;e.data=b;c.appRequests().getActionCall(e,function(b){c.msg.out(b);0===b.status&&g({actionId:a.data("nextaction-id"),itemId:a.data("activetab")})})},search:function(a){d.info("notice:search");var b=$(a.data("target")),e=c.appRequests().getRequestOpts();
|
||||
e.url=f.notice.search;e.method="get";e.data=a.serialize();c.appRequests().getActionCall(e,function(a){0===a.status?b.html(a.data.html):b.html(c.msg.html.error(a.description));c.sk.set(a.csrf)})},show:function(a){d.info("notice:show");var b=c.appRequests().getRequestOpts();b.url=f.notice.show;b.method="get";b.data={itemId:a.data("item-id"),actionId:a.data("action-id"),activeTab:a.data("activetab"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==b.status?c.msg.out(b):l(a,b.data.html)})}},
|
||||
wiki:{show:function(a){d.info("wiki:show");var b=c.appRequests().getRequestOpts();b.url=f.wiki.show;b.method="get";b.data={pageName:a.data("pagename"),actionId:a.data("action-id"),sk:c.sk.get(),isAjax:1};c.appRequests().getActionCall(b,function(b){0!==b.status?c.msg.out(b):l(a,b.data.html)})}},items:p}};
|
||||
|
||||
2
js/app-requests.min.js
vendored
2
js/app-requests.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
var $jscomp={scope:{},checkStringArgs:function(b,d,c){if(null==b)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(d instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return b+""}};
|
||||
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,d,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[d]=c.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,d,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[d]=c.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.polyfill=function(b,d,c,e){if(d){c=$jscomp.global;b=b.split(".");for(e=0;e<b.length-1;e++){var a=b[e];a in c||(c[a]={});c=c[a]}b=b[b.length-1];e=c[b];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(c,b,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.polyfill("String.prototype.startsWith",function(b){return b?b:function(b,c){var d=$jscomp.checkStringArgs(this,b,"startsWith");b+="";for(var a=d.length,h=b.length,g=Math.max(0,Math.min(c|0,d.length)),f=0;f<h&&g<a;)if(d[g++]!=b[f++])return!1;return f>=h}},"es6-impl","es3");
|
||||
sysPass.Requests=function(b){var d=b.log,c=[],e={get:function(){return c},add:function(a){var b=""===a.hash?SparkMD5.hash(JSON.stringify(a),!1):a.hash;if(0<c.length&&c[c.length-1].hash===b)return c;d.info("history:add");a.hash=b;c.push(a);15<=c.length&&c.splice(0,10);return c},del:function(){d.info("history:del");if("undefined"!==typeof c.pop())return c[c.length-1]},reset:function(){d.info("history:reset");c=[]},length:function(){return c.length}};return{getRequestOpts:function(){return Object.create({type:"json",
|
||||
|
||||
@@ -83,5 +83,6 @@ $stringsJsLang = [
|
||||
58 => __('Esta acción restablecerá todos los datos del plugin. Desea continuar?'),
|
||||
59 => __('Este proceso puede durar algo de tiempo. Desea continuar?'),
|
||||
60 => __('Aviso'),
|
||||
61 => __('Sesión finalizada')
|
||||
61 => __('Sesión finalizada'),
|
||||
62 => __('Realizando tarea. Por favor, no cierre la ventana/pestaña del navegador.')
|
||||
];
|
||||
Reference in New Issue
Block a user