Plugin Directory

Changeset 2971623


Ignore:
Timestamp:
09/26/2023 05:42:22 AM (3 years ago)
Author:
nikmelnik
Message:

Релиз версии 1.0.2 плагина Realbig

Изменения версии:

  • исправили ошибку с автосинхронизацией плагина для litespeed серверов;
  • другие мелкие улучшения и правки.
Location:
realbig-media/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • realbig-media/trunk/README.MD

    r2896400 r2971623  
    33Tags: AD, content filling
    44Requires at least: 4.5
    5 Tested up to: 6.2
     5Tested up to: 6.3
    66Stable tag: 0.1.26.56
    77Requires PHP: 5.6
     
    108108== Changelog ==
    109109
     110= 1.0.3 =
     111
     112Изменения версии:
     113
     114* исправили ошибку с автосинхронизацией плагина для litespeed серверов;
     115* другие мелкие улучшения и правки.
     116
    110117= 1.0.2 =
    111118
  • realbig-media/trunk/README.txt

    r2896400 r2971623  
    33Tags: AD, content filling
    44Requires at least: 4.5
    5 Tested up to: 6.2
     5Tested up to: 6.3
    66Stable tag: 0.1.26.56
    77Requires PHP: 5.6
     
    108108== Changelog ==
    109109
     110= 1.0.3 =
     111
     112Изменения версии:
     113
     114* исправили ошибку с автосинхронизацией плагина для litespeed серверов;
     115* другие мелкие улучшения и правки.
     116
    110117= 1.0.2 =
    111118
  • realbig-media/trunk/RFWP_Cache.php

    r2896400 r2971623  
    99        const DESKTOP_CACHE = "rb_desktop_cache_timeout";
    1010
    11         const CACHE = "rb_cache_timeout";
     11        const CACHE_TIMEOUT = "rb_cache_timeout";
    1212        const ACTIVE_CACHE = "rb_active_cache";
    1313        const LONG_CACHE = "rb_longCacheDeploy";
     
    1717
    1818        public static function getMobileCache() {
    19             return get_transient(self::MOBILE_CACHE);
     19            return self::getCache(self::MOBILE_CACHE);
    2020        }
    2121        public static function setMobileCache() {
    22             set_transient(self::MOBILE_CACHE, time()+(60*60), 60*60);
     22            self::setCache(self::MOBILE_CACHE, 60*60);
    2323        }
    2424
    2525        public static function getTabletCache() {
    26             return get_transient(self::TABLET_CACHE);
     26            return self::getCache(self::TABLET_CACHE);
    2727        }
    2828        public static function setTabletCache() {
    29             set_transient(self::TABLET_CACHE, time()+(60*60), 60*60);
     29            self::setCache(self::TABLET_CACHE, 60*60);
    3030        }
    3131
    3232        public static function getDesktopCache() {
    33             return get_transient(self::DESKTOP_CACHE);
     33            return self::getCache(self::DESKTOP_CACHE);
    3434        }
    3535        public static function setDesktopCache() {
    36             set_transient(self::DESKTOP_CACHE, time()+(60*60), 60*60);
     36            self::setCache(self::DESKTOP_CACHE, 60*60);
    3737        }
    3838
    39         public static function getCache() {
    40             return get_transient(self::CACHE);
     39        public static function getCacheTimeout() {
     40            return self::getCache(self::CACHE_TIMEOUT);
    4141        }
    42         public static function setCache() {
    43             set_transient(self::CACHE, time()+60, 60);
     42        public static function setCacheTimeout() {
     43            self::setCache(self::CACHE_TIMEOUT, 60);
    4444        }
    4545
    4646        public static function getActiveCache() {
    47             return get_transient(self::ACTIVE_CACHE);
     47            return self::getCache(self::ACTIVE_CACHE);
    4848        }
    4949        public static function setActiveCache() {
    50             set_transient(self::ACTIVE_CACHE, time()+5, 5);
     50            self::setCache(self::ACTIVE_CACHE, 5);
    5151        }
    5252        public static function deleteActiveCache() {
    53             delete_transient(self::ACTIVE_CACHE);
     53            self::deleteCache(self::ACTIVE_CACHE);
    5454        }
    5555
    5656        public static function getProcessCache() {
    57             return get_transient(self::PROCESS_CACHE);
     57            return self::getCache(self::PROCESS_CACHE);
    5858        }
    5959        public static function setProcessCache() {
    60             set_transient(self::PROCESS_CACHE, time()+30, 30);
     60            self::setCache(self::PROCESS_CACHE, 30);
    6161        }
    6262        public static function deleteProcessCache() {
    63             delete_transient(self::PROCESS_CACHE);
     63            self::deleteCache(self::PROCESS_CACHE);
    6464        }
    6565
    6666        public static function getAttemptCache() {
    67             return get_transient(self::ATTEMPT_CACHE);
     67            return self::getCache(self::ATTEMPT_CACHE);
    6868        }
    6969        public static function setAttemptCache() {
    7070            $period = RFWP_getPeriodSync();
    71             set_transient(self::ATTEMPT_CACHE, time()+$period, $period);
     71            self::setCache(self::ATTEMPT_CACHE, $period);
    7272        }
    7373        public static function deleteAttemptCache() {
    74             delete_transient(self::ATTEMPT_CACHE);
     74            self::deleteCache(self::ATTEMPT_CACHE);
    7575        }
    7676
     
    8181            } else {
    8282                if (!isset($GLOBALS['rb_longCache'])) {
    83                     $longCache = get_transient(self::LONG_CACHE);
     83                    $longCache = self::getCache(self::LONG_CACHE);
    8484                    $GLOBALS['rb_longCache'] = $longCache;
    8585                } else {
     
    9191
    9292        public static function setLongCache() {
    93             set_transient(self::LONG_CACHE, time()+300, 300);
     93            self::setCache(self::LONG_CACHE, 300);
    9494        }
    9595
    9696        public static function deleteCaches() {
    97             delete_transient(self::CACHE);
    98             delete_transient(self::LONG_CACHE);
    99            self::deleteDeviceCaches();
     97            self::deleteCache(self::CACHE_TIMEOUT);
     98            self::deleteCache(self::LONG_CACHE);
     99            self::deleteDeviceCaches();
    100100        }
    101101
    102102        public static function deleteDeviceCaches() {
    103             delete_transient(self::MOBILE_CACHE);
    104             delete_transient(self::TABLET_CACHE);
    105             delete_transient(self::DESKTOP_CACHE);
     103            self::deleteCache(self::MOBILE_CACHE);
     104            self::deleteCache(self::TABLET_CACHE);
     105            self::deleteCache(self::DESKTOP_CACHE);
    106106        }
    107107
     
    114114                                WHERE post_type IN ("rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new")');
    115115        }
     116
     117        private static function getCache($cache) {
     118            $item = get_transient($cache);
     119
     120            if (!empty($item) && time() > $item) {
     121                self::deleteAttemptCache();
     122                $item = false;
     123            }
     124
     125            return $item;
     126
     127        }
     128        private static function setCache($cache, $period) {
     129            set_transient($cache, time()+$period, $period);
     130        }
     131        private static function deleteCache($cache) {
     132            delete_transient($cache);
     133        }
    116134    }
    117135}
  • realbig-media/trunk/adminMenuAdd.php

    r2896400 r2971623  
    1818                'syncAttempt' =>RFWP_Cache::getAttemptCache(),
    1919                'syncProcess' =>RFWP_Cache::getProcessCache(),
    20                 'cache'       =>RFWP_Cache::getCache(),
     20                'cache'       =>RFWP_Cache::getCacheTimeout(),
    2121                'mobileCache' =>RFWP_Cache::getMobileCache(),
    2222                'tabletCache' =>RFWP_Cache::getTabletCache(),
  • realbig-media/trunk/asyncBlockInserting.js

    r2884028 r2971623  
    969969                    if (containerFor6th.length > 0) {
    970970                        for (let j = 0; j < containerFor6th.length; j++) {
    971                             if (containerFor6th[j]["elementPlace"]<blockSettingArray[i]["elementPlace"]) {
     971                            if (containerFor6th[j]["elementPlace"]>blockSettingArray[i]["elementPlace"]) {
    972972                                /* continue; */
    973973                                if (j == containerFor6th.length-1) {
     
    10021002                    if (containerFor7th.length > 0) {
    10031003                        for (let j = 0; j < containerFor7th.length; j++) {
    1004                             if (containerFor7th[j]["elementPlace"]<blockSettingArray[i]["elementPlace"]) {
     1004                            if (containerFor7th[j]["elementPlace"]>blockSettingArray[i]["elementPlace"]) {
    10051005                                /* continue; */
    10061006                                if (j == containerFor7th.length-1) {
  • realbig-media/trunk/connectTestFile.php

    r2884028 r2971623  
    2222    $stopIt = false;
    2323    while (empty($stopIt)) {
    24         $checkCacheTimeout = RFWP_Cache::getCache();
     24        $checkCacheTimeout = RFWP_Cache::getCacheTimeout();
    2525        if (!empty($checkCacheTimeout)) {
    2626            return true;
  • realbig-media/trunk/realbigForWP.php

    r2896400 r2971623  
    66Plugin name:  Realbig Media
    77Description:  Плагин для монетизации от RealBig.media
    8 Version:      1.0.2
     8Version:      1.0.3
    99Author:       Realbig Team
    1010Author URI:   https://realbig.media
     
    565565
    566566                    if ((empty(RFWP_Cache::getMobileCache()) || empty(RFWP_Cache::getTabletCache()) ||
    567                         empty(RFWP_Cache::getDesktopCache())) && empty(RFWP_Cache::getCache())) {
     567                        empty(RFWP_Cache::getDesktopCache())) && empty(RFWP_Cache::getCacheTimeout())) {
    568568
    569569                        echo "if (typeof cache_devices==='undefined') {var cache_devices = false;}" . PHP_EOL;
     
    604604
    605605                if (empty($cacheTimeoutDesktop)||empty($cacheTimeoutTablet)||empty($cacheTimeoutMobile)) {
    606                     $cacheTimeout = RFWP_Cache::getCache();
     606                    $cacheTimeout = RFWP_Cache::getCacheTimeout();
    607607
    608608                    if (!empty($GLOBALS['dev_mode'])) {
  • realbig-media/trunk/synchronising.php

    r2896400 r2971623  
    599599                                unset($rk,$ritem);
    600600
    601                                 RFWP_Cache::setCache();
     601                                RFWP_Cache::setCacheTimeout();
    602602                                if (!empty($resultTypes['mobile'])) {
    603603                                    RFWP_Cache::setMobileCache();
  • realbig-media/trunk/templates/adminPage/info.php

    r2896400 r2971623  
    1818            <?php if (!empty($args['domain'])): ?>
    1919                Домен для рекламы: <span style="color: green"><?php echo $args['domain']?></span>. <br>
    20             <? endif; ?>
     20            <?php endif; ?>
    2121            <?php if (!empty($args['pushStatus']) && !empty($args['pushDomain'])): ?>
    2222                Домен для push: <span style="color: green"><?php echo $args['pushDomain']?></span>. <br>
  • realbig-media/trunk/templates/adminPage/sync.php

    r2896400 r2971623  
    2828        <span name="rezultDiv" style="font-size: 16px"><?php echo $GLOBALS['tokenStatusMessage'] ?></span>
    2929    <?php endif; ?>
    30     <? if (!empty($GLOBALS['connection_request_rezult']) && $GLOBALS['connection_request_rezult'] != 'success'): ?>
     30    <?php if (!empty($GLOBALS['connection_request_rezult']) && $GLOBALS['connection_request_rezult'] != 'success'): ?>
    3131        <div class="element-separator"><?php echo $GLOBALS['connection_request_rezult'] ?></div>
    32     <? endif; ?>
     32    <?php endif; ?>
    3333    <?php if (!empty($args['devMode'])): ?>
    3434        <?php submit_button( 'Check-Ip', 'big', 'checkIp', true) ?>
Note: See TracChangeset for help on using the changeset viewer.