diff options
| author | ctrlcctrlv <wizardchan@hush.com> | 2013-08-20 21:35:16 +0000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-21 22:35:19 +1000 |
| commit | ed142a5e5d47b4e41ebb35ec51d50eba98a3d44b (patch) | |
| tree | 94142e53d594402681474cfbf96ef3204e4f312a | |
| parent | ddd34347f8f6bf1b47e06c621419e03dca3eb00c (diff) | |
;_;
| -rw-r--r-- | inc/api.php | 3 | ||||
| -rw-r--r-- | inc/functions.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/inc/api.php b/inc/api.php index 5e4cc88a..9cad8ba0 100644 --- a/inc/api.php +++ b/inc/api.php @@ -8,7 +8,8 @@ * Class for generating json API compatible with 4chan API */ class Api { - function __construct($config){ + function __construct(){ + global $config; /** * Translation from local fields to fields in 4chan-style API */ diff --git a/inc/functions.php b/inc/functions.php index aa92d0ef..98cf9d77 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1296,7 +1296,7 @@ function buildIndex() { $antibot = create_antibot($board['uri']); if ($config['api']['enabled']) { - $api = new Api($config); + $api = new Api(); $catalog = array(); } @@ -1771,7 +1771,7 @@ function buildThread($id, $return = false, $mod = false) { // json api if ($config['api']['enabled']) { - $api = new Api($config); + $api = new Api(); $json = json_encode($api->translateThread($thread)); $jsonFilename = $board['dir'] . $config['dir']['res'] . $id . ".json"; file_write($jsonFilename, $json); |
