Elgg  Version 2.3
set_priority.php
Go to the documentation of this file.
1 <?php
16 $plugin_guid = get_input('plugin_guid');
17 $priority = get_input('priority');
18 
20 
21 if (!($plugin instanceof ElggPlugin)) {
22  register_error(elgg_echo('admin:plugins:set_priority:no', array($plugin_guid)));
24 }
25 
26 if ($plugin->setPriority($priority)) {
27  //system_message(elgg_echo('admin:plugins:set_priority:yes', array($plugin->getManifest()->getName())));
28 } else {
29  $msg = $plugin->getError();
30  $string = ($msg) ? 'admin:plugins:set_priority:no_with_msg' : 'admin:plugins:set_priority:no';
31  register_error(elgg_echo($string, array($plugin->getFriendlyName(), $plugin->getError())));
32 }
33 
34 // don't regenerate the simplecache because the plugin won't be
35 // loaded until next run. Just invalidate and let it regnerate as needed
37 
$plugin_guid
$plugin
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$string
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
const REFERER
Definition: elgglib.php:2123
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
elgg_flush_caches()
Flush all the registered caches.
Definition: cache.php:225
$priority
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204