respect $shorturl configuration setting
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@577 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
a4431ddc7d
commit
88088f6d0f
2 changed files with 15 additions and 0 deletions
|
@ -394,6 +394,14 @@ $useredir = false;
|
||||||
*/
|
*/
|
||||||
$url_redir = 'http://www.google.com/url?sa=D&q=';
|
$url_redir = 'http://www.google.com/url?sa=D&q=';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable short URL service.
|
||||||
|
* Can be used to visit urls using http://example.org/go/shortname
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
$shorturl = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of bookmark extensions that Scuttle should add system tags for.
|
* Array of bookmark extensions that Scuttle should add system tags for.
|
||||||
* When adding an URL with one of the given extensions, a system
|
* When adding an URL with one of the given extensions, a system
|
||||||
|
|
|
@ -12,6 +12,13 @@
|
||||||
*/
|
*/
|
||||||
require_once '../src/SemanticScuttle/header.php';
|
require_once '../src/SemanticScuttle/header.php';
|
||||||
|
|
||||||
|
if (!$GLOBALS['shorturl']) {
|
||||||
|
header('HTTP/1.0 500 Internal Server Error');
|
||||||
|
header('Content-Type: text/plain');
|
||||||
|
echo 'Short URL service deactivated';
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($_SERVER['PATH_INFO'])) {
|
if (!isset($_SERVER['PATH_INFO'])) {
|
||||||
header('HTTP/1.0 400 Bad Request');
|
header('HTTP/1.0 400 Bad Request');
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain');
|
||||||
|
|
Loading…
Reference in a new issue