Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -8,43 +8,37 @@
|
||||
* @since 18 Feb 2013
|
||||
*/
|
||||
|
||||
use IPS\Application;
|
||||
use IPS\Db;
|
||||
use IPS\Lang;
|
||||
use IPS\Output;
|
||||
use IPS\Request;
|
||||
|
||||
define('REPORT_EXCEPTIONS', TRUE);
|
||||
require_once '../../../../init.php';
|
||||
|
||||
\IPS\Output::setCacheTime( false );
|
||||
Output::i()->pageCaching = FALSE;
|
||||
|
||||
$langId = \intval( \IPS\Request::i()->langId );
|
||||
$langId = intval( Request::i()->langId );
|
||||
$_lang = array();
|
||||
|
||||
foreach ( \IPS\Db::i()->select( '*', 'core_sys_lang_words', array( 'lang_id=? AND word_js=?', $langId, TRUE ) ) as $row )
|
||||
foreach ( Db::i()->select( '*', 'core_sys_lang_words', array( 'lang_id=? AND word_js=?', $langId, TRUE ) ) as $row )
|
||||
{
|
||||
$_lang[ $row['word_key'] ] = $row['word_custom'] ?: $row['word_default'];
|
||||
}
|
||||
|
||||
if ( \IPS\IN_DEV )
|
||||
{
|
||||
foreach ( \IPS\Application::applications() as $app )
|
||||
foreach ( Application::applications() as $app )
|
||||
{
|
||||
if( \IPS\Application::appIsEnabled( $app->directory ) )
|
||||
if( Application::appIsEnabled( $app->directory ) )
|
||||
{
|
||||
if ( file_exists( \IPS\ROOT_PATH . "/applications/{$app->directory}/dev/jslang.php" ) )
|
||||
{
|
||||
require \IPS\ROOT_PATH . "/applications/{$app->directory}/dev/jslang.php";
|
||||
$_lang = array_merge( $_lang, $lang );
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ( \IPS\Plugin::plugins() as $plugin )
|
||||
{
|
||||
if ( file_exists( \IPS\ROOT_PATH . "/plugins/{$plugin->location}/dev/jslang.php" ) )
|
||||
{
|
||||
require \IPS\ROOT_PATH . "/plugins/{$plugin->location}/dev/jslang.php";
|
||||
$_lang = array_merge( $_lang, $lang );
|
||||
$_lang = array_merge( $_lang, Lang::readLangFiles( $app->directory, true ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cacheHeaders = ( \IPS\IN_DEV !== true AND \IPS\Theme::designersModeEnabled() !== true ) ? \IPS\Output::getCacheHeaders( time(), 360 ) : array();
|
||||
$cacheHeaders = ( \IPS\IN_DEV !== true ) ? Output::getCacheHeaders( time(), 360 ) : array();
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->sendOutput( 'ips.setString( ' . json_encode( $_lang ) . ')', 200, 'text/javascript', $cacheHeaders );
|
||||
Output::i()->sendOutput( 'ips.setString( ' . json_encode( $_lang ) . ')', 200, 'text/javascript', $cacheHeaders );
|
||||
Reference in new issue
Block a user