Просмотр исходного кода

Merge branch 'master' of https://github.com/unaio/una

roman.lesnikov@gmail.com 3 лет назад
Родитель
Сommit
79bde39d66
28 измененных файлов с 391 добавлено и 272 удалено
  1. 1 1
      inc/classes/BxDolAccount.php
  2. 1 1
      inc/classes/BxDolMetatags.php
  3. 8 1
      inc/classes/BxDolReport.php
  4. 11 11
      inc/classes/BxDolStorage.php
  5. 220 220
      install/sql/system.sql
  6. 1 1
      modules/boonex/artificer/data/template/system/menu_vertical.html
  7. 2 2
      modules/boonex/artificer/data/template/system/menu_vertical_lite.html
  8. 5 3
      modules/boonex/english/data/langs/system/en.xml
  9. 23 21
      modules/boonex/files/classes/BxFilesModule.php
  10. 3 0
      modules/boonex/russian/data/langs/system/ru.xml
  11. 2 2
      modules/boonex/timeline/template/type_post.html
  12. 1 0
      studio/template/scripts/BxBaseStudioDesigner.php
  13. 1 3
      template/_header_js.html
  14. 7 0
      template/images/icons/mime-type-any.svg
  15. 7 0
      template/images/icons/mime-type-archive.svg
  16. 7 0
      template/images/icons/mime-type-audio.svg
  17. 7 0
      template/images/icons/mime-type-document.svg
  18. 7 0
      template/images/icons/mime-type-image.svg
  19. 7 0
      template/images/icons/mime-type-png.svg
  20. 7 0
      template/images/icons/mime-type-presentation.svg
  21. 7 0
      template/images/icons/mime-type-psd.svg
  22. 7 0
      template/images/icons/mime-type-spreadsheet.svg
  23. 7 0
      template/images/icons/mime-type-vector.svg
  24. 7 0
      template/images/icons/mime-type-video.svg
  25. 1 1
      template/menu_vertical.html
  26. 1 1
      template/menu_vertical_lite.html
  27. 3 3
      template/scripts/BxBaseReport.php
  28. 30 1
      template/scripts/BxBaseSearchExtended.php

+ 1 - 1
inc/classes/BxDolAccount.php

