mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-11 10:56:58 +01:00
* [MOD] Improved bootstrapping. Work in progress.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Crypt\Vault;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Language;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\Controller;
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
@@ -40,6 +40,8 @@ use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Providers\Auth\Browser\Browser;
|
||||
use SP\Services\Auth\AuthException;
|
||||
use SP\Services\User\UserLoginResponse;
|
||||
use SP\Util\Checks;
|
||||
use SP\Util\Json;
|
||||
@@ -168,7 +170,7 @@ abstract class ControllerBase
|
||||
$this->userData = $this->session->getUserData();
|
||||
$this->userProfileData = $this->session->getUserProfile();
|
||||
|
||||
$this->view->assign('timeStart', $_SERVER['REQUEST_TIME_FLOAT']);
|
||||
$this->view->assign('timeStart', $this->router->request()->server()->get('REQUEST_TIME_FLOAT'));
|
||||
$this->view->assign('icons', $this->icons);
|
||||
$this->view->assign('SessionUserData', $this->userData);
|
||||
$this->view->assign('queryTimeStart', microtime());
|
||||
@@ -219,16 +221,33 @@ abstract class ControllerBase
|
||||
|
||||
$this->view->addTemplate('debug', 'common');
|
||||
|
||||
$this->view->assign('time', getElapsedTime());
|
||||
$this->view->assign('time', getElapsedTime($this->router->request()->server()->get('REQUEST_TIME_FLOAT')));
|
||||
$this->view->assign('memInit', $memInit / 1000);
|
||||
$this->view->assign('memEnd', memory_get_usage() / 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si el usuario está logado.
|
||||
*
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
* @throws AuthException
|
||||
*/
|
||||
public function checkLoggedIn()
|
||||
{
|
||||
if ($this->session->isLoggedIn()
|
||||
&& $this->session->getAuthCompleted() === true
|
||||
) {
|
||||
$browser = $this->dic->get(Browser::class);
|
||||
|
||||
// Comprobar si se ha identificado mediante el servidor web y el usuario coincide
|
||||
if ($browser->checkServerAuthUser($this->session->getUserData()->getLogin()) === false
|
||||
&& $browser->checkServerAuthUser($this->session->getUserData()->getSsoLogin()) === false
|
||||
) {
|
||||
throw new AuthException('Invalid browser auth');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->session->isLoggedIn()) {
|
||||
if (Checks::isJson()) {
|
||||
$jsonResponse = new JsonResponse();
|
||||
@@ -242,15 +261,6 @@ abstract class ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $loggedIn
|
||||
*/
|
||||
protected function setLoggedIn($loggedIn)
|
||||
{
|
||||
$this->loggedIn = (bool)$loggedIn;
|
||||
$this->view->assign('loggedIn', $this->loggedIn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si está permitido el acceso al módulo/página.
|
||||
*
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Http\Response;
|
||||
use SP\Modules\Web\Controllers\Helpers\LayoutHelper;
|
||||
use SP\Util\Util;
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Install\Installer;
|
||||
use SP\Core\Language;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Html\Html;
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace SP\Modules\Web\Controllers;
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Account\AccountUtil;
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\DiFactory;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Http\Request;
|
||||
use SP\Modules\Web\Controllers\Helpers\LayoutHelper;
|
||||
use SP\Util\ErrorUtil;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use SP\Controller\ControllerBase;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
*/
|
||||
function debugLog($data, $printLastCaller = false)
|
||||
{
|
||||
$useOwn = true;
|
||||
$line = date('Y-m-d H:i:s') . ' - ' . print_r($data, true) . PHP_EOL;
|
||||
$useOwn = (!defined('LOG_FILE')
|
||||
|| !error_log($line, 3, LOG_FILE)
|
||||
);
|
||||
|
||||
if (!defined('LOG_FILE') || !error_log($line, 3, LOG_FILE)) {
|
||||
$useOwn = false;
|
||||
if ($useOwn === false) {
|
||||
error_log(print_r($data, true));
|
||||
}
|
||||
|
||||
@@ -119,11 +120,12 @@ function mb_ucfirst($string)
|
||||
* Devuelve el tiempo actual en coma flotante.
|
||||
* Esta función se utiliza para calcular el tiempo de renderizado con coma flotante
|
||||
*
|
||||
* @param float $from
|
||||
* @returns float con el tiempo actual
|
||||
*/
|
||||
function getElapsedTime()
|
||||
function getElapsedTime($from)
|
||||
{
|
||||
return microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
|
||||
return microtime(true) - (float)$from;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +166,7 @@ function nDirname($dir, $levels)
|
||||
|
||||
/**
|
||||
* @param Exception $exception
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
function flattenExceptionBacktrace(\Exception $exception)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,6 @@ use SP\Core\Plugin\PluginUtil;
|
||||
use SP\Core\Session\Session;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Traits\InjectableTrait;
|
||||
use SP\Core\UI\Theme;
|
||||
use SP\Core\Upgrade\Upgrade;
|
||||
use SP\Http\JsonResponse;
|
||||
@@ -53,7 +52,6 @@ use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
use SP\Modules\Web\Controllers\MainController;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Providers\Auth\Browser\Browser;
|
||||
use SP\Storage\Database;
|
||||
use SP\Storage\DBUtil;
|
||||
use SP\Util\Checks;
|
||||
@@ -70,8 +68,6 @@ defined('APP_ROOT') || die();
|
||||
*/
|
||||
class Bootstrap
|
||||
{
|
||||
use InjectableTrait;
|
||||
|
||||
/**
|
||||
* Partial initialized controllers
|
||||
*/
|
||||
@@ -146,13 +142,20 @@ class Bootstrap
|
||||
* Bootstrap constructor.
|
||||
*
|
||||
* @param Container $container
|
||||
* @throws Core\Dic\ContainerException
|
||||
* @throws \DI\DependencyException
|
||||
* @throws \DI\NotFoundException
|
||||
*/
|
||||
private final function __construct(Container $container)
|
||||
{
|
||||
self::$container = $container;
|
||||
|
||||
$this->injectDependencies();
|
||||
$this->config = $container->get(Config::class);
|
||||
$this->configData = $this->config->getConfigData();
|
||||
$this->session = $container->get(Session::class);
|
||||
$this->theme = $container->get(Theme::class);
|
||||
$this->router = $container->get(Klein::class);
|
||||
$this->language = $container->get(Language::class);
|
||||
$this->upgrade = $container->get(Upgrade::class);
|
||||
|
||||
$this->initRouter();
|
||||
}
|
||||
@@ -211,7 +214,11 @@ class Bootstrap
|
||||
throw new RuntimeException($oops);
|
||||
}
|
||||
|
||||
$self->initialize(in_array($controller, self::PARTIAL_INIT, true));
|
||||
$self->initializeCommon();
|
||||
|
||||
if (in_array($controller, self::PARTIAL_INIT, true)) {
|
||||
$self->initializeApp();
|
||||
}
|
||||
|
||||
debugLog('Routing call: ' . $controllerClass . '::' . $method . '::' . print_r($params, true));
|
||||
|
||||
@@ -234,18 +241,13 @@ class Bootstrap
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializar la aplicación
|
||||
*
|
||||
* @param bool $isPartial Do not perform a full initialization
|
||||
* @throws ConfigException
|
||||
* @throws InitializationException
|
||||
* @throws SPException
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
protected function initialize($isPartial = false)
|
||||
protected function initializeCommon()
|
||||
{
|
||||
debugLog('Initializing...');
|
||||
debugLog(__FUNCTION__);
|
||||
|
||||
self::$checkPhpVersion = Checks::checkPhpVersion();
|
||||
|
||||
@@ -303,48 +305,6 @@ class Bootstrap
|
||||
|
||||
// Comprobar si es necesario cambiar a HTTPS
|
||||
HttpUtil::checkHttps();
|
||||
|
||||
if ($isPartial === false) {
|
||||
|
||||
// Comprobar si está instalado
|
||||
$this->checkInstalled();
|
||||
|
||||
// Comprobar si el modo mantenimiento está activado
|
||||
$this->checkMaintenanceMode();
|
||||
|
||||
try {
|
||||
// Comprobar si la Base de datos existe
|
||||
DBUtil::checkDatabaseExist(self::$container->get(Database::class)->getDbHandler(), $this->configData->getDbName());
|
||||
} catch (\Exception $e) {
|
||||
if ($e->getCode() === 1049) {
|
||||
$this->router->response()->redirect('index.php?r=install/index')->send();
|
||||
}
|
||||
}
|
||||
|
||||
// Comprobar si es necesario actualizar componentes
|
||||
// $this->checkUpgrade();
|
||||
|
||||
// Inicializar la sesión
|
||||
$this->initUserSession();
|
||||
|
||||
// Cargar los plugins
|
||||
PluginUtil::loadPlugins();
|
||||
|
||||
// Comprobar acciones en URL
|
||||
// $this->checkPreLoginActions();
|
||||
|
||||
if ($this->session->isLoggedIn() && $this->session->getAuthCompleted() === true) {
|
||||
$browser = new Browser();
|
||||
|
||||
// Comprobar si se ha identificado mediante el servidor web y el usuario coincide
|
||||
if ($browser->checkServerAuthUser($this->session->getUserData()->getLogin()) === false
|
||||
&& $browser->checkServerAuthUser($this->session->getUserData()->getSsoLogin()) === false
|
||||
) {
|
||||
throw new InitializationException('Logout');
|
||||
// $this->goLogout();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -506,6 +466,46 @@ class Bootstrap
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializar la aplicación
|
||||
*
|
||||
* @throws InitializationException
|
||||
* @throws SPException
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
protected function initializeApp()
|
||||
{
|
||||
debugLog(__FUNCTION__);
|
||||
|
||||
// Comprobar si está instalado
|
||||
$this->checkInstalled();
|
||||
|
||||
// Comprobar si el modo mantenimiento está activado
|
||||
$this->checkMaintenanceMode();
|
||||
|
||||
try {
|
||||
// Comprobar si la Base de datos existe
|
||||
DBUtil::checkDatabaseExist(self::$container->get(Database::class)->getDbHandler(), $this->configData->getDbName());
|
||||
} catch (\Exception $e) {
|
||||
if ($e->getCode() === 1049) {
|
||||
$this->router->response()->redirect('index.php?r=install/index')->send();
|
||||
}
|
||||
}
|
||||
|
||||
// Comprobar si es necesario actualizar componentes
|
||||
// $this->checkUpgrade();
|
||||
|
||||
// Inicializar la sesión
|
||||
$this->initUserSession();
|
||||
|
||||
// Cargar los plugins
|
||||
PluginUtil::loadPlugins();
|
||||
|
||||
// Comprobar acciones en URL
|
||||
// $this->checkPreLoginActions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprueba que la aplicación esté instalada
|
||||
* Esta función comprueba si la aplicación está instalada. Si no lo está, redirige al instalador.
|
||||
@@ -726,31 +726,6 @@ class Bootstrap
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Config $config
|
||||
* @param Upgrade $upgrade
|
||||
* @param Session $session
|
||||
* @param Theme $theme
|
||||
* @param Klein $router
|
||||
* @param Language $language
|
||||
*/
|
||||
public function inject(Config $config,
|
||||
Upgrade $upgrade,
|
||||
Session $session,
|
||||
Theme $theme,
|
||||
Klein $router,
|
||||
Language $language
|
||||
)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->configData = $config->getConfigData();
|
||||
$this->upgrade = $upgrade;
|
||||
$this->session = $session;
|
||||
$this->theme = $theme;
|
||||
$this->router = $router;
|
||||
$this->language = $language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si hay que ejecutar acciones de URL antes de presentar la pantalla de login.
|
||||
*
|
||||
|
||||
@@ -132,7 +132,7 @@ class Config
|
||||
$configData = $this->session->getConfig();
|
||||
|
||||
if ($reload === true
|
||||
|| null === $configData
|
||||
|| $configData === null
|
||||
|| time() >= ($this->session->getConfigTime() + $configData->getSessionTimeout() / 2)
|
||||
) {
|
||||
$this->saveConfigInSession();
|
||||
|
||||
@@ -37,7 +37,6 @@ use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Init;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\DataModel\CustomFieldData;
|
||||
use SP\DataModel\PublicLinkData;
|
||||
@@ -50,6 +49,8 @@ use SP\Mgmt\PublicLinks\PublicLink;
|
||||
use SP\Mgmt\Tags\Tag;
|
||||
use SP\Mgmt\Users\UserPass;
|
||||
use SP\Mgmt\Users\UserUtil;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Util\ImageUtil;
|
||||
use SP\Util\Json;
|
||||
|
||||
|
||||
@@ -27,13 +27,11 @@ namespace SP\Controller;
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Account\AccountSearchFilter;
|
||||
use SP\Services\Account\AccountSearchService;
|
||||
use SP\Account\AccountSearchItem;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Html\DataGrid\DataGrid;
|
||||
use SP\Html\DataGrid\DataGridAction;
|
||||
use SP\Html\DataGrid\DataGridActionSearch;
|
||||
@@ -46,6 +44,9 @@ use SP\Http\Request;
|
||||
use SP\Mgmt\Categories\Category;
|
||||
use SP\Mgmt\Customers\Customer;
|
||||
use SP\Mgmt\Tags\Tag;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Services\Account\AccountSearchService;
|
||||
|
||||
/**
|
||||
* Clase encargada de obtener los datos para presentar la búsqueda
|
||||
|
||||
@@ -27,23 +27,21 @@ namespace SP\Controller;
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Account\AccountUtil;
|
||||
use SP\Config\Config;
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Config\ConfigDB;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Crypt\CryptSessionHandler;
|
||||
use SP\Core\CryptMasterPass;
|
||||
use SP\Core\DiFactory;
|
||||
use SP\Core\Init;
|
||||
use SP\Core\Language;
|
||||
use SP\Core\Plugin\PluginUtil;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Task;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Mgmt\Groups\Group;
|
||||
use SP\Mgmt\Profiles\Profile;
|
||||
use SP\Mgmt\Users\User;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Storage\DBUtil;
|
||||
use SP\Util\Checks;
|
||||
use SP\Util\Util;
|
||||
|
||||
@@ -28,14 +28,14 @@ defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Html\DataGrid\DataGridActionSearch;
|
||||
use SP\Html\DataGrid\DataGridActionType;
|
||||
use SP\Html\DataGrid\DataGridPager;
|
||||
use SP\Http\Request;
|
||||
use SP\Http\Response;
|
||||
use SP\Log\Log;
|
||||
use SP\Util\Checks;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
|
||||
/**
|
||||
* Clase encargada de preparar la presentación del registro de eventos
|
||||
|
||||
@@ -35,6 +35,7 @@ defined('APP_ROOT') || die();
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Html\DataGrid\DataGridPagerInterface;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
|
||||
/**
|
||||
* Class GridItemsSearch para construcción de clases que usen el Grid de búsqueda de registros
|
||||
|
||||
@@ -29,7 +29,7 @@ defined('APP_ROOT') || die();
|
||||
use SP\Controller\Grids\Items;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Template;
|
||||
use SP\Util\Checks;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
|
||||
/**
|
||||
* Class GridTabController para la construcción de clases que utilicen el grid de pestañas
|
||||
|
||||
@@ -36,17 +36,16 @@ use SP\Core\Exceptions\ItemException;
|
||||
use SP\Core\Plugin\PluginUtil;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\DataModel\AuthTokenData;
|
||||
use SP\DataModel\CategoryData;
|
||||
use SP\DataModel\ClientData;
|
||||
use SP\DataModel\CustomFieldData;
|
||||
use SP\DataModel\CustomFieldDefinitionData;
|
||||
use SP\DataModel\UserGroupData;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\DataModel\TagData;
|
||||
use SP\DataModel\UserData;
|
||||
use SP\DataModel\UserGroupData;
|
||||
use SP\Http\Request;
|
||||
use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
@@ -68,6 +67,8 @@ use SP\Mgmt\Tags\Tag;
|
||||
use SP\Mgmt\Users\User;
|
||||
use SP\Mgmt\Users\UserPass;
|
||||
use SP\Mgmt\Users\UserUtil;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Util\ImageUtil;
|
||||
use SP\Util\Json;
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\DataModel\NoticeData;
|
||||
use SP\Mgmt\Notices\Notice;
|
||||
use SP\Mgmt\Users\User;
|
||||
use SP\Util\Checks;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Util\Json;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
namespace SP\Controller;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,14 +26,13 @@ namespace SP\Controller;
|
||||
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Config\Config;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\SessionFactory;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\Core\Template;
|
||||
use SP\Http\Request;
|
||||
use SP\Util\Checks;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Util\Json;
|
||||
use SP\Util\Wiki\DokuWikiApi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user