mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 13:01:08 -05:00
Merge branch 'dev'
test the epic u-bahn linien! \o/
This commit is contained in:
commit
8cdcc27552
@ -178,6 +178,19 @@ $config['per_page'] = 15;
|
|||||||
**/
|
**/
|
||||||
$config['apikey'] = '';
|
$config['apikey'] = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Soft API
|
||||||
|
*
|
||||||
|
* When set to true, allow interaction:
|
||||||
|
* without apikey: badword-check applies
|
||||||
|
* with apikey: badwords are ignored
|
||||||
|
*
|
||||||
|
* this is useful to maintain a restrictive blocklist
|
||||||
|
* for spammers and bypass it using the apikey.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
$config['soft_api'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Anti spam
|
* Anti spam
|
||||||
*
|
*
|
||||||
|
@ -40,7 +40,7 @@ class Api extends Main
|
|||||||
function create()
|
function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (config_item('apikey') != $this->input->get('apikey'))
|
if (config_item('apikey') != $this->input->get('apikey') && config_item('soft_api') == false)
|
||||||
{
|
{
|
||||||
die("Invalid API key\n");
|
die("Invalid API key\n");
|
||||||
}
|
}
|
||||||
@ -74,10 +74,20 @@ class Api extends Main
|
|||||||
die("You are not allowed to paste\n");
|
die("You are not allowed to paste\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_item('soft_api') == true && (config_item('apikey') == $this->input->get('apikey')))
|
||||||
|
{
|
||||||
|
|
||||||
|
//pass
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
if (!$this->_blockwords_check())
|
if (!$this->_blockwords_check())
|
||||||
{
|
{
|
||||||
die("Your paste contains blocked words\n");
|
die("Your paste contains blocked words\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//create paste
|
//create paste
|
||||||
$paste_url = $this->pastes->createPaste();
|
$paste_url = $this->pastes->createPaste();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user