add constants to disable services for an entire platform
This commit is contained in:
parent
7242913c9a
commit
8357f7a713
44
_prepend.php
44
_prepend.php
@ -25,10 +25,10 @@ if (!defined('SHORTEN_SERVICE_NAME')) {
|
|||||||
define('SHORTEN_SERVICE_NAME', 'Is.gd');
|
define('SHORTEN_SERVICE_NAME', 'Is.gd');
|
||||||
}
|
}
|
||||||
if (!defined('SHORTEN_SERVICE_API')) {
|
if (!defined('SHORTEN_SERVICE_API')) {
|
||||||
define('SHORTEN_SERVICE_API', 'http://is.gd/api.php?');
|
define('SHORTEN_SERVICE_API', 'https://is.gd/api.php?');
|
||||||
}
|
}
|
||||||
if (!defined('SHORTEN_SERVICE_BASE')) {
|
if (!defined('SHORTEN_SERVICE_BASE')) {
|
||||||
define('SHORTEN_SERVICE_BASE', 'http://is.gd/');
|
define('SHORTEN_SERVICE_BASE', 'https://is.gd/');
|
||||||
}
|
}
|
||||||
if (!defined('SHORTEN_SERVICE_PARAM')) {
|
if (!defined('SHORTEN_SERVICE_PARAM')) {
|
||||||
define('SHORTEN_SERVICE_PARAM', 'longurl');
|
define('SHORTEN_SERVICE_PARAM', 'longurl');
|
||||||
@ -45,28 +45,48 @@ $__autoload['kutrlLog'] = $d . 'lib.kutrl.log.php';
|
|||||||
$__autoload['kutrlLinksList'] = $d . 'lib.kutrl.lst.php';
|
$__autoload['kutrlLinksList'] = $d . 'lib.kutrl.lst.php';
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
$__autoload['bilbolinksKutrlService'] = $d . 'services/class.bilbolinks.service.php';
|
|
||||||
$core->addBehavior('kutrlService', function() { return ["bilbolinks","bilbolinksKutrlService"]; } );
|
|
||||||
//$__autoload['bitlyKutrlService'] = $d . 'services/class.bitly.service.php';
|
|
||||||
//$core->addBehavior('kutrlService', function() { return ["bitly","bitlyKutrlService"]; } );
|
|
||||||
$__autoload['customKutrlService'] = $d . 'services/class.custom.service.php';
|
|
||||||
$core->addBehavior('kutrlService', function() { return ["custom","customKutrlService"]; } );
|
|
||||||
$__autoload['defaultKutrlService'] = $d . 'services/class.default.service.php';
|
$__autoload['defaultKutrlService'] = $d . 'services/class.default.service.php';
|
||||||
$core->addBehavior('kutrlService', function() { return ["default","defaultKutrlService"]; } );
|
$core->addBehavior('kutrlService', function() { return ["default","defaultKutrlService"]; } );
|
||||||
//$__autoload['googlKutrlService'] = $d . 'services/class.googl.service.php';
|
if (!defined('SHORTEN_SERVICE_DISABLE_CUSTOM')) {
|
||||||
//$core->addBehavior('kutrlService', function() { return ["googl","googlKutrlService"]; } );
|
$__autoload['customKutrlService'] = $d . 'services/class.custom.service.php';
|
||||||
$__autoload['isgdKutrlService'] = $d . 'services/class.isgd.service.php';
|
$core->addBehavior('kutrlService', function() { return ["custom","customKutrlService"]; } );
|
||||||
$core->addBehavior('kutrlService', function() { return ["isgd","isgdKutrlService"]; } );
|
}
|
||||||
|
if (!defined('SHORTEN_SERVICE_DISABLE_LOCAL')) {
|
||||||
$__autoload['localKutrlService'] = $d . 'services/class.local.service.php';
|
$__autoload['localKutrlService'] = $d . 'services/class.local.service.php';
|
||||||
$core->addBehavior('kutrlService', function() { return ["local","localKutrlService"]; } );
|
$core->addBehavior('kutrlService', function() { return ["local","localKutrlService"]; } );
|
||||||
|
}
|
||||||
|
if (!defined('SHORTEN_SERVICE_DISABLE_BILBOLINKS')) {
|
||||||
|
$__autoload['bilbolinksKutrlService'] = $d . 'services/class.bilbolinks.service.php';
|
||||||
|
$core->addBehavior('kutrlService', function() { return ["bilbolinks","bilbolinksKutrlService"]; } );
|
||||||
|
}
|
||||||
|
//if (!defined('SHORTEN_SERVICE_DISABLE_BITLY')) {
|
||||||
|
//$__autoload['bitlyKutrlService'] = $d . 'services/class.bitly.service.php';
|
||||||
|
//$core->addBehavior('kutrlService', function() { return ["bitly","bitlyKutrlService"]; } );
|
||||||
|
//}
|
||||||
|
//if (!defined('SHORTEN_SERVICE_DISABLE_GOOGL')) {
|
||||||
|
// $__autoload['googlKutrlService'] = $d . 'services/class.googl.service.php';
|
||||||
|
// $core->addBehavior('kutrlService', function() { return ["googl","googlKutrlService"]; } );
|
||||||
|
//}
|
||||||
|
if (!defined('SHORTEN_SERVICE_DISABLE_ISGD')) {
|
||||||
|
$__autoload['isgdKutrlService'] = $d . 'services/class.isgd.service.php';
|
||||||
|
$core->addBehavior('kutrlService', function() { return ["isgd","isgdKutrlService"]; } );
|
||||||
|
}
|
||||||
|
//if (!defined('SHORTEN_SERVICE_DISABLE_SHORTTO')) {
|
||||||
// $__autoload['shorttoKutrlService'] = $d . 'services/class.shortto.service.php';
|
// $__autoload['shorttoKutrlService'] = $d . 'services/class.shortto.service.php';
|
||||||
// $core->addBehavior('kutrlService', function() { return ["shortto","shorttoKutrlService"]; } );
|
// $core->addBehavior('kutrlService', function() { return ["shortto","shorttoKutrlService"]; } );
|
||||||
|
//}
|
||||||
|
//if (!defined('SHORTEN_SERVICE_DISABLE_TRIM')) {
|
||||||
// $__autoload['trimKutrlService'] = $d . 'services/class.trim.service.php';
|
// $__autoload['trimKutrlService'] = $d . 'services/class.trim.service.php';
|
||||||
// $core->addBehavior('kutrlService', function() { return ["trim","trimKutrlService"]; } );
|
// $core->addBehavior('kutrlService', function() { return ["trim","trimKutrlService"]; } );
|
||||||
|
//}
|
||||||
|
if (!defined('SHORTEN_SERVICE_DISABLE_YOURLS')) {
|
||||||
$__autoload['yourlsKutrlService'] = $d . 'services/class.yourls.service.php';
|
$__autoload['yourlsKutrlService'] = $d . 'services/class.yourls.service.php';
|
||||||
$core->addBehavior('kutrlService', function() { return ["yourls","yourlsKutrlService"]; } );
|
$core->addBehavior('kutrlService', function() { return ["yourls","yourlsKutrlService"]; } );
|
||||||
|
}
|
||||||
|
//if (!defined('SHORTEN_SERVICE_DISABLE_SUPR')) {
|
||||||
// $__autoload['suprKutrlService'] = $d . 'services/class.supr.service.php';
|
// $__autoload['suprKutrlService'] = $d . 'services/class.supr.service.php';
|
||||||
// $core->addBehavior('kutrlService', function() { return ["supr","suprKutrlService"]; } );
|
// $core->addBehavior('kutrlService', function() { return ["supr","suprKutrlService"]; } );
|
||||||
|
//}
|
||||||
|
|
||||||
# Shorten url passed through wiki functions
|
# Shorten url passed through wiki functions
|
||||||
$__autoload['kutrlWiki'] = $d . 'lib.wiki.kutrl.php';
|
$__autoload['kutrlWiki'] = $d . 'lib.wiki.kutrl.php';
|
||||||
|
Loading…
Reference in New Issue
Block a user