Elgg  Version 1.9
deactivate_all.php
Go to the documentation of this file.
1 <?php
12 $guids = get_input('guids');
13 $guids = explode(',', $guids);
14 
15 foreach ($guids as $guid) {
16  $plugin = get_entity($guid);
17  if ($plugin->isActive()) {
18  if ($plugin->deactivate()) {
19  //system_message(elgg_echo('admin:plugins:activate:yes', array($plugin->getManifest()->getName())));
20  } else {
21  $msg = $plugin->getError();
22  $string = ($msg) ? 'admin:plugins:deactivate:no_with_msg' : 'admin:plugins:deactivate:no';
23  register_error(elgg_echo($string, array($plugin->getFriendlyName(), $plugin->getError())));
24  }
25  }
26 }
27 
28 // don't regenerate the simplecache because the plugin won't be
29 // loaded until next run. Just invalidate and let it regnerate as needed
32 
elgg_reset_system_cache()
Reset the system cache by deleting the caches.
Definition: cache.php:40
$plugin
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_invalidate_simplecache()
Deletes all cached views in the simplecache and sets the lastcache and lastupdate time to 0 for every...
Definition: cache.php:278
$guid
Removes an admin notice.
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:419
$string
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
const REFERER
Definition: elgglib.php:2162
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
$guids
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604