Skip to content

Commit e714fd2

Browse files
author
Leonix
committed
Webasyst Framework v.2.9.5
* Fixed display of plugin icons within apps when Webasyst is installed in a domain subdirectory. * Enhanced support for web push notifications by mobile apps.
1 parent 9093a72 commit e714fd2

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

wa-apps/installer/lib/config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
'description' => 'Install new apps from the Webasyst Store',
55
'icon' => 'img/installer.svg',
66
'mobile' => false,
7-
'version' => '2.9.4',
8-
'critical' => '2.9.4',
7+
'version' => '2.9.5',
8+
'critical' => '2.9.5',
99
'system' => true,
1010
'vendor' => 'webasyst',
1111
'csrf' => true,

wa-system/config/waAppConfig.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ public function getWidgets()
868868
if ($this->application == 'webasyst') {
869869
$widget_info['img'] = 'wa-widgets/' . $widget_id . '/' . $widget_info['img'];
870870
} else {
871-
$widget_info['img'] = ltrim(wa()->getAppStaticUrl($this->application).'widgets/' . $widget_id . '/' . $widget_info['img'], '/');
871+
$widget_info['img'] = ltrim(wa()->getAppPathRelativeToFrameworkRoot($this->application).'widgets/' . $widget_id . '/' . $widget_info['img'], '/');
872872
}
873873
}
874874
$this->widgets[$widget_id] = $widget_info;
@@ -932,7 +932,7 @@ public function getPlugins()
932932
$plugin_info['id'] = $plugin_id;
933933
$plugin_info['app_id'] = $this->application;
934934
if (isset($plugin_info['img'])) {
935-
$plugin_info['img'] = ltrim(wa()->getAppStaticUrl($this->application).'plugins/'.$plugin_id.'/'.$plugin_info['img'], '/');
935+
$plugin_info['img'] = ltrim(wa()->getAppPathRelativeToFrameworkRoot($this->application).'plugins/'.$plugin_id.'/'.$plugin_info['img'], '/');
936936
}
937937
if (isset($plugin_info['rights']) && $plugin_info['rights']) {
938938
if (!isset($plugin_info['handlers']['rights.config'])) {

wa-system/waSystem.class.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,16 @@ public function getAppStaticUrl($app = null, $absolute = false)
11991199
return $url.$this->getAppPathRelativeToFrameworkRoot($app);
12001200
}
12011201

1202-
protected function getAppPathRelativeToFrameworkRoot($app)
1202+
/**
1203+
* @param string|null $app Optional app id. If not specified, then current app's id is used by default.
1204+
* @return string
1205+
* @since 2.9.5
1206+
*/
1207+
public function getAppPathRelativeToFrameworkRoot($app=null)
12031208
{
1209+
if (!$app) {
1210+
$app = $this->getApp();
1211+
}
12041212
$app_path = $this->getAppPath(null, $app);
12051213

12061214
$base = waConfig::get('wa_path_root');

wa-system/webasyst/lib/config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
return array(
44
'name' => 'Webasyst',
55
'prefix' => 'webasyst',
6-
'version' => '2.9.4',
7-
'critical' => '2.9.4',
6+
'version' => '2.9.5',
7+
'critical' => '2.9.5',
88
'vendor' => 'webasyst',
99
'csrf' => true,
1010
'header_items' => array(

wa-system/webasyst/lib/config/db.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'create_datetime' => array('datetime', 'null' => 0),
3131
'contact_id' => array('int', 11), // optional (eg. for frontend users)
3232
'subscriber_data' => array('text', 'null' => 0),
33+
'scope' => array('varchar', 255, 'null' => 1),
3334
':keys' => array(
3435
'PRIMARY' => 'id',
3536
'provider_id' => 'provider_id',

wa-system/webasyst/templates/actions/backend/BackendHeader.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ <h3 class="popup-notification-new__title">
239239
{if $_force_set_wa_backend_ui_version == '2.0'}
240240

241241
<div style="position: fixed; z-index: 9999; bottom: 20px; right: 20px; border-radius: 4px; background: #eee; padding: 25px; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05), 0 0.5rem 0.5rem -0.5rem rgba(0, 0, 0, 0.13); max-width: 500px;{if $wa->cookie('force_hide_wa2ui_teaser') && $app_info.id != 'ui'} display: none;{/if}">
242-
<a href="#" onClick="_setCookie('force_hide_wa2ui_teaser', 1, 180); $(this).parent().hide();
242+
<a href="javascript:void(0)" onClick="_setCookie('force_hide_wa2ui_teaser', 1, 180); $(this).parent().hide();
243243
" style="padding: 6px; float: right; font-size: 24px; color: rgba(0,0,0,0.5); position: relative; top: -10px; right: -6px;">&times;</a>
244244
<h3 style="font-size: 20px; margin-bottom: 12px; color: #777; margin-top: -7px;">
245245
{if $app_info.id != 'webasyst'}<img src="{$root_url}{$app_info.icon.48}" style="width: 24px; height: 24px; position: relative; top: 4px;">{/if}

0 commit comments

Comments
 (0)