Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -89,6 +89,12 @@ class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
$keywords[ $word['url'] ]['keywords'][] = $word['keyword'];
|
||||
}
|
||||
|
||||
/* Make sure the keywords are unique */
|
||||
foreach( $keywords as $url => $entry )
|
||||
{
|
||||
$keywords[ $url ]['keywords'] = array_unique( $entry['keywords'] );
|
||||
}
|
||||
|
||||
\file_put_contents( \IPS\ROOT_PATH . "/applications/{$qs['app']}/data/acpsearch.json", json_encode( $keywords, version_compare( PHP_VERSION, '5.4.0' ) >= 0 ? JSON_PRETTY_PRINT : 0 ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -28,40 +28,49 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
{
|
||||
/* Init login class */
|
||||
$url = \IPS\Http\Url::internal( "app=core&module=system&controller=login", 'admin', NULL, array(), \IPS\Settings::i()->logins_over_https );
|
||||
$url = \IPS\Http\Url::internal( "app=core&module=system&controller=login", 'admin' );
|
||||
if ( isset( \IPS\Request::i()->ref ) )
|
||||
{
|
||||
$url = $url->setQueryString( 'ref', \IPS\Request::i()->ref );
|
||||
}
|
||||
$login = new \IPS\Login( $url );
|
||||
$login->flagOptions = FALSE;
|
||||
$login = new \IPS\Login( $url, \IPS\Login::LOGIN_ACP );
|
||||
|
||||
/* Set the default tab */
|
||||
$forms = $login->forms( TRUE, ( \IPS\Request::i()->ref ?: TRUE ) );
|
||||
|
||||
$this->activeTab = \IPS\Request::i()->tab ?: key($forms);
|
||||
|
||||
/* Process */
|
||||
/* Authenticate */
|
||||
$error = NULL;
|
||||
try
|
||||
{
|
||||
/* Authenticate */
|
||||
$member = $login->authenticate();
|
||||
if ( $member !== NULL and $member->member_id )
|
||||
/* If we were successful... */
|
||||
if ( $success = $login->authenticate() )
|
||||
{
|
||||
/* Success */
|
||||
if ( $member->isAdmin() )
|
||||
/* Check we can actually access the ACP */
|
||||
if ( $success->member->isAdmin() )
|
||||
{
|
||||
$this->_doLogin( $member );
|
||||
/* If we need to do two-factor authentication, do that */
|
||||
if ( $success->mfa( 'AuthenticateAdmin' ) )
|
||||
{
|
||||
$_SESSION['processing2FA'] = array( 'memberId' => $success->member->member_id );
|
||||
|
||||
$url = \IPS\Http\Url::internal( 'app=core&module=system&controller=login&do=mfa', 'admin', 'login' );
|
||||
if ( isset( \IPS\Request::i()->ref ) )
|
||||
{
|
||||
$url = $url->setQueryString( 'ref', \IPS\Request::i()->ref );
|
||||
}
|
||||
if ( isset( \IPS\Request::i()->auth ) )
|
||||
{
|
||||
$url = $url->setQueryString( 'auth', \IPS\Request::i()->auth );
|
||||
}
|
||||
\IPS\Output::i()->redirect( $url );
|
||||
}
|
||||
|
||||
/* Otherwise go ahead */
|
||||
$this->_doLogin( $success->member );
|
||||
}
|
||||
/* Error */
|
||||
/* ... otherwise show an error */
|
||||
else
|
||||
{
|
||||
$error = 'no_access_cp';
|
||||
|
||||
/* Log */
|
||||
$this->log( 'fail' );
|
||||
}
|
||||
}
|
||||
@@ -69,11 +78,10 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
catch ( \IPS\Login\Exception $e )
|
||||
{
|
||||
$error = $e->getMessage();
|
||||
|
||||
/* Log */
|
||||
$this->log( 'fail' );
|
||||
}
|
||||
|
||||
/* Have we been sent here because of an IP address mismatch? */
|
||||
if ( is_null( $error ) AND isset( \IPS\Request::i()->error ) )
|
||||
{
|
||||
switch( \IPS\Request::i()->error )
|
||||
@@ -87,16 +95,8 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get icons */
|
||||
$icons = array();
|
||||
$haveStandard = FALSE;
|
||||
foreach ( \IPS\Login::handlers() as $key => $handler )
|
||||
{
|
||||
$icons[ $key ] = $handler::$icon;
|
||||
}
|
||||
|
||||
/* Do we need an error? */
|
||||
/* Do we need to show a message about an unfinished upgrade? */
|
||||
$upgradeError = FALSE;
|
||||
if ( !\IPS\IN_DEV and !isset( \IPS\Request::i()->noWarning ) )
|
||||
{
|
||||
@@ -109,7 +109,7 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
/* Display Login Form */
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_system.js', 'core', 'admin' ) );
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'system/login.css', 'core', 'admin' ) );
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'system' )->login( $forms, $this->activeTab, $error, $icons, $upgradeError ) );
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'system' )->login( $login, $error, $upgradeError ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,6 +203,9 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the cookie */
|
||||
\IPS\Request::i()->setCookie( 'acp_login_key', \IPS\Session::i()->cookieKey );
|
||||
|
||||
/* Boink - if we're in recovery mode, go there */
|
||||
if ( \IPS\RECOVERY_MODE === TRUE )
|
||||
{
|
||||
@@ -252,4 +255,5 @@ class _login extends \IPS\Dispatcher\Controller
|
||||
|
||||
\IPS\Db::i()->insert( 'core_admin_login_logs', $save );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,7 +21,12 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
* upgrade
|
||||
*/
|
||||
class _upgrade extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
{
|
||||
/**
|
||||
* @brief IPS clientArea Password
|
||||
*/
|
||||
protected $_clientAreaPassword;
|
||||
|
||||
/**
|
||||
* Manage
|
||||
*
|
||||
@@ -29,10 +34,8 @@ class _upgrade extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
protected function manage()
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'upgrade_manage' );
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'upgrade_manage', 'core', 'overview' );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::external( "http://ipbmafia.ru/files/file/1560-ips-community-suite-41-nulled/" ) );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::external( "http://ipbmafia.ru/files/file/2134-invision-community-42-nulled/" ) );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user