Changeset 2971623
- Timestamp:
- 09/26/2023 05:42:22 AM (3 years ago)
- Location:
- realbig-media/trunk
- Files:
-
- 10 edited
-
README.MD (modified) (2 diffs)
-
README.txt (modified) (2 diffs)
-
RFWP_Cache.php (modified) (5 diffs)
-
adminMenuAdd.php (modified) (1 diff)
-
asyncBlockInserting.js (modified) (2 diffs)
-
connectTestFile.php (modified) (1 diff)
-
realbigForWP.php (modified) (3 diffs)
-
synchronising.php (modified) (1 diff)
-
templates/adminPage/info.php (modified) (1 diff)
-
templates/adminPage/sync.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
realbig-media/trunk/README.MD
r2896400 r2971623 3 3 Tags: AD, content filling 4 4 Requires at least: 4.5 5 Tested up to: 6. 25 Tested up to: 6.3 6 6 Stable tag: 0.1.26.56 7 7 Requires PHP: 5.6 … … 108 108 == Changelog == 109 109 110 = 1.0.3 = 111 112 Изменения версии: 113 114 * исправили ошибку с автосинхронизацией плагина для litespeed серверов; 115 * другие мелкие улучшения и правки. 116 110 117 = 1.0.2 = 111 118 -
realbig-media/trunk/README.txt
r2896400 r2971623 3 3 Tags: AD, content filling 4 4 Requires at least: 4.5 5 Tested up to: 6. 25 Tested up to: 6.3 6 6 Stable tag: 0.1.26.56 7 7 Requires PHP: 5.6 … … 108 108 == Changelog == 109 109 110 = 1.0.3 = 111 112 Изменения версии: 113 114 * исправили ошибку с автосинхронизацией плагина для litespeed серверов; 115 * другие мелкие улучшения и правки. 116 110 117 = 1.0.2 = 111 118 -
realbig-media/trunk/RFWP_Cache.php
r2896400 r2971623 9 9 const DESKTOP_CACHE = "rb_desktop_cache_timeout"; 10 10 11 const CACHE = "rb_cache_timeout";11 const CACHE_TIMEOUT = "rb_cache_timeout"; 12 12 const ACTIVE_CACHE = "rb_active_cache"; 13 13 const LONG_CACHE = "rb_longCacheDeploy"; … … 17 17 18 18 public static function getMobileCache() { 19 return get_transient(self::MOBILE_CACHE);19 return self::getCache(self::MOBILE_CACHE); 20 20 } 21 21 public static function setMobileCache() { 22 se t_transient(self::MOBILE_CACHE, time()+(60*60), 60*60);22 self::setCache(self::MOBILE_CACHE, 60*60); 23 23 } 24 24 25 25 public static function getTabletCache() { 26 return get_transient(self::TABLET_CACHE);26 return self::getCache(self::TABLET_CACHE); 27 27 } 28 28 public static function setTabletCache() { 29 se t_transient(self::TABLET_CACHE, time()+(60*60), 60*60);29 self::setCache(self::TABLET_CACHE, 60*60); 30 30 } 31 31 32 32 public static function getDesktopCache() { 33 return get_transient(self::DESKTOP_CACHE);33 return self::getCache(self::DESKTOP_CACHE); 34 34 } 35 35 public static function setDesktopCache() { 36 se t_transient(self::DESKTOP_CACHE, time()+(60*60), 60*60);36 self::setCache(self::DESKTOP_CACHE, 60*60); 37 37 } 38 38 39 public static function getCache () {40 return get_transient(self::CACHE);39 public static function getCacheTimeout() { 40 return self::getCache(self::CACHE_TIMEOUT); 41 41 } 42 public static function setCache () {43 se t_transient(self::CACHE, time()+60, 60);42 public static function setCacheTimeout() { 43 self::setCache(self::CACHE_TIMEOUT, 60); 44 44 } 45 45 46 46 public static function getActiveCache() { 47 return get_transient(self::ACTIVE_CACHE);47 return self::getCache(self::ACTIVE_CACHE); 48 48 } 49 49 public static function setActiveCache() { 50 se t_transient(self::ACTIVE_CACHE, time()+5, 5);50 self::setCache(self::ACTIVE_CACHE, 5); 51 51 } 52 52 public static function deleteActiveCache() { 53 delete_transient(self::ACTIVE_CACHE);53 self::deleteCache(self::ACTIVE_CACHE); 54 54 } 55 55 56 56 public static function getProcessCache() { 57 return get_transient(self::PROCESS_CACHE);57 return self::getCache(self::PROCESS_CACHE); 58 58 } 59 59 public static function setProcessCache() { 60 se t_transient(self::PROCESS_CACHE, time()+30, 30);60 self::setCache(self::PROCESS_CACHE, 30); 61 61 } 62 62 public static function deleteProcessCache() { 63 delete_transient(self::PROCESS_CACHE);63 self::deleteCache(self::PROCESS_CACHE); 64 64 } 65 65 66 66 public static function getAttemptCache() { 67 return get_transient(self::ATTEMPT_CACHE);67 return self::getCache(self::ATTEMPT_CACHE); 68 68 } 69 69 public static function setAttemptCache() { 70 70 $period = RFWP_getPeriodSync(); 71 se t_transient(self::ATTEMPT_CACHE, time()+$period, $period);71 self::setCache(self::ATTEMPT_CACHE, $period); 72 72 } 73 73 public static function deleteAttemptCache() { 74 delete_transient(self::ATTEMPT_CACHE);74 self::deleteCache(self::ATTEMPT_CACHE); 75 75 } 76 76 … … 81 81 } else { 82 82 if (!isset($GLOBALS['rb_longCache'])) { 83 $longCache = get_transient(self::LONG_CACHE);83 $longCache = self::getCache(self::LONG_CACHE); 84 84 $GLOBALS['rb_longCache'] = $longCache; 85 85 } else { … … 91 91 92 92 public static function setLongCache() { 93 se t_transient(self::LONG_CACHE, time()+300, 300);93 self::setCache(self::LONG_CACHE, 300); 94 94 } 95 95 96 96 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(); 100 100 } 101 101 102 102 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); 106 106 } 107 107 … … 114 114 WHERE post_type IN ("rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new")'); 115 115 } 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 } 116 134 } 117 135 } -
realbig-media/trunk/adminMenuAdd.php
r2896400 r2971623 18 18 'syncAttempt' =>RFWP_Cache::getAttemptCache(), 19 19 'syncProcess' =>RFWP_Cache::getProcessCache(), 20 'cache' =>RFWP_Cache::getCache (),20 'cache' =>RFWP_Cache::getCacheTimeout(), 21 21 'mobileCache' =>RFWP_Cache::getMobileCache(), 22 22 'tabletCache' =>RFWP_Cache::getTabletCache(), -
realbig-media/trunk/asyncBlockInserting.js
r2884028 r2971623 969 969 if (containerFor6th.length > 0) { 970 970 for (let j = 0; j < containerFor6th.length; j++) { 971 if (containerFor6th[j]["elementPlace"] <blockSettingArray[i]["elementPlace"]) {971 if (containerFor6th[j]["elementPlace"]>blockSettingArray[i]["elementPlace"]) { 972 972 /* continue; */ 973 973 if (j == containerFor6th.length-1) { … … 1002 1002 if (containerFor7th.length > 0) { 1003 1003 for (let j = 0; j < containerFor7th.length; j++) { 1004 if (containerFor7th[j]["elementPlace"] <blockSettingArray[i]["elementPlace"]) {1004 if (containerFor7th[j]["elementPlace"]>blockSettingArray[i]["elementPlace"]) { 1005 1005 /* continue; */ 1006 1006 if (j == containerFor7th.length-1) { -
realbig-media/trunk/connectTestFile.php
r2884028 r2971623 22 22 $stopIt = false; 23 23 while (empty($stopIt)) { 24 $checkCacheTimeout = RFWP_Cache::getCache ();24 $checkCacheTimeout = RFWP_Cache::getCacheTimeout(); 25 25 if (!empty($checkCacheTimeout)) { 26 26 return true; -
realbig-media/trunk/realbigForWP.php
r2896400 r2971623 6 6 Plugin name: Realbig Media 7 7 Description: Плагин для монетизации от RealBig.media 8 Version: 1.0. 28 Version: 1.0.3 9 9 Author: Realbig Team 10 10 Author URI: https://realbig.media … … 565 565 566 566 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())) { 568 568 569 569 echo "if (typeof cache_devices==='undefined') {var cache_devices = false;}" . PHP_EOL; … … 604 604 605 605 if (empty($cacheTimeoutDesktop)||empty($cacheTimeoutTablet)||empty($cacheTimeoutMobile)) { 606 $cacheTimeout = RFWP_Cache::getCache ();606 $cacheTimeout = RFWP_Cache::getCacheTimeout(); 607 607 608 608 if (!empty($GLOBALS['dev_mode'])) { -
realbig-media/trunk/synchronising.php
r2896400 r2971623 599 599 unset($rk,$ritem); 600 600 601 RFWP_Cache::setCache ();601 RFWP_Cache::setCacheTimeout(); 602 602 if (!empty($resultTypes['mobile'])) { 603 603 RFWP_Cache::setMobileCache(); -
realbig-media/trunk/templates/adminPage/info.php
r2896400 r2971623 18 18 <?php if (!empty($args['domain'])): ?> 19 19 Домен для рекламы: <span style="color: green"><?php echo $args['domain']?></span>. <br> 20 <? endif; ?>20 <?php endif; ?> 21 21 <?php if (!empty($args['pushStatus']) && !empty($args['pushDomain'])): ?> 22 22 Домен для push: <span style="color: green"><?php echo $args['pushDomain']?></span>. <br> -
realbig-media/trunk/templates/adminPage/sync.php
r2896400 r2971623 28 28 <span name="rezultDiv" style="font-size: 16px"><?php echo $GLOBALS['tokenStatusMessage'] ?></span> 29 29 <?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'): ?> 31 31 <div class="element-separator"><?php echo $GLOBALS['connection_request_rezult'] ?></div> 32 <? endif; ?>32 <?php endif; ?> 33 33 <?php if (!empty($args['devMode'])): ?> 34 34 <?php submit_button( 'Check-Ip', 'big', 'checkIp', true) ?>
Note: See TracChangeset
for help on using the changeset viewer.