Changeset 1413012
- Timestamp:
- 05/09/2016 01:49:14 PM (10 years ago)
- Location:
- wp-farsi/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
wp-farsi.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-farsi/trunk/readme.txt
r1406785 r1413012 44 44 45 45 == Changelog == 46 47 = 4.2.2 = 48 * رفع مشکل با زمانبند انتشار پست 49 * رفع اشکال در زمان غیرفعال سازی پلاگین 50 * تست با پی اچ پی ورژن 7 51 * تست با وردپرس 4.5.2 46 52 47 53 = 4.1.1 = -
wp-farsi/trunk/wp-farsi.php
r1406786 r1413012 6 6 Author: Ali.Dbg 😉 7 7 Author URI: https://github.com/alidbg/wp-farsi 8 Version: 4. 1.18 Version: 4.2.2 9 9 License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html) 10 10 */ … … 33 33 34 34 function wpfa_file_put_contents($file = '', $str = '') { 35 $fp = fopen($file, "w"); 36 if (!$fp || !flock($fp, LOCK_EX | LOCK_NB, $e) || $e) 37 return false; 38 fwrite($fp, $str); 39 sleep(2); 35 $r=0;$m=300; 36 if (($fp = fopen($file, "w")) === FALSE) return false; 37 do { 38 if ($r > 0) usleep(mt_rand(1, 50000)); 39 $r += 1; 40 } while (!flock($fp, LOCK_EX | LOCK_NB, $e) || $e); 41 if ($r == $m) return false; 42 $fw = fwrite($fp, $str); 43 usleep(1000); 40 44 flock($fp, LOCK_UN); 41 45 fclose($fp); 46 if ($fw === FALSE) 47 return false; 48 else 49 return true; 42 50 } 43 51 44 52 function wpfa_file_get_contents($file = '') { 45 $content = ''; 46 $fp = fopen($file, "r"); 47 if (!$fp || !flock($fp, LOCK_EX | LOCK_NB, $e) || $e) 48 return false; 49 $content = fread($fp, filesize($file)); 50 usleep(100000); 53 $c='';$r=0;$m=300; 54 if (($fp = fopen($file, "r")) === FALSE) return false; 55 do { 56 if ($r > 0) usleep(mt_rand(1, 50000)); 57 $r += 1; 58 } while (!flock($fp, LOCK_EX | LOCK_NB, $e) || $e); 59 if ($r == $m) return false; 60 $c = fread($fp, filesize($file)); 61 usleep(1000); 51 62 flock($fp, LOCK_UN); 52 63 fclose($fp); 53 return $c ontent;64 return $c; 54 65 } 55 66 … … 104 115 105 116 function exception_date() { 106 if (iss_uri('/feed') or iss_uri('feed=') or defined('WXR_VERSION') or isset($autosave) or isset($lasttime) or isset($signup))117 if (iss_uri('/feed') or iss_uri('feed=') or defined('WXR_VERSION') or class_exists('wp_xmlrpc_server') or isset($valid_date)) 107 118 return true; 108 119 return false;
Note: See TracChangeset
for help on using the changeset viewer.