Skip to content

Commit 9093a72

Browse files
author
Leonid Vakulenko
committed
Webasyst Framework v.2.9.4
* Fixed display of app icons when Webasyst is installed in a domain subdirectory. * Restored the option to change the password for users with limited access rights.
1 parent f197d93 commit 9093a72

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
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.3',
8-
'critical' => '2.9.3',
7+
'version' => '2.9.4',
8+
'critical' => '2.9.4',
99
'system' => true,
1010
'vendor' => 'webasyst',
1111
'csrf' => true,

wa-system/waSystem.class.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,18 +919,18 @@ public function getApps($system = false)
919919
if (isset($app_info['icon'])) {
920920
if (is_array($app_info['icon'])) {
921921
foreach ($app_info['icon'] as $size => $url) {
922-
$app_info['icon'][$size] = ltrim($this->getAppStaticUrl($app).$url, '/');
922+
$app_info['icon'][$size] = ltrim($this->getAppPathRelativeToFrameworkRoot($app).$url, '/');
923923
}
924924
} else {
925925
$app_info['icon'] = array(
926-
48 => ltrim($this->getAppStaticUrl($app).$app_info['icon'], '/')
926+
48 => ltrim($this->getAppPathRelativeToFrameworkRoot($app).$app_info['icon'], '/')
927927
);
928928
}
929929
} else {
930930
$app_info['icon'] = array();
931931
}
932932
if (isset($app_info['img'])) {
933-
$app_info['img'] = ltrim($this->getAppStaticUrl($app).$app_info['img'], '/');
933+
$app_info['img'] = ltrim($this->getAppPathRelativeToFrameworkRoot($app).$app_info['img'], '/');
934934
} elseif (isset($app_info['icon'][48])) {
935935
$app_info['img'] = $app_info['icon'][48];
936936
}
@@ -951,7 +951,7 @@ public function getApps($system = false)
951951
if (isset($params['name'])) {
952952
$params['name'] = _wd($app, $params['name']);
953953
}
954-
$path_to_app = ($app == 'webasyst') ? 'wa-content'.'/' : ltrim($this->getAppStaticUrl($app), '/');
954+
$path_to_app = ($app == 'webasyst') ? 'wa-content'.'/' : ltrim($this->getAppPathRelativeToFrameworkRoot($app), '/');
955955
if (isset($params['icon'])) {
956956
if (is_array($params['icon'])) {
957957
foreach ($params['icon'] as $size => $url) {
@@ -1196,7 +1196,11 @@ public function getAppStaticUrl($app = null, $absolute = false)
11961196
$app = $this->getApp();
11971197
}
11981198
$url = $this->config->getRootUrl($absolute);
1199+
return $url.$this->getAppPathRelativeToFrameworkRoot($app);
1200+
}
11991201

1202+
protected function getAppPathRelativeToFrameworkRoot($app)
1203+
{
12001204
$app_path = $this->getAppPath(null, $app);
12011205

12021206
$base = waConfig::get('wa_path_root');
@@ -1207,7 +1211,7 @@ public function getAppStaticUrl($app = null, $absolute = false)
12071211
$app_path = 'wa-apps/'.$app.'/';
12081212
}
12091213

1210-
return $url.$app_path;
1214+
return $app_path;
12111215
}
12121216

12131217
/**

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.3',
7-
'critical' => '2.9.3',
6+
'version' => '2.9.4',
7+
'critical' => '2.9.4',
88
'vendor' => 'webasyst',
99
'csrf' => true,
1010
'header_items' => array(

wa-system/webasyst/templates/actions/dashboard/DashboardAppsBlock.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{/if}
3030
<a href="{$_item_url}" title="{$_info.name|ifempty}">
3131
{if isset($_info.img)}
32-
<img{if !empty($_info.icon.96)} data-src2="{$root_url}{$_info.icon.96}{$_version}"{/if} src="{$root_url}{if !empty($_info.icon.96)}{$_info.icon.96}{else}{$_info.img}{/if}{$_version}" alt="">
32+
<img{if !empty($_info.icon.96)} data-src2="{$wa_url}{$_info.icon.96}{$_version}"{/if} src="{$wa_url}{if !empty($_info.icon.96)}{$_info.icon.96}{else}{$_info.img}{/if}{$_version}" alt="">
3333
{/if}
3434
<span class="nowrap">{$_info.name|ifempty}</span>
3535
{if $_count}

wa-system/webasyst/templates/actions/profile/ProfileTabs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{if is_profile_sidebar}
99
{foreach $tabs as $tab_id => $tab}
10-
{if !empty($tab.html) && empty($tab.url) && $tab.id != 'info'}
10+
{if !empty($tab.html) && empty($tab.url) && $tab.id != 'info' && $tab.id != 'access'}
1111
<div class="hidden js-tab-content-{$tab_id|escape}">{$tab.html}</div>
1212
{/if}
1313
{/foreach}

0 commit comments

Comments
 (0)