+
{_w('Installing the application','Installing applications',count($queue_apps))}
{foreach $queue_apps as $item}{$item.name|string_format:'[`"%s"`]'}{if !$item@last}, {/if}{/foreach}
-
+
{/if}
-
+
{{if result}}
{{if result.success}}
-
+
${result.success}
{{if result.success_plural == 0}}{/literal}{_w('application successfully installed','applications successfully installed',1)}{literal}
@@ -82,13 +82,13 @@
-
{/if}
diff --git a/wa-system/event/waEvent.class.php b/wa-system/event/waEvent.class.php
index 2335861c3..9c3af3673 100644
--- a/wa-system/event/waEvent.class.php
+++ b/wa-system/event/waEvent.class.php
@@ -152,7 +152,12 @@ protected function runApps(&$params, $handler)
return $result;
}
- wa($app_id);
+ try {
+ wa($app_id);
+ } catch (Exception $e) {
+ waLog::log('Event handling error. Unable to initialize app_id '.$app_id.': '.$e->getMessage());
+ return $result;
+ }
//If you did not find the class, try to include the file and check the class again.
if (!class_exists($class) && (!$this->includeAppsHandlerFile($app_id, $file) || !class_exists($class))) {
diff --git a/wa-system/locale/parse/entity/waLocaleParseEntityApp.class.php b/wa-system/locale/parse/entity/waLocaleParseEntityApp.class.php
index 72f1b5a13..76a26b7bb 100644
--- a/wa-system/locale/parse/entity/waLocaleParseEntityApp.class.php
+++ b/wa-system/locale/parse/entity/waLocaleParseEntityApp.class.php
@@ -60,7 +60,6 @@ public function getSources()
{
$result = [
$this->generatePath('templates'),
- $this->generatePath('js'),
$this->generatePath('lib'),
];
diff --git a/wa-system/plugin/waPlugin.class.php b/wa-system/plugin/waPlugin.class.php
index 49d219b6a..a411ef314 100644
--- a/wa-system/plugin/waPlugin.class.php
+++ b/wa-system/plugin/waPlugin.class.php
@@ -134,12 +134,10 @@ protected function checkUpdates()
$app_settings_model->set(array($this->app_id, $this->id), 'update_time', $t);
}
} catch (Exception $e) {
- if ($is_debug) {
- echo $e;
- }
- // log errors
- waLog::log($e->__toString());
- break;
+ waLog::log("Error running update of plugin {$this->app_id}.{$this->id}: {$file}\n".$e->getMessage()." (".$e->getCode().")\n".$e->getTraceAsString());
+ waConfig::get('disable_exception_log', false);
+ waConfig::set('is_template', $is_from_template);
+ throw new waException(sprintf(_ws('Error running update of plugin %s.%s: %s'), $this->app_id, $this->id, $file), 500, $e);
}
}
waConfig::get('disable_exception_log', false);
diff --git a/wa-system/view/waViewHelper.class.php b/wa-system/view/waViewHelper.class.php
index 0e64a89db..0aaab0e86 100644
--- a/wa-system/view/waViewHelper.class.php
+++ b/wa-system/view/waViewHelper.class.php
@@ -1401,22 +1401,56 @@ public function contactProfileSidebar($id, $options = array())
$selected_section = key($sections);
}
+ $is_profile_sidebar = ifset($options['is_profile_sidebar']);
+ $is_profile_drawer = ifset($options['is_profile_drawer']);
+
+ $active_section = ifset($options['active_section']);
+ if ($active_section && !$is_profile_sidebar && isset($sections[$active_section])) {
+ $sections = [$active_section => $sections[$active_section]];
+ }
+
+ if ($is_profile_sidebar) {
+ unset($sections['activity'],$sections['info']);
+
+ // Clean up html from section
+ foreach ($sections as $section_id => $section) {
+ $sections[$section_id]['html'] = '';
+ }
+
+ $html = ifset($options['html']);
+ if($html) {
+ foreach ($html as $section_id => $content) {
+ if(isset($sections[$section_id])) {
+ $sections[$section_id]['html'] = $content;
+ }
+ }
+ }
+ }
+
+ $legacy_suffix = '';
+ if ($this->whichUI() == '1.3') {
+ $legacy_suffix = '-legacy';
+ }
+
$wa = wa();
$view = $wa->getView();
$view->assign([
- 'profile_content_layout_template' => $wa->getAppPath('templates/actions/profile/ProfileContent.html', 'webasyst'),
+ 'profile_content_layout_template' => $wa->getAppPath('templates/actions'.$legacy_suffix.'/profile/ProfileContent.html', 'webasyst'),
'uniqid' => str_replace('.', '-', uniqid('s', true)),
'selected_section' => $selected_section,
'contact_id' => $id,
'sections' => $sections,
+ 'is_profile_sidebar' => $is_profile_sidebar,
+ 'is_profile_drawer' => $is_profile_drawer,
+ 'app_path' => $wa->getAppPath(),
]);
$template_file = $this->getConfig()->getConfigPath('ProfileSidebar.html', true, 'webasyst');
if (file_exists($template_file)) {
return $view->fetch('file:' . $template_file);
+ } else {
+ return $view->fetch(wa()->getAppPath('templates/actions'.$legacy_suffix.'/profile/ProfileSidebar.html', 'webasyst'));
}
-
- return $view->fetch($wa->getAppPath('templates/actions/profile/ProfileSidebar.html', 'webasyst'));
}
public function getContactTabs($id)
diff --git a/wa-system/webasyst/lib/config/app.php b/wa-system/webasyst/lib/config/app.php
index fcf9541f8..fd889b4d5 100644
--- a/wa-system/webasyst/lib/config/app.php
+++ b/wa-system/webasyst/lib/config/app.php
@@ -3,8 +3,8 @@
return array(
'name' => 'Webasyst',
'prefix' => 'webasyst',
- 'version' => '2.3.5',
- 'critical' => '2.3.5',
+ 'version' => '2.4.0',
+ 'critical' => '2.4.0',
'vendor' => 'webasyst',
'csrf' => true,
'header_items' => array(
diff --git a/wa-system/webasyst/lib/config/db.php b/wa-system/webasyst/lib/config/db.php
index 69fc0116c..5ebc5b875 100644
--- a/wa-system/webasyst/lib/config/db.php
+++ b/wa-system/webasyst/lib/config/db.php
@@ -51,7 +51,7 @@
'wa_app_settings' => array(
'app_id' => array('varchar', 64, 'null' => 0),
'name' => array('varchar', 64, 'null' => 0),
- 'value' => array('text', 'null' => 0),
+ 'value' => array('mediumtext', 'null' => 0),
':keys' => array(
'PRIMARY' => array('app_id', 'name'),
),
diff --git a/wa-system/webasyst/lib/models/waContactEvents.model.php b/wa-system/webasyst/lib/models/waContactEvents.model.php
index 2bf51b014..b7f25495b 100644
--- a/wa-system/webasyst/lib/models/waContactEvents.model.php
+++ b/wa-system/webasyst/lib/models/waContactEvents.model.php
@@ -55,7 +55,8 @@ public function getEventByContact($contact_id, $limit = null)
$now = waDateTime::format('Y-m-d H:i:s');
$ccm = new waContactCalendarsModel();
$_limit = $limit ? ('LIMIT '.intval($limit)) : '';
- $sql = "SELECT e.*, c.name calendar_name, c.bg_color, c.font_color FROM {$this->getTableName()} e
+ $sql = "SELECT e.*, c.name calendar_name, c.status_bg_color, c.status_font_color, c.bg_color, c.font_color, c.icon
+ FROM {$this->getTableName()} e
INNER JOIN {$ccm->getTableName()} c ON c.id=e.calendar_id
WHERE $contact_condition AND is_status=1 AND
((is_allday = 0 AND e.start <= '$now' AND e.end >= '$now')
diff --git a/wa-system/webasyst/lib/updates/2.3.0/1636553370.php b/wa-system/webasyst/lib/updates/2.3.0/1636553370.php
new file mode 100644
index 000000000..dfd494f95
--- /dev/null
+++ b/wa-system/webasyst/lib/updates/2.3.0/1636553370.php
@@ -0,0 +1,12 @@
+query("SELECT `value` FROM `wa_app_settings` WHERE 0");
+ $model->exec("ALTER TABLE `wa_app_settings` MODIFY COLUMN `value` MEDIUMTEXT NOT NULL");
+} catch (waException $e) {
+
+}
+
+
diff --git a/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.mo b/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.mo
index f3a137a6d..497304343 100644
Binary files a/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.mo and b/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.mo differ
diff --git a/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.po b/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.po
index a9cf2787b..bbd876be7 100755
--- a/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.po
+++ b/wa-system/webasyst/locale/en_US/LC_MESSAGES/webasyst.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WebAsyst\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-09-27 12:26+0300\n"
+"PO-Revision-Date: 2021-11-16 12:51+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: .\n"
"Language: en\n"
-"X-Generator: Poedit 2.0.6\n"
+"X-Generator: Poedit 3.0\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPath-1: .\n"
@@ -3928,3 +3928,51 @@ msgstr ""
msgid "Menu"
msgstr ""
+
+msgid "Calendar"
+msgstr ""
+
+msgid "Error getting section contents."
+msgstr ""
+
+msgid "Access rights inherited from groups (%s) can be expanded on an individual user level (%s). To reduce access inherited from a group, exclude the user from the group or shrink the group basis access rights setup."
+msgstr ""
+
+msgid "Access granted for the user individually."
+msgstr ""
+
+msgid "Access inherited from user groups."
+msgstr ""
+
+msgid "It is your personal account in Webasyst Customer Center, via which you can quickly access Webasyst apps either in the Cloud or on your own server."
+msgstr ""
+
+msgid "Default sending parameters"
+msgstr ""
+
+msgid "Additional sending parameters"
+msgstr ""
+
+msgid "The email sending parameters specified below are used by default for all outgoing email messages. If you need to use other parameters for all or certain sender addresses or domains then add extra rules using the “%s” button."
+msgstr ""
+
+msgid "Try again"
+msgstr ""
+
+msgid "Or sign into your backend in the usual way."
+msgstr ""
+
+msgid "Drag & drop a file here or upload it manually (JPG, GIF or PNG)"
+msgstr ""
+
+msgid "Choose file"
+msgstr ""
+
+msgid "The time for authorization has expired. Please go back using the button below and try again."
+msgstr ""
+
+msgid "Access granted for the user individually"
+msgstr ""
+
+msgid "Access inherited from user groups"
+msgstr ""
diff --git a/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.mo b/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.mo
index 32cc668c3..0052e87d7 100644
Binary files a/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.mo and b/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.mo differ
diff --git a/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.po b/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.po
index ccffbfeb1..3f4ebed6e 100755
--- a/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.po
+++ b/wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WebAsyst\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-09-28 13:19+0300\n"
-"Last-Translator: Webasyst\n"
+"PO-Revision-Date: 2021-11-16 19:17+0300\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
@@ -12,7 +12,7 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: .\n"
"Language: ru_RU\n"
-"X-Generator: Poedit 2.4.3\n"
+"X-Generator: Poedit 3.0\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPath-1: .\n"
@@ -1415,10 +1415,10 @@ msgid "mobile"
msgstr "мобильный"
msgid "Instant messenger"
-msgstr "Мгновенные сообщения"
+msgstr "Мессенджеры"
msgid "Social network"
-msgstr "Социальная сеть"
+msgstr "Соцсети"
msgid "Invalid login name or password."
msgstr "Неправильное имя пользователя или пароль."
@@ -1652,7 +1652,7 @@ msgid "Pages"
msgstr "Страницы"
msgid "When done editing, click “Save” to apply changes."
-msgstr "После завершения редактирования не забудьте нажать на кнопку «Сохранить»"
+msgstr "После завершения редактирования не забудьте нажать на кнопку «Сохранить»."
msgid "Enable this URL"
msgstr "Включить показ страницы по этому адресу"
@@ -6531,3 +6531,28 @@ msgstr "Параметры отправки по умолчанию"
msgid "Additional sending parameters"
msgstr "Дополнительные параметры отправки"
+
+msgid "Calendar"
+msgstr "Календарь"
+
+msgid "Error getting section contents."
+msgstr "Ошибка получения содержимого."
+
+msgid "Access rights inherited from groups (%s) can be expanded on an individual user level (%s). To reduce access inherited from a group, exclude the user from the group or shrink the group basis access rights setup."
+msgstr "Если пользователь унаследовал доступ от групп (%s), то вы можете только расширить его за счет установки персонального доступа (%s). Чтобы понизить уровень доступа измените или настройте группы, в которых состоит пользователь"
+
+msgid "Access granted for the user individually."
+msgstr "Доступ установлен персонально для этого пользователя."
+
+msgid "Access inherited from user groups."
+msgstr "Доступ унаследован от групп."
+
+msgid "Enable 2.0"
+msgstr "Включить 2.0"
+
+msgid "Access granted for the user individually"
+msgstr "Доступ установлен персонально для этого пользователя"
+
+msgid "Access inherited from user groups"
+msgstr "Доступ унаследован от групп"
+
diff --git a/wa-system/webasyst/templates/actions-legacy/profile/ProfileSidebar.html b/wa-system/webasyst/templates/actions-legacy/profile/ProfileSidebar.html
new file mode 100644
index 000000000..95da7600c
--- /dev/null
+++ b/wa-system/webasyst/templates/actions-legacy/profile/ProfileSidebar.html
@@ -0,0 +1,302 @@
+{*
+ * Default template for $wa->contactProfileSidebar() helper.
+ *
+ * Can be copied for customization to
+ * wa-config/apps/webasyst/ProfileSidebar.html
+ *}
+{if $is_profile_sidebar}
+ {$widget_path = "`$app_path`/templates/actions/profile/sidebarWidgets/Calendar.html"}
+ {$schedule_path = "`$app_path`/templates/actions/schedule/Schedule.inc.html"}
+
+ {foreach $sections as $section_id => $section}
+ {if $section_id !== 'stats'}{continue}{/if}
+
+ {/foreach}
+ {foreach $sections as $section_id => $section}
+ {if $section_id === 'stats' || $section_id === 'access'}{continue}{/if}
+
+ {/foreach}
+{else}
+ {$section_id = $options.sectionId|default:''}
+ {if $section_id && isset($sections[$section_id])}
+ {$section = $sections[$section_id]}
+ {$section_url = $section.url|default:''}
+
+
+
+ {include file=$profile_content_layout_template assign=layout_html}
+ {$layout_html|escape}
+
+ {strip} {* strip need for js *}
+
+ {if !empty($sections[$section_id].html) && empty($section.url)}
+ {$section.html|escape}
+ {/if}
+
+ {/strip}
+
+
+ {/if}
+{/if}
+
diff --git a/wa-system/webasyst/templates/actions-legacy/profile/ProfileTabs.html b/wa-system/webasyst/templates/actions-legacy/profile/ProfileTabs.html
index b32799023..62b218e00 100644
--- a/wa-system/webasyst/templates/actions-legacy/profile/ProfileTabs.html
+++ b/wa-system/webasyst/templates/actions-legacy/profile/ProfileTabs.html
@@ -221,4 +221,4 @@
}
}
-});
\ No newline at end of file
+});
diff --git a/wa-system/webasyst/templates/actions/backend/BackendDefaultMobile.html b/wa-system/webasyst/templates/actions/backend/BackendDefaultMobile.html
index a401d4dbc..4202c856a 100644
--- a/wa-system/webasyst/templates/actions/backend/BackendDefaultMobile.html
+++ b/wa-system/webasyst/templates/actions/backend/BackendDefaultMobile.html
@@ -7,7 +7,6 @@
{$wa->accountName()}
-
diff --git a/wa-system/webasyst/templates/actions/backend/BackendHeader13.html b/wa-system/webasyst/templates/actions/backend/BackendHeader13.html
index ca8c5a90a..cdb504e9c 100644
--- a/wa-system/webasyst/templates/actions/backend/BackendHeader13.html
+++ b/wa-system/webasyst/templates/actions/backend/BackendHeader13.html
@@ -116,7 +116,7 @@ {$company_name|truncate:18:'...'}
}
{* a button for re-enabling the 2.0 UI mode even when it was closed *}
- 2.0
+ [s`Enable 2.0`]
{/if}
[s`logout`]
diff --git a/wa-system/webasyst/templates/actions/backend/BackendHeader20.html b/wa-system/webasyst/templates/actions/backend/BackendHeader20.html
index 0280b6657..4a18b3082 100644
--- a/wa-system/webasyst/templates/actions/backend/BackendHeader20.html
+++ b/wa-system/webasyst/templates/actions/backend/BackendHeader20.html
@@ -143,8 +143,12 @@
{include file="../dashboard/DashboardAnnouncement.html" notifications=$notifications inline}
- {** wa2ui showcase box **}
- {if !$wa->debug()}
+ {** wa2ui showcase box in case the wa1 legacy ui is supported by the app **}
+ {if !$wa->debug() && ifset($app_info, 'ui', '1.3') === '1.3,2.0'
+
+ && $app_info.id != 'webasyst'
+
+ }
2.0
-
+
${result.success}
{{if result.success_plural == 0}}{/literal}{_w('application successfully installed','applications successfully installed',1)}{literal}
@@ -82,13 +82,13 @@