* Migrated configuration options to admin panel * Removed configuration options from config file * Added help text for each configuration option into panel Addresses #622 and needs extensive testing by pools. A lot has changed so pool owners might have to adjust their own templates to match this new system.
25 lines
486 B
PHP
25 lines
486 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY')) die('Hacking attempt');
|
|
|
|
/**
|
|
* Helper class for our API
|
|
**/
|
|
class Api extends Base {
|
|
function isActive($error=true) {
|
|
if (!$this->setting->getValue('disable_api')) {
|
|
return true;
|
|
} else {
|
|
if ($error == true) {
|
|
header('HTTP/1.1 501 Not implemented');
|
|
die('501 Not implemented');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$api = new Api();
|
|
$api->setConfig($config);
|
|
$api->setSetting($setting);
|