Преглед изворни кода

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

AntonLV пре 4 година
родитељ
комит
970fdfd6ad

+ 3 - 3
inc/classes/BxDolLanguages.php

@@ -261,11 +261,11 @@ class BxDolLanguages extends BxDolFactory implements iBxDolSingleton
     {
     {
         $iTime = (int)$iTime;
         $iTime = (int)$iTime;
 
 
-        $sFormat = '%M:%S';
+        $sFormat = 'i:s';
         if($iTime > 3600)
         if($iTime > 3600)
-            $sFormat = '%H:' . $sFormat;
+            $sFormat = 'H:' . $sFormat;
 
 
-        return strftime($sFormat, $iTime);
+        return date($sFormat, $iTime);
     }
     }
 
 
     function _t_format_currency ($fPrice, $iPrecision = 2, $bFormatThousands = true)
     function _t_format_currency ($fPrice, $iPrecision = 2, $bFormatThousands = true)

+ 1 - 0
inc/js/classes/BxDolUploader.js

@@ -433,6 +433,7 @@ BxDolUploaderSimple.prototype.getMimeTypefromString  = function (ext) {
         'xvid'   : 'video/xvid',
         'xvid'   : 'video/xvid',
         
         
         'xwd'    : 'image/x-xwindowdump',
         'xwd'    : 'image/x-xwindowdump',
+        'svg'    : 'image/svg+xml',
         'zip'    : ['application/zip', 'application/x-zip-compressed']
         'zip'    : ['application/zip', 'application/x-zip-compressed']
        
        
     }
     }

+ 2 - 2
modules/boonex/events/classes/BxEventsFormEntry.php

@@ -236,7 +236,7 @@ class BxEventsFormEntry extends BxBaseModGroupsFormEntry
             $aInput['value'] = '';
             $aInput['value'] = '';
         else {
         else {
             if ($aStartEnd['start']->format('Y-m-d') == $aStartEnd['end']->format('Y-m-d'))
             if ($aStartEnd['start']->format('Y-m-d') == $aStartEnd['end']->format('Y-m-d'))
-                $aInput['value'] = _t('_bx_events_txt_from_time_to_time', strftime(getParam('bx_events_time_format'), $aStartEnd['start']->getTimestamp()), strftime(getParam('bx_events_time_format'), $aStartEnd['end']->getTimestamp()));
+                $aInput['value'] = _t('_bx_events_txt_from_time_to_time', date(getParam('bx_events_time_format'), $aStartEnd['start']->getTimestamp()), date(getParam('bx_events_time_format'), $aStartEnd['end']->getTimestamp()));
             else
             else
                 $aInput['value'] = '';
                 $aInput['value'] = '';
         }
         }
@@ -256,7 +256,7 @@ class BxEventsFormEntry extends BxBaseModGroupsFormEntry
 
 
             $sFormat = getParam($aStartEnd['start']->format('Y-m-d') == $aStartEnd['end']->format('Y-m-d') ? 'bx_events_short_date_format' : 'bx_events_datetime_format');
             $sFormat = getParam($aStartEnd['start']->format('Y-m-d') == $aStartEnd['end']->format('Y-m-d') ? 'bx_events_short_date_format' : 'bx_events_datetime_format');
             $oDate = 'date_start' == $aInput['name'] ? $aStartEnd['start'] : $aStartEnd['end'];
             $oDate = 'date_start' == $aInput['name'] ? $aStartEnd['start'] : $aStartEnd['end'];
-            return strftime($sFormat, $oDate->getTimestamp());
+            return date($sFormat, $oDate->getTimestamp());
         }
         }
         return parent::genViewRowValue($aInput);
         return parent::genViewRowValue($aInput);
     }
     }

+ 2 - 2
modules/boonex/events/classes/BxEventsModule.php