@@ -842,7 +842,7 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
     {
         $iAccountId = (int)BxDolProfile::getInstance($iProfileId)->getAccountId();
         if(isAdmin($iAccountId) && $iAccountId == (int)$aContentInfo['id'])
-            return _t('_sys_txt_access_denied');
+            return _t('_sys_txt_account_cannot_delete');
 
         $aCheck = checkActionModule($iProfileId, 'delete account', 'system', $isPerformAction);
         if ($aCheck[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)

+ 1 - 1
inc/classes/BxDolMetatags.php

@@ -315,7 +315,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
         $s = preg_replace("/<a\b((?!bx-mention-link)[^>])*>(.*?)<\/a>/si", '', $s);
 
         //--- Strip the other HTML tags.
-        $s = strip_tags(str_replace(array('<br>', '<br />', '<hr>', '<hr />', '</p>'), "\n", $s));
+        $s = strip_tags(str_replace(array('<br>', '<br />', '<hr>', '<hr />', '</p>', '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>'), "\n", $s));
 
         // process spaces
         $s = str_ireplace('&nbsp;', ' ', $s);

+ 8 - 1
inc/classes/BxDolReport.php

@@ -282,7 +282,14 @@ class BxDolReport extends BxDolObject
 
     protected function _getTitleDoReport($bPerformed)
     {
-    	return $bPerformed && $this->isUndo() ? '_report_do_unreport' : '_report_do_report';
+        if($bPerformed && $this->isUndo())
+            return ['_report_do_unreport'];
+
+        $sSample = '_' . $this->_sSystem . '_txt_sample_single';
+        if(($$sSample = _t($sSample)) && strcmp($sSample, $$sSample) != 0)
+            return ['_report_do_report_with_sample', $$sSample];
+
+    	return ['_report_do_report'];
     }
 
     protected function _getFormObject()

+ 11 - 11
inc/classes/BxDolStorage.php

@@ -54,7 +54,7 @@ define('BX_DOL_STORAGE_ERR_NOT_IMPLEMENTED', 5005); ///< this feature isn't impl
 
 define('BX_DOL_STORAGE_DEFAULT_MIME_TYPE', 'octet/stream'); ///< default mime type if it is not find by extension
 
-define('BX_DOL_STORAGE_DEFAULT_ICON', 'mime-type-any.png'); ///< default icon if no other icon can be determined by file extension
+define('BX_DOL_STORAGE_DEFAULT_ICON', 'mime-type-any.svg'); ///< default icon if no other icon can be determined by file extension
 define('BX_DOL_STORAGE_DEFAULT_ICON_FONT', 'far file'); ///< default font icon if no other icon can be determined by file extension
 
 define('BX_DOL_STORAGE_QUEUED_DELETIONS_PER_RUN', 200); ///< max number of file deletions per one cron run, @see BxDolStorage::pruneDeletions
@@ -970,16 +970,16 @@ abstract class BxDolStorage extends BxDolFactory implements iBxDolFactoryObject
         );
         
         $aIcons = array (
-            'mime-type-psd.png' => array('psd'),
-            'mime-type-png.png' => array('png'),
-            'mime-type-image.png' => 'image/',
-            'mime-type-video.png' => 'video/',
-            'mime-type-audio.png' => 'audio/',
-            'mime-type-presentation.png' => array('ppt', 'pptx', 'sxi', 'sti', 'odp', 'sdp', 'sdd'),
-            'mime-type-spreadsheet.png' => array('xls', 'xlt', 'xlsx', 'sxc', 'stc', 'ods', 'ots', 'sdc', 'csv', 'dif', 'slk', 'pxl'),
-            'mime-type-document.png' => array('doc', 'docx', 'odt', 'ott', 'sxw', 'stw', 'rtf', 'sdw', 'txt', 'pdb', 'psw', 'pdf'),
-            'mime-type-vector.png' => array('ac5', 'ac6', 'aff', 'agd1', 'ai', 'ait', 'art', 'awg', 'b2f', 'cag', 'cbd', 'cdl', 'cdr', 'cdr3', 'cdr4', 'cdr5', 'cdr6', 'cdrw', 'cdx', 'cgm', 'cht', 'cil', 'cit', 'cnv', 'csl', 'ctn', 'cv5', 'cvg', 'cvi', 'cvl', 'cvs', 'cvx', 'dcs', 'ddoc', 'ddrw', 'ded', 'design', 'dmw', 'do', 'dpp', 'dpr', 'draw', 'drw', 'dsf', 'dsf', 'dsx', 'dvg', 'dxb', 'emb', 'evf', 'fcd', 'fh', 'fhd', 'fmv', 'fs', 'ft10', 'ft11', 'ft9', 'ft8', 'gem', 'gl2', 'graffle', 'gsd', 'gsd', 'hpg', 'hpgl', 'hpgl2', 'hpl', 'hplj', 'hpp', 'hppcl', 'idw', 'ima', 'macdraw', 'mgcb', 'mgs', 'mvg', 'nap', 'naplps', 'odg', 'p10', 'pat', 'pct', 'pd', 'pdw', 'pgs', 'pic', 'pif', 'pix', 'plo', 'plot', 'plt', 'ps', 'psid', 'pws', 'rdl', 's57', 'sdw', 'sif', 'sk2', 'slddwg', 'sp', 'spa', 'svf', 'svg', 'svgb', 'svgz', 'sxd', 'tdr', 'tlc', 'tng', 'vbr', 'vec', 'vect', 'veh', 'vml', 'vss', 'web', 'web', 'web', 'yal'),
-            'mime-type-archive.png' => array('7z', '7zip', 'aar', 'ace', 'alz', 'arj', 'bz2', 'bza', 'bzip2', 'bzp', 'bzp2', 'cab', 'czip', 'gnutar', 'gz', 'gza', 'gzi', 'gzip', 'ha', 'lhz', 'lzma', 'pzip', 'rar', 'roo', 's7z', 'tar', 'tar-gz', 'tar-lzma', 'tar-z', 'taz', 'tbz', 'tbz2', 'tgz', 'tz', 'z', 'zip', 'zipx', 'zix', 'zoo'),
+            'mime-type-psd.svg' => array('psd'),
+            'mime-type-png.svg' => array('png'),
+            'mime-type-image.svg' => 'image/',
+            'mime-type-video.svg' => 'video/',
+            'mime-type-audio.svg' => 'audio/',
+            'mime-type-presentation.svg' => array('ppt', 'pptx', 'sxi', 'sti', 'odp', 'sdp', 'sdd'),
+            'mime-type-spreadsheet.svg' => array('xls', 'xlt', 'xlsx', 'sxc', 'stc', 'ods', 'ots', 'sdc', 'csv', 'dif', 'slk', 'pxl'),
+            'mime-type-document.svg' => array('doc', 'docx', 'odt', 'ott', 'sxw', 'stw', 'rtf', 'sdw', 'txt', 'pdb', 'psw', 'pdf'),
+            'mime-type-vector.svg' => array('ac5', 'ac6', 'aff', 'agd1', 'ai', 'ait', 'art', 'awg', 'b2f', 'cag', 'cbd', 'cdl', 'cdr', 'cdr3', 'cdr4', 'cdr5', 'cdr6', 'cdrw', 'cdx', 'cgm', 'cht', 'cil', 'cit', 'cnv', 'csl', 'ctn', 'cv5', 'cvg', 'cvi', 'cvl', 'cvs', 'cvx', 'dcs', 'ddoc', 'ddrw', 'ded', 'design', 'dmw', 'do', 'dpp', 'dpr', 'draw', 'drw', 'dsf', 'dsf', 'dsx', 'dvg', 'dxb', 'emb', 'evf', 'fcd', 'fh', 'fhd', 'fmv', 'fs', 'ft10', 'ft11', 'ft9', 'ft8', 'gem', 'gl2', 'graffle', 'gsd', 'gsd', 'hpg', 'hpgl', 'hpgl2', 'hpl', 'hplj', 'hpp', 'hppcl', 'idw', 'ima', 'macdraw', 'mgcb', 'mgs', 'mvg', 'nap', 'naplps', 'odg', 'p10', 'pat', 'pct', 'pd', 'pdw', 'pgs', 'pic', 'pif', 'pix', 'plo', 'plot', 'plt', 'ps', 'psid', 'pws', 'rdl', 's57', 'sdw', 'sif', 'sk2', 'slddwg', 'sp', 'spa', 'svf', 'svg', 'svgb', 'svgz', 'sxd', 'tdr', 'tlc', 'tng', 'vbr', 'vec', 'vect', 'veh', 'vml', 'vss', 'web', 'web', 'web', 'yal'),
+            'mime-type-archive.svg' => array('7z', '7zip', 'aar', 'ace', 'alz', 'arj', 'bz2', 'bza', 'bzip2', 'bzp', 'bzp2', 'cab', 'czip', 'gnutar', 'gz', 'gza', 'gzi', 'gzip', 'ha', 'lhz', 'lzma', 'pzip', 'rar', 'roo', 's7z', 'tar', 'tar-gz', 'tar-lzma', 'tar-z', 'taz', 'tbz', 'tbz2', 'tgz', 'tz', 'z', 'zip', 'zipx', 'zix', 'zoo'),
         );
 
         $f = fopen ($sFile, 'r');

Разница между файлами не показана из-за своего большого размера
+ 220 - 220
install/sql/system.sql


+ 1 - 1
modules/boonex/artificer/data/template/system/menu_vertical.html

@@ -5,7 +5,7 @@
                 <span class="bx-menu-item-icon bx-stl-mii group-hover:text-gray-700 dark:group-hover:text-gray-300">
                     <bx_include_auto:menu_icon.html />
                 </span>
-                <span class="bx-menu-item-title bx-stl-mit">__title__</span>
+                <span class="bx-menu-item-title bx-stl-mit" sidebar-toggle-item>__title__</span>
             </a>
         </li>
     </bx_repeat:menu_items>

+ 2 - 2
modules/boonex/artificer/data/template/system/menu_vertical_lite.html

@@ -5,8 +5,8 @@
                 <span class="bx-menu-item-icon bx-stl-mii group-hover:text-gray-700 dark:group-hover:text-gray-300">
                     <bx_include_auto:menu_icon.html />
                 </span>
-                <span class="bx-menu-item-title bx-stl-mit">__title__</span>
+                <span class="bx-menu-item-title bx-stl-mit" sidebar-toggle-item>__title__</span>
             </a>
         </li>
     </bx_repeat:menu_items>
-</ul>
+</ul>

+ 5 - 3
modules/boonex/english/data/langs/system/en.xml

@@ -100,6 +100,7 @@
         <string name="_report_status_all"><![CDATA[All]]></string>
 	<string name="_report_counter"><![CDATA[{0}]]></string>
 	<string name="_report_do_report"><![CDATA[Report]]></string>
+        <string name="_report_do_report_with_sample"><![CDATA[Report {0}]]></string>
         <string name="_report_do_unreport"><![CDATA[Cancel report]]></string>
         <string name="_report_do_unreport_confirm"><![CDATA[Are you sure, you want to cancel your report?]]></string>
 	<string name="_report_do_report_by"><![CDATA[Reported by]]></string>
@@ -3618,9 +3619,9 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_tour_homepage_account_menu_txt"><![CDATA[Add and manage profiles, check notifications, access account settings. Admins and Moderators can use it to access Dash with links to site content and profiles management.]]></string>
 
     <string name="_sys_txt_api_key"><![CDATA[API Key]]></string>
-	<string name="_sys_txt_access_denied"><![CDATA[Access denied]]></string>
-	<string name="_sys_txt_account_pending"><![CDATA[Your account is pending approval, please wait until it is activated.]]></string>
-	<string name="_sys_txt_account_profile_context_change_suggestion"><![CDATA[This is your profile, you can <a href="{0}">change your current profile</a> to this profile]]></string>
+    <string name="_sys_txt_access_denied"><![CDATA[Access denied]]></string>
+    <string name="_sys_txt_account_pending"><![CDATA[Your account is pending approval, please wait until it is activated.]]></string>
+    <string name="_sys_txt_account_profile_context_change_suggestion"><![CDATA[This is your profile, you can <a href="{0}">change your current profile</a> to this profile]]></string>
     <string name="_sys_txt_account_profile_context_change_to_another_suggestion"><![CDATA[You can <a href="{0}">change your current profile</a> to this profile]]></string>
     <string name="_sys_txt_account_profile_context_changed_success"><![CDATA[Current profile has been successfully changed to: <b>{0}</b>]]></string>
     <string name="_sys_txt_account_suspended"><![CDATA[Your account is suspended.]]></string>
@@ -3628,6 +3629,7 @@ If it is not enabled then please consider implement this optimization, since it
     <string name="_sys_txt_account_unconfirmed_phone"><![CDATA[Your phone is unconfirmed. Please, confirm it on <a href="{0}">verification page</a>.]]></string>
     <string name="_sys_txt_account_profile_system"><![CDATA[Please <a href="{0}">create a profile</a> to start using the site.]]></string>
     <string name="_sys_txt_account_need_to_change_password"><![CDATA[Your password has been expired. Please <a href="{0}">change your password</a>.]]></string>
+    <string name="_sys_txt_account_cannot_delete"><![CDATA[Cannot delete the only Operator account]]></string>
     
     <string name="_sys_txt_captcha_not_available"><![CDATA[CAPTCHA not available]]></string>
     <string name="_sys_txt_categories_button_caption_add"><![CDATA[Add]]></string>

+ 23 - 21
modules/boonex/files/classes/BxFilesModule.php

@@ -243,43 +243,45 @@ class BxFilesModule extends BxBaseModTextModule
         if ($aFiles) foreach ($aFiles as $sFile) @unlink($sFile);
     }
 
