Version 5.0.0 beta 2
This commit is contained in:
1 parent
15c7beabc5
commit
f61b0da85d
181 files changed
+3182
-1533
No files matched your search
@@ -189,6 +189,9 @@ class applications extends Controller
|
||||
'title' => $application['app_title'] ?? $application['app_directory'],
|
||||
'author' => $application['app_author'],
|
||||
'website' => $application['app_website'],
|
||||
'update_version' => ( $application['app_update_version'] ? json_decode( $application['app_update_version'], true ) : null ),
|
||||
'long_version' => $application['app_long_version'],
|
||||
'version' => $application['app_version']
|
||||
);
|
||||
|
||||
if( isset( $uninstalled[ $application['app_directory'] ] ) )
|
||||
@@ -209,6 +212,9 @@ class applications extends Controller
|
||||
'title' => $application['app_title'] ?? $application['app_directory'],
|
||||
'author' => $application['app_author'],
|
||||
'website' => $application['app_website'],
|
||||
'update_version' => ( $application['app_update_version'] ? json_decode( $application['app_update_version'], true ) : null ),
|
||||
'long_version' => $application['app_long_version'],
|
||||
'version' => $application['app_version']
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -285,6 +291,7 @@ class applications extends Controller
|
||||
{
|
||||
foreach ( $legacyApps as $k => $app )
|
||||
{
|
||||
$badge = null;
|
||||
$buttons = array();
|
||||
if( IPS::canManageResources() AND IPS::checkThirdParty() )
|
||||
{
|
||||
@@ -294,6 +301,32 @@ class applications extends Controller
|
||||
'link' => Url::internal( "app=core&module=applications&controller=applications&appKey={$k}&do=upload" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => Member::loggedIn()->language()->addToStack( 'upload_new_version' ) )
|
||||
);
|
||||
|
||||
if( isset( $app['update_version'] ) and is_iterable( $app['update_version'] ) )
|
||||
{
|
||||
$update = null;
|
||||
if ( !isset( $app['update_version'][0] ) and isset( $app['update_version']['longversion'] ) )
|
||||
{
|
||||
$app['update_version'] = array( $app['update_version'] );
|
||||
}
|
||||
|
||||
foreach ( $app['update_version'] as $data )
|
||||
{
|
||||
if( !empty( $data['longversion'] ) and $data['longversion'] > $app['long_version'] and $data['version'] != $app['version'] )
|
||||
{
|
||||
if( $data['released'] AND ( (int) $data['released'] != $data['released'] OR strlen($data['released']) != 10 ) )
|
||||
{
|
||||
$data['released'] = strtotime( $data['released'] );
|
||||
}
|
||||
$update = $data;
|
||||
}
|
||||
}
|
||||
|
||||
if( $update !== null )
|
||||
{
|
||||
$badge = [ 'new', '', Theme::i()->getTemplate( 'global', 'core' )->updatebadge( $update['version'], $update['updateurl'] ?? '', DateTime::ts( $update['released'] )->localeDate() ) ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( Member::loggedIn()->hasAcpRestriction( 'core', 'applications', 'app_delete' ) )
|
||||
@@ -307,7 +340,7 @@ class applications extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
$rows[ $k ] = Theme::i()->getTemplate( 'trees' )->row( $baseUrl, $k, $app['title'], FALSE, $buttons );
|
||||
$rows[ $k ] = Theme::i()->getTemplate( 'trees' )->row( $baseUrl, $k, $app['title'], FALSE, $buttons, $app['author'], null, null, false, null, null, $badge );
|
||||
}
|
||||
}
|
||||
return $rows;
|
||||
|
||||
@@ -77,56 +77,11 @@ class emoticons extends Controller
|
||||
*/
|
||||
protected function manage() : void
|
||||
{
|
||||
$tabs = array(
|
||||
'standard' => 'standard_emoji',
|
||||
'custom' => 'custom_emoji',
|
||||
);
|
||||
$activeTab = ( isset( Request::i()->tab ) and array_key_exists( Request::i()->tab, $tabs ) ) ? Request::i()->tab : 'standard';
|
||||
|
||||
if ( $activeTab == 'standard' )
|
||||
{
|
||||
if ( Settings::i()->getFromConfGlobal('sql_utf8mb4') === TRUE )
|
||||
{
|
||||
$form = new Form;
|
||||
$form->add( new Radio( 'emoji_style', Settings::i()->emoji_style, FALSE, array(
|
||||
'options' => array(
|
||||
'native' => 'emoji_style_native',
|
||||
'twemoji' => 'emoji_style_twemoji',
|
||||
'disabled' => 'emoji_style_disabled',
|
||||
),
|
||||
) ) );
|
||||
Member::loggedIn()->language()->get( 'emoji_style_native' ); // We need to preload the word before we can add more text to it.
|
||||
Member::loggedIn()->language()->words['emoji_style_native'] .= "<div class='i-font-size_2 i-margin-top_1'><span class='ipsEmoji'>😀</span><span class='ipsEmoji'>😉</span><span class='ipsEmoji'>😂</span><span class='ipsEmoji'>😍</span><span class='ipsEmoji'>🤘</span><span class='ipsEmoji'>🤦♀️</span><span class='ipsEmoji'>🤷♂️</span><span class='ipsEmoji'>🍿</span><span class='ipsEmoji'>🚀</span><span class='ipsEmoji'>🎉</span><span class='ipsEmoji'>🏳️🌈</span></div>"; // Have to do this here because if we try to put it in the actual language string, that will cause an error if not utf8mb4
|
||||
$form->add( new YesNo( 'emoji_shortcodes', Settings::i()->emoji_shortcodes, FALSE, array(), NULL, NULL, NULL, 'emoji_shortcodes' ) );
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$values['emoji_cache'] = time();
|
||||
$form->saveAsSettings( $values );
|
||||
Output::i()->redirect( Url::internal( 'app=core&module=editor&controller=emoticons&tab=standard' ), 'saved' );
|
||||
}
|
||||
|
||||
$activeTabContents = $form;
|
||||
}
|
||||
else
|
||||
{
|
||||
$activeTabContents = Theme::i()->getTemplate( 'global' )->message( CIC ? 'emoji_utf8mb4_required_cic' : 'emoji_utf8mb4_required', 'error', NULL, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
|
||||
}
|
||||
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack('menu__core_editor_emoticons');
|
||||
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
|
||||
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack('custom_emoji');
|
||||
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js('admin_customization.js', 'core', 'admin') );
|
||||
if( Request::i()->isAjax() )
|
||||
{
|
||||
Output::i()->output = $activeTabContents;
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->output = Theme::i()->getTemplate( 'global' )->tabs( $tabs, $activeTab, $activeTabContents, Url::internal( "app=core&module=editor&controller=emoticons" ) );
|
||||
}
|
||||
Output::i()->output = $activeTabContents; // @todo Mayyyyyyybe we should make one tab per set, but I really think custom emoticons are too dumb for all that
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -761,6 +761,10 @@ class languages extends Controller
|
||||
}
|
||||
|
||||
$form = new Form( 'form', 'langauge_export_button' );
|
||||
// This appears inside a dialog. The following instructs the dialog to handle the download via JS rather than using a native form download. This allows the dialog to close when done.
|
||||
$filename = $lang->title . " {$lang->version}.xml";
|
||||
$form->attributes['data-form-is-download'] = '';
|
||||
$form->attributes['data-form-download-name'] = "testing to see if this works " . $filename;
|
||||
|
||||
$form->add( new Text( 'language_export_author_name', $lang->author_name, false ) );
|
||||
$form->add( new FormUrl( 'language_export_author_url', $lang->author_url, false ) );
|
||||
@@ -874,7 +878,16 @@ class languages extends Controller
|
||||
|
||||
/* Finish */
|
||||
$xml->endDocument();
|
||||
Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => Output::getContentDisposition( 'attachment', $lang->title . " {$lang->version}.xml" ) ), FALSE, FALSE, FALSE );
|
||||
Output::i()->sendOutput(
|
||||
$xml->outputMemory(),
|
||||
200,
|
||||
'application/xml',
|
||||
array(
|
||||
'Content-Disposition' => Output::getContentDisposition( 'attachment', $filename ) ),
|
||||
FALSE,
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
}
|
||||
|
||||
/* Display */
|
||||
|
||||
@@ -4116,7 +4116,6 @@ class members extends Controller
|
||||
|
||||
/* Clean up before encoding */
|
||||
Output::i()->parseFileObjectUrls( $csv );
|
||||
$csv = Output::i()->replaceEmojiWithImages( $csv );
|
||||
|
||||
/* Excel requires a BOM this for non-ASCII characters to show properly */
|
||||
$csv = chr(0xEF) . chr(0xBB) . chr(0xBF) . $csv;
|
||||
|
||||
@@ -87,7 +87,17 @@ class general extends Controller
|
||||
$form->add( new YesNo( 'site_site_elsewhere', Settings::i()->site_site_elsewhere, FALSE, [ 'togglesOn' => [ 'site_main_url', 'site_main_title' ] ] ) );
|
||||
$form->add( new FormUrl( 'site_main_url', Settings::i()->site_main_url, FALSE, [], NULL, NULL, NULL, 'site_main_url' ) );
|
||||
$form->add( new Text( 'site_main_title', Settings::i()->site_main_title, FALSE, [], NULL, NULL, NULL, 'site_main_title' ) );
|
||||
$form->add( new CheckboxSet( 'diagnostics_reporting', array( 'usage' => ( (bool) Settings::i()->usage_reporting ), 'diagnostics' => ( (bool) Settings::i()->diagnostics_reporting ) ), FALSE, array( 'options' => array(
|
||||
$diagnosticsOptions = [];
|
||||
if( (bool) Settings::i()->usage_reporting === true )
|
||||
{
|
||||
$diagnosticsOptions[] = 'usage';
|
||||
}
|
||||
if( (bool) Settings::i()->diagnostics_reporting === true )
|
||||
{
|
||||
$diagnosticsOptions[] = 'diagnostics';
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'diagnostics_reporting', $diagnosticsOptions, FALSE, array( 'options' => array(
|
||||
'usage' => 'diagnostics_reporting_usage',
|
||||
'diagnostics' => 'diagnostics_reporting_diagnostics',
|
||||
) ) ) );
|
||||
|
||||
@@ -357,7 +357,7 @@ class admin extends Controller
|
||||
|
||||
/* Get available restrictions */
|
||||
$restrictions = array();
|
||||
foreach ( Application::applications() as $app )
|
||||
foreach ( Application::enabledApplications() as $app )
|
||||
{
|
||||
if ( !CIC or !in_array( "{$app->directory}", Member::$cicBlockedAcpRestrictions ) )
|
||||
{
|
||||
|
||||
@@ -676,6 +676,7 @@ class support extends Controller
|
||||
'success' => FALSE,
|
||||
'link' => Url::internal( 'app=core&module=support&controller=redis' ),
|
||||
'detail' => $detail,
|
||||
'button' => array( 'lang' => 'health_view_redis_config' ),
|
||||
'dialogTitle' => 'health__more_information',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user