File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 17
17
require_once (CLASS_DIR . '/base.class.php ' );
18
18
require_once (CLASS_DIR . '/coins/coin_base.class.php ' );
19
19
require_once (CLASS_DIR . '/setting.class.php ' );
20
+ if (PHP_OS == 'WINNT ' ) require_once (CLASS_DIR . '/memcached.class.php ' );
20
21
21
22
// Now decide on which coin class to load and instantiate
22
23
if (file_exists (CLASS_DIR . '/coins/coin_ ' . $ config ['algorithm ' ] . '.class.php ' )) {
Original file line number Diff line number Diff line change @@ -43,14 +43,8 @@ function cfip() { return (@defined('SECURITY')) ? 1 : 0; }
43
43
$ hts = ($ config ['https_only ' ] && (!empty ($ _SERVER ['QUERY_STRING ' ]))) ? "https:// " .$ _SERVER ['SERVER_NAME ' ].$ _SERVER ['SCRIPT_NAME ' ]."? " .$ _SERVER ['QUERY_STRING ' ] : "https:// " .$ _SERVER ['SERVER_NAME ' ].$ _SERVER ['SCRIPT_NAME ' ];
44
44
($ config ['https_only ' ] && @!$ _SERVER ['HTTPS ' ]) ? exit (header ("Location: " .$ hts )):0 ;
45
45
46
- // Rate limiting
46
+ // Rate limiting, we use our initilized memcache from bootstrap/autoloader
47
47
if ($ config ['memcache ' ]['enabled ' ] && $ config ['mc_antidos ' ]['enabled ' ]) {
48
- if (PHP_OS == 'WINNT ' ) {
49
- require_once (CLASS_DIR . '/memcached.class.php ' );
50
- }
51
- // memcache antidos needs a memcache handle
52
- $ memcache = new Memcached ();
53
- $ memcache ->addServer ($ config ['memcache ' ]['host ' ], $ config ['memcache ' ]['port ' ]);
54
48
require_once (CLASS_DIR . '/memcache_ad.class.php ' );
55
49
$ skip_check = false ;
56
50
// if this is an api call we need to be careful not to time them out for those calls separately
You can’t perform that action at this time.
0 commit comments