-    protected function _getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams = array())
+    protected function _getFilesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
     {
-        $aResult = parent::_getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams);
+        $CNF = &$this->_oConfig->CNF;
 
         $aFile = $this->getContentFile($aContentInfo);
-        if (!$aFile['is_image']) {
-            $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->CNF['OBJECT_STORAGE']);
-            $sIcon = $oStorage ? $oStorage->getFontIconNameByFileName($aFile['file_name']) : 'far file';
-
-            $aResult['raw'] = $this->_oTemplate->parseHtmlByName('timeline_post.html', array(
-                'title' => $aResult['title'],
-                'title_attr' => bx_html_attribute($aResult['title']),
-                'url' => $aResult['url'],
-                'icon' => $sIcon,
-            ));
-            $aResult['title'] = '';
-        }
-
-        return $aResult;
+        if(!$aFile || $aFile['is_image'])
+            return [];
+
+        $sIconSrc = '';
+        if(($oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE'])) !== false)
+            $sIconSrc = $this->_oTemplate->getIconUrl($oStorage->getIconNameByFileName($aFile['file_name']));
+
+        return [[
+            'id' => $aFile['id'],
+            'src' => $sIconSrc,
+            'src_medium' => $sIconSrc,
+            'src_orig' => '',
+            'url' => $sUrl
+        ]];
     }
 
     protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
     {
         $aFile = $this->getContentFile($aContentInfo);
         if (!$aFile)
-            return array();
+            return [];
 
         if (!$aFile['is_image'])
-            return array();
+            return [];
 
         $sPhotoThumb = '';
         if ($oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->CNF['OBJECT_IMAGES_TRANSCODER_GALLERY']))
             $sPhotoThumb = $oImagesTranscoder->getFileUrl($aFile['id']);
 
-        return array(
-            array('id' => $aFile['id'], 'url' => $sUrl, 'src' => $sPhotoThumb),
-        );
+        return [[
+            'id' => $aFile['id'], 
+            'url' => $sUrl, 
+            'src' => $sPhotoThumb
+        ]];
     }
 
     public function actionBookmark($iContentId) {

+ 3 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -100,6 +100,7 @@
   <string name="_report_status_all"><![CDATA[Все]]></string>
 	<string name="_report_counter"><![CDATA[{0}]]></string>
 	<string name="_report_do_report"><![CDATA[Пожаловаться]]></string>
+        <string name="_report_do_report_with_sample"><![CDATA[Пожаловаться]]></string>
         <string name="_report_do_unreport"><![CDATA[Отменить жалобу]]></string>
         <string name="_report_do_unreport_confirm"><![CDATA[Вы уверены, что хотите отменить свою жалобу?]]></string>
 	<string name="_report_do_report_by"><![CDATA[Пожаловались]]></string>
@@ -3559,6 +3560,8 @@
     <string name="_sys_txt_account_unconfirmed_phone"><![CDATA[Ваш телефон не подтверждён. Пожалуйста, подтвердите его на  <a href="{0}">странице верификации</a>.]]></string>
     <string name="_sys_txt_account_profile_system"><![CDATA[Пожалуйста, <a href="{0}">создайте профиль</a>, чтобы начать пользоваться сайтом.]]></string>
     <string name="_sys_txt_account_need_to_change_password"><![CDATA[Ваш пароль устарел. Пожалуйста <a href="{0}">измените Ваш пароль</a>.]]></string>
+    <string name="_sys_txt_account_cannot_delete"><![CDATA[Невозможно удалить единственную учетную запись оператора.]]></string>
+
     <string name="_sys_txt_captcha_not_available"><![CDATA[CAPTCHA недоступна]]></string>
     <string name="_sys_txt_change_image"><![CDATA[Изменить картинку]]></string>
     <string name="_sys_txt_cmt_loading"><![CDATA[Загрузка...]]></string>

+ 2 - 2
modules/boonex/timeline/template/type_post.html

@@ -16,9 +16,9 @@
     </div>
 </bx_if:show_videos>
 <bx_if:show_files>
-    <div class="__style_prefix__-item-files __style_prefix__-if-main __style_prefix__-if-__display__ mx-1 mt-2 rounded">
+    <div class="__style_prefix__-item-files __style_prefix__-if-main __style_prefix__-if-__display__ mt-3 md:mt-4 rounded">
         <bx_repeat:items>
-            <div class="__style_prefix__-item-file rounded">__item__</div>
+            <div class="__style_prefix__-item-file flex-shrink-0 px-4 rounded">__item__</div>
         </bx_repeat:items>
     </div>
 </bx_if:show_files>

+ 1 - 0
studio/template/scripts/BxBaseStudioDesigner.php

@@ -193,6 +193,7 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
                 'type' => 'files',
                 'name' => $sLogo,
                 'storage_object' => $aLogo['storage'],
+                'storage_private' => 0,
                 'images_transcoder' => $aLogo['transcoder'],
                 'uploaders' => ['sys_html5'],
                 'multiple' => false,

+ 1 - 3
template/_header_js.html

@@ -9,11 +9,9 @@
 
     (function(w) {
         var dpr = (w.devicePixelRatio === undefined ? 1 : Math.round(w.devicePixelRatio));
-        if ($.cookie('devicePixelRatio') == dpr || dpr < 2 || (typeof(bIgnorePixelRatio) != "undefined" && bIgnorePixelRatio) || !navigator.cookieEnabled || '#dpr' === window.location.hash) 
+        if ($.cookie('devicePixelRatio') == dpr || dpr < 2 || (typeof(bIgnorePixelRatio) != "undefined" && bIgnorePixelRatio) || !navigator.cookieEnabled) 
             return;
         $.cookie('devicePixelRatio', dpr, {expires: 365, path: '/'});
-        if (!window.location.hash.length)
-            window.location.hash = 'dpr';
         window.location.reload();
     })(window);
 

+ 7 - 0
template/images/icons/mime-type-any.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-archive.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M200,224a8,8,0,0,0,8-8V88L152,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="104" y1="224" x2="104" y2="112" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="88" y1="160" x2="120" y2="160" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="88" y1="128" x2="120" y2="128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="88" y1="192" x2="120" y2="192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-audio.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="48 200 48 160 72 160 96 136 96 224 72 200 48 200" opacity="0.2"/><polygon points="48 200 48 160 72 160 96 136 96 224 72 200 48 200" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M128,152a32.5,32.5,0,0,1,0,56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M168,224h32a8,8,0,0,0,8-8V88L152,32H56a8,8,0,0,0-8,8v80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-document.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M36,152v56H52a28,28,0,0,0,0-56Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M216,200.87A22.12,22.12,0,0,1,200,208c-13.26,0-24-12.54-24-28s10.74-28,24-28a22.12,22.12,0,0,1,16,7.13" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><ellipse cx="128" cy="180" rx="24" ry="28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-image.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 224 104 152 76.36 193.46 60 168 24 224 152 224" opacity="0.2"/><polygon points="152 224 104 152 76.36 193.46 60 168 24 224 152 224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M192,224h8a8,8,0,0,0,8-8V88L152,32H56a8,8,0,0,0-8,8v96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-png.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M44,192H60a20,20,0,0,0,0-40H44v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M208,184h8v16.87A22.12,22.12,0,0,1,200,208c-13.25,0-24-12.54-24-28s10.75-28,24-28a21.28,21.28,0,0,1,12,3.75" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="108 208 108 152 148 208 148 152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-presentation.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="216" y1="152" x2="176" y2="152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="196" y1="152" x2="196" y2="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M48,192H64a20,20,0,0,0,0-40H48v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M116,192h16a20,20,0,0,0,0-40H116v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-psd.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 224 104 152 76.36 193.46 60 168 24 224 152 224" opacity="0.2"/><polygon points="152 224 104 152 76.36 193.46 60 168 24 224 152 224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M192,224h8a8,8,0,0,0,8-8V88L152,32H56a8,8,0,0,0-8,8v96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-spreadsheet.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="148 208 120 208 120 152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="48" y1="152" x2="88" y2="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="88" y1="152" x2="48" y2="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M203.9,153.6s-29.43-7.78-31.8,11,38.43,10.12,35.78,30.72c-2.47,19.16-31.78,11-31.78,11" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-vector.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+    
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M75.9,153.6s-29.43-7.78-31.8,11,38.43,10.12,35.78,30.72c-2.47,19.16-31.78,11-31.78,11" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polyline points="104 152 124 208 144 152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M200,184h8v16.87A22.12,22.12,0,0,1,192,208c-13.25,0-24-12.54-24-28s10.75-28,24-28a21.28,21.28,0,0,1,12,3.75" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 7 - 0
template/images/icons/mime-type-video.svg

@@ -0,0 +1,7 @@
+<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" style="box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
+    <!-- Rounded rectangle with background and border -->
+    <rect x="1" y="1" width="94" height="94" fill="rgba(107, 114, 128, 0.2)" stroke="rgba(107, 114, 128, 0.2)" rx="12" ry="12"></rect>
+
+    <!-- Nested SVG containing the icon -->
+    <svg x="32" y="32" width="32" height="32" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><path d="M112,175.67V168a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8h56a8,8,0,0,0,8-8v-8.82L144,216V160Z" opacity="0.2"/><polyline points="112 175.67 144 160 144 216 112 199.18" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><rect x="40" y="160" width="72" height="56" rx="8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><polygon points="152 32 152 88 208 88 152 32" opacity="0.2"/><polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M176,224h24a8,8,0,0,0,8-8V88L152,32H56a8,8,0,0,0-8,8v88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
+</svg>

+ 1 - 1
template/menu_vertical.html

@@ -4,7 +4,7 @@
             <a class="__name__" href="__link__" <bx_if:onclick>onclick="__onclick__"</bx_if:onclick> __attrs__>
                 <div class="bx-def-padding-sec">
                     <bx_include_auto:menu_icon.html />
-					<span>__title__</span>
+                    <span sidebar-toggle-item>__title__</span>
                 </div>
             </a>
         </li>

+ 1 - 1
template/menu_vertical_lite.html

@@ -4,7 +4,7 @@
             <a href="__link__" <bx_if:onclick>onclick="__onclick__"</bx_if:onclick> __attrs__>
                 <bx_include_auto:menu_icon.html />
                 <bx_if:image_inline>__image__</bx_if:image_inline>
-                <span>__title__</span>
+                <span sidebar-toggle-item>__title__</span>
             </a>
         </li>
     </bx_repeat:menu_items>

+ 3 - 3
template/scripts/BxBaseReport.php

@@ -232,7 +232,7 @@ class BxBaseReport extends BxDolReport
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['do_link'],
             'class' => $sClass,
-            'title' => bx_html_attribute(_t($this->_getTitleDoReport($bReported))),
+            'title' => bx_html_attribute(call_user_func_array('_t', $this->_getTitleDoReport($bReported))),
         	'bx_if:show_onclick' => array(
                     'condition' => !$bDisabled,
                     'content' => array(
@@ -264,7 +264,7 @@ class BxBaseReport extends BxDolReport
                 'condition' => isset($aParams['show_do_report_label']) && $aParams['show_do_report_label'] == true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
-                    'text' => _t($this->_getTitleDoReport($bReported))
+                    'text' => call_user_func_array('_t', $this->_getTitleDoReport($bReported))
                 )
             )
         ));
