Change plugin to addon

change the use of plugin to addon where appropriate.
This commit is contained in:
Adam Magness 2018-01-17 14:22:38 -05:00
commit b86b04a81a
25 changed files with 164 additions and 164 deletions

View file

@ -213,10 +213,10 @@ function api_login(App $a)
];
/*
* A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
* Plugins should never set 'authenticated' except to indicate success - as hooks may be chained
* and later plugins should not interfere with an earlier one that succeeded.
*/
* An addon indicates successful login by setting 'authenticated' to non-zero value and returning a user record
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
* and later addons should not interfere with an earlier one that succeeded.
*/
Addon::callHooks('authenticate', $addon_auth);
if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) {

View file

@ -601,7 +601,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
}
/// @TODO old-lost code?
// Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
// Shouldn't happen but we want to make absolutely sure it doesn't leak from an addon.
// Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
//if ((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
// $arr['body'] = strip_tags($arr['body']);
@ -954,7 +954,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
unset($arr['api_source']);
if (x($arr, 'cancel')) {
logger('item_store: post cancelled by plugin.');
logger('item_store: post cancelled by addon.');
return 0;
}

View file

@ -94,7 +94,7 @@ function pop_lang() {
/**
* load string translation table for alternate language
*
* first plugin strings are loaded, then globals
* first addon strings are loaded, then globals
*
* @param string $lang language code to load
*/
@ -102,9 +102,9 @@ function load_translation_table($lang) {
$a = get_app();
$a->strings = [];
// load enabled plugins strings
$plugins = dba::select('addon', ['name'], ['installed' => true]);
while ($p = dba::fetch($plugins)) {
// load enabled addons strings
$addons = dba::select('addon', ['name'], ['installed' => true]);
while ($p = dba::fetch($addons)) {
$name = $p['name'];
if (file_exists("addon/$name/lang/$lang/strings.php")) {
include("addon/$name/lang/$lang/strings.php");