Exemplo n.º 1
0
    $keyword_url = Security::remove_XSS(empty($_GET['keyword']) ? '' : $_GET['keyword']);
}
if (isset($_GET['msg']) && isset($_GET['type'])) {
    if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed'))) {
        switch ($_GET['type']) {
            case 'error':
                $message = Display::return_message(get_lang($_GET['msg']), 'error');
                break;
            case 'confirmation':
                $message = Display::return_message(get_lang($_GET['msg']), 'confirm');
        }
    }
}
$blocks = array();
// Instantiate Hook Event for Admin Block
$hook = HookAdminBlock::create();
if (!empty($hook)) {
    // If not empty, then notify Pre process to Hook Observers for Admin Block
    $hook->setEventData(array('blocks' => $blocks));
    $data = $hook->notifyAdminBlock(HOOK_EVENT_TYPE_PRE);
    // Check if blocks data is not null
    if (isset($data['blocks'])) {
        // Get modified blocks
        $blocks = $data['blocks'];
    }
}
/* Users */
$blocks['users']['icon'] = Display::return_icon('members.gif', get_lang('Users'), array(), ICON_SIZE_MEDIUM, false);
$blocks['users']['label'] = api_ucfirst(get_lang('Users'));
$blocks['users']['class'] = 'block-admin-users';
$usersBlockExtraFile = "{$adminExtraContentDir}block-admin-users_extra.html";
 /**
  * This method will call the Hook management deleteHook to disable Hook observer from this plugin
  * @return int
  */
 public function uninstallHook()
 {
     $hookObserver = HookAdvancedSubscription::create();
     HookAdminBlock::create()->detach($hookObserver);
     HookWSRegistration::create()->detach($hookObserver);
     HookNotificationContent::create()->detach($hookObserver);
     HookNotificationTitle::create()->detach($hookObserver);
 }