示例#1
0
 /**
  *    Flush the cache
  * 	@param		$id					key to delete, nothing flush_all
  *  @return		string        		Libelle
  */
 function flush($id = '')
 {
     if (!empty($id)) {
         return dol_delcache($id);
     } else {
         return dol_flushcache();
     }
 }
示例#2
0
if ($action == 'add') {
    try {
        $object->load($_GET['id']);
        $object->rights[$_GET['pid']]->default = true;
        $object->record();
        dol_delcache("DolibarrModules:default_right");
    } catch (Exception $e) {
        dol_print_error('', $e->getMessage());
    }
}
if ($action == 'remove') {
    try {
        $object->load($_GET['id']);
        $object->rights[$_GET['pid']]->default = false;
        $object->record();
        dol_delcache("DolibarrModules:default_right");
    } catch (Exception $e) {
        dol_print_error('', $e->getMessage());
    }
}
$langs->load("admin");
/*
 * View
 */
llxHeader('', $langs->trans("DefaultRights"));
print '<div class="row">';
print start_box($langs->trans("SecuritySetup"), 'twelve', '16-Cog-4.png', false);
print $langs->trans("DefaultRightsDesc");
print " " . $langs->trans("OnlyActiveElementsAreShown") . "<br>\n";
print "<br>\n";
$head = security_prepare_head();