plugins onAutoload now only overloads if necessary (extlibs etc.)

lib/plugin.php now has a parent onAutoload function that finds most common
files that are used in plugins (actions, dataobjects, forms, libs etc.) if
they are put in the standardised directories ('actions', 'classes', 'forms',
'lib' and perhaps some others in the future).
This commit is contained in:
Mikael Nordfeldth
2013-08-28 15:54:26 +02:00
parent b6cfcfbcaa
commit de55d8f83b
282 changed files with 227 additions and 1423 deletions

View File

@@ -0,0 +1,31 @@
<?php
class SearchSubTrackingCommand extends Command
{
function handle($channel)
{
$cur = $this->user;
$all = new SearchSub();
$all->profile_id = $cur->id;
$all->find();
if ($all->N == 0) {
// TRANS: Error text shown a user tries to disable all a search subscriptions with track off command, but has none.
$channel->error($cur, _m('You are not tracking any searches.'));
return;
}
$list = array();
while ($all->fetch()) {
$list[] = $all->search;
}
// TRANS: Separator for list of tracked searches.
$separator = _m('SEPARATOR','", "');
// TRANS: Message given having disabled all search subscriptions with 'track off'.
// TRANS: %s is a list of searches. Separator default is '", "'.
$channel->output($cur, sprintf(_m('You are tracking searches for: "%s".'),
implode($separator, $list)));
}
}