@@ -364,7 +364,7 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
             'bx_if:date' => [
             'bx_if:date' => [
                 'condition' => $oDateStart && $oDateEnd,
                 'condition' => $oDateStart && $oDateEnd,
                 'content' => [
                 'content' => [
-                    'date' => $oDateStart && $oDateEnd ? (strftime(getParam('bx_events_short_date_format'), $oDateStart->getTimestamp()) . ($oDateStart->format('ymd') == $oDateEnd->format('ymd') ? '' : ' - ' . strftime(getParam('bx_events_short_date_format'), $oDateEnd->getTimestamp()))) : '',
+                    'date' => $oDateStart && $oDateEnd ? (date(getParam('bx_events_short_date_format'), $oDateStart->getTimestamp()) . ($oDateStart->format('ymd') == $oDateEnd->format('ymd') ? '' : ' - ' . date(getParam('bx_events_short_date_format'), $oDateEnd->getTimestamp()))) : '',
                     'date_c' => $oDateStart->format('c'),
                     'date_c' => $oDateStart->format('c'),
             ]],
             ]],
             'bx_if:location' => array(
             'bx_if:location' => array(
@@ -463,7 +463,7 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
         $oDateBegin->setTimestamp($aContentInfo['start_utc']);
         $oDateBegin->setTimestamp($aContentInfo['start_utc']);
         $oDateBegin->setTimezone(new DateTimeZone($aContentInfo['timezone'] ? $aContentInfo['timezone'] : 'UTC'));
         $oDateBegin->setTimezone(new DateTimeZone($aContentInfo['timezone'] ? $aContentInfo['timezone'] : 'UTC'));
         $sEntryBegin = $oDateBegin->format('r');
         $sEntryBegin = $oDateBegin->format('r');
-        $sEntryBeginShort = strftime(getParam('bx_events_short_date_format'), $oDateBegin->getTimestamp());
+        $sEntryBeginShort = date(getParam('bx_events_short_date_format'), $oDateBegin->getTimestamp());
         $oDateBegin->setTimezone(new DateTimeZone('UTC'));
         $oDateBegin->setTimezone(new DateTimeZone('UTC'));
         $sEntryBeginUTC = $oDateBegin->format('c');
         $sEntryBeginUTC = $oDateBegin->format('c');
 
 

+ 2 - 2
modules/boonex/events/classes/BxEventsTemplate.php

@@ -43,9 +43,9 @@ class BxEventsTemplate extends BxBaseModGroupsTemplate
 
 
         return array_merge($aVars, array(
         return array_merge($aVars, array(
 			'date_start' => $aData['date_start'],
 			'date_start' => $aData['date_start'],
-			'date_start_f' => strftime('%e %b', $oDateStart->getTimestamp()),
+			'date_start_f' => date(getParam('bx_events_short_date_format'), $oDateStart->getTimestamp()),
 			'date_end' => $aData['date_end'],
 			'date_end' => $aData['date_end'],
-			'date_end_f' => strftime('%e %b', $oDateEnd->getTimestamp()),
+			'date_end_f' => date(getParam('bx_events_short_date_format'), $oDateEnd->getTimestamp()),
         ));
         ));
     }
     }
 }
 }

+ 3 - 3
modules/boonex/events/install/sql/enable.sql

@@ -18,9 +18,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_events_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_events_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_events_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
 ('bx_events_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
 ('bx_events_per_page_for_favorites_lists', '5', @iCategId, '_bx_events_option_per_page_for_favorites_lists', 'digit', '', '', '', 17),
 ('bx_events_per_page_for_favorites_lists', '5', @iCategId, '_bx_events_option_per_page_for_favorites_lists', 'digit', '', '', '', 17),
-('bx_events_time_format', '%H:%M', @iCategId, '_bx_events_option_time_format', 'digit', '', '', '', 20),
-('bx_events_short_date_format', '%e %b %Y', @iCategId, '_bx_events_option_short_date_format', 'digit', '', '', '', 22),
-('bx_events_datetime_format', '%e %b %Y %H:%M', @iCategId, '_bx_events_option_datetime_format', 'digit', '', '', '', 23),
+('bx_events_time_format', 'H:i', @iCategId, '_bx_events_option_time_format', 'digit', '', '', '', 20),
+('bx_events_short_date_format', 'j/n/Y', @iCategId, '_bx_events_option_short_date_format', 'digit', '', '', '', 22),
+('bx_events_datetime_format', 'j/n/Y H:i', @iCategId, '_bx_events_option_datetime_format', 'digit', '', '', '', 23),
 ('bx_events_summary_chars', '700', @iCategId, '_bx_events_option_summary_chars', 'digit', '', '', '', 25),
 ('bx_events_summary_chars', '700', @iCategId, '_bx_events_option_summary_chars', 'digit', '', '', '', 25),
 ('bx_events_searchable_fields', 'event_name,event_desc', @iCategId, '_bx_events_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_events";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30),
 ('bx_events_searchable_fields', 'event_name,event_desc', @iCategId, '_bx_events_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_events";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30),
 ('bx_events_members_mode', '', @iCategId, '_bx_events_option_members_mode', 'select', 'a:2:{s:6:"module";s:9:"bx_events";s:6:"method";s:24:"get_options_members_mode";}', '', '', 40),
 ('bx_events_members_mode', '', @iCategId, '_bx_events_option_members_mode', 'select', 'a:2:{s:6:"module";s:9:"bx_events";s:6:"method";s:24:"get_options_members_mode";}', '', '', 40),

+ 1 - 2
template/_header_js.html

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