@@ -434,7 +434,7 @@ class BxBaseReport extends BxDolReport
             'count' => $aData['count'], 
             'countf' => (int)$aData['count'] > 0 ? $this->_getCounterLabel($aData['count']) : '',
             'label_icon' => $this->_getIconDoReport($bPerformed),
-            'label_title' => _t($this->_getTitleDoReport($bPerformed)),
+            'label_title' => call_user_func_array('_t', $this->_getTitleDoReport($bPerformed)),
             'disabled' => $bPerformed && !$bUndo,
         );
     }

+ 30 - 1
template/scripts/BxBaseSearchExtended.php

@@ -274,6 +274,7 @@ class BxBaseSearchExtended extends BxDolSearchExtended
                     'uri_title' => '',
                     'submit_name' => $sFormSubmit
                 ),
+                'checker_helper' => 'BxBaseSearchExtendedFormCheckerHelper',
             ),
             'inputs' => array()
         );
@@ -314,7 +315,7 @@ class BxBaseSearchExtended extends BxDolSearchExtended
                 'value' => $aField['search_value'],
                 'attrs' => $aAttrs,
                 'db' => array(
-                    'pass' => !empty($aField['pass']) ? $aField['pass'] : 'Xss'
+                    'pass' => 'datepicker_range_age' === $aField['search_type'] ? 'AgeRange' : (!empty($aField['pass']) ? $aField['pass'] : 'Xss')
                 )
             );
 
@@ -346,4 +347,32 @@ class BxBaseSearchExtended extends BxDolSearchExtended
     }
 }
 
+class BxBaseSearchExtendedFormCheckerHelper extends BxDolFormCheckerHelper
+{
+    static public function passAgeRange ($s)
+    {
+        if (is_array($s)) {
+            $a = array ();
+            foreach ($s as $k => $v)
+                $a[$k] = self::_passAgeRange ($v);
+            return $a;
+        }
+        return self::_passAgeRange ($s);
+    }
+
+    static public function _passAgeRange ($s)
+    {
+        $a = explode ('-', $s);
+        if (!$a || count($a) != 2)
+            return $s;
+        $i0 = new \DateInterval("P".(int)$a[0]."Y");
+        $i1 = new \DateInterval("P".(int)$a[1]."Y");
+
+        return [
+            (new DateTime("now", new DateTimeZone('UTC')))->sub($i1)->format("Y-m-d"),
+            (new DateTime("now", new DateTimeZone('UTC')))->sub($i0)->format("Y-m-d"),
+        ];
+    }
+}
+
 /** @} */

Некоторые файлы не были показаны из-за большого количества измененных файлов