Skip to content

Commit

Permalink
Webasyst Framework v.2.9.4
Browse files Browse the repository at this point in the history
  * 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.
  • Loading branch information
Leonid Vakulenko committed Oct 23, 2023
1 parent f197d93 commit 9093a72
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions wa-apps/installer/lib/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
'description' => 'Install new apps from the Webasyst Store',
'icon' => 'img/installer.svg',
'mobile' => false,
'version' => '2.9.3',
'critical' => '2.9.3',
'version' => '2.9.4',
'critical' => '2.9.4',
'system' => true,
'vendor' => 'webasyst',
'csrf' => true,
Expand Down
14 changes: 9 additions & 5 deletions wa-system/waSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -919,18 +919,18 @@ public function getApps($system = false)
if (isset($app_info['icon'])) {
if (is_array($app_info['icon'])) {
foreach ($app_info['icon'] as $size => $url) {
$app_info['icon'][$size] = ltrim($this->getAppStaticUrl($app).$url, '/');
$app_info['icon'][$size] = ltrim($this->getAppPathRelativeToFrameworkRoot($app).$url, '/');
}
} else {
$app_info['icon'] = array(
48 => ltrim($this->getAppStaticUrl($app).$app_info['icon'], '/')
48 => ltrim($this->getAppPathRelativeToFrameworkRoot($app).$app_info['icon'], '/')
);
}
} else {
$app_info['icon'] = array();
}
if (isset($app_info['img'])) {
$app_info['img'] = ltrim($this->getAppStaticUrl($app).$app_info['img'], '/');
$app_info['img'] = ltrim($this->getAppPathRelativeToFrameworkRoot($app).$app_info['img'], '/');
} elseif (isset($app_info['icon'][48])) {
$app_info['img'] = $app_info['icon'][48];
}
Expand All @@ -951,7 +951,7 @@ public function getApps($system = false)
if (isset($params['name'])) {
$params['name'] = _wd($app, $params['name']);
}
$path_to_app = ($app == 'webasyst') ? 'wa-content'.'/' : ltrim($this->getAppStaticUrl($app), '/');
$path_to_app = ($app == 'webasyst') ? 'wa-content'.'/' : ltrim($this->getAppPathRelativeToFrameworkRoot($app), '/');
if (isset($params['icon'])) {
if (is_array($params['icon'])) {
foreach ($params['icon'] as $size => $url) {
Expand Down Expand Up @@ -1196,7 +1196,11 @@ public function getAppStaticUrl($app = null, $absolute = false)
$app = $this->getApp();
}
$url = $this->config->getRootUrl($absolute);
return $url.$this->getAppPathRelativeToFrameworkRoot($app);
}

protected function getAppPathRelativeToFrameworkRoot($app)
{
$app_path = $this->getAppPath(null, $app);

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

return $url.$app_path;
return $app_path;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions wa-system/webasyst/lib/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
return array(
'name' => 'Webasyst',
'prefix' => 'webasyst',
'version' => '2.9.3',
'critical' => '2.9.3',
'version' => '2.9.4',
'critical' => '2.9.4',
'vendor' => 'webasyst',
'csrf' => true,
'header_items' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{/if}
<a href="{$_item_url}" title="{$_info.name|ifempty}">
{if isset($_info.img)}
<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="">
<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="">
{/if}
<span class="nowrap">{$_info.name|ifempty}</span>
{if $_count}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{if is_profile_sidebar}
{foreach $tabs as $tab_id => $tab}
{if !empty($tab.html) && empty($tab.url) && $tab.id != 'info'}
{if !empty($tab.html) && empty($tab.url) && $tab.id != 'info' && $tab.id != 'access'}
<div class="hidden js-tab-content-{$tab_id|escape}">{$tab.html}</div>
{/if}
{/foreach}
Expand Down

0 comments on commit 9093a72

Please sign in to comment.