$table_editor = new PLTableEditor('admin/validate/answers','requests_answers','id');
$table_editor->describe('category','catégorie',true);
$table_editor->describe('title','titre',true);
- $table_editor->describe('answer','texte',false);
+ $table_editor->describe('answer','texte',false, true);
$table_editor->apply($page, $action, $id);
}
$table_editor = new PLTableEditor('admin/skins','skins','id');
$table_editor->describe('name','nom',true);
$table_editor->describe('skin_tpl','nom du template',true);
- $table_editor->describe('auteur','auteur',false);
+ $table_editor->describe('auteur','auteur',false, true);
$table_editor->describe('comment','commentaire',true);
- $table_editor->describe('date','date',false);
- $table_editor->describe('ext','extension du screenshot',false);
+ $table_editor->describe('date','date',false, true);
+ $table_editor->describe('ext','extension du screenshot',false, true);
$table_editor->apply($page, $action, $id);
}
$table_editor = new PLTableEditor('admin/mx/broken', 'mx_watch', 'host', true);
$table_editor->describe('host', 'Masque', true);
$table_editor->describe('state', 'Niveau', true);
- $table_editor->describe('text', 'Description du problème', false);
+ $table_editor->describe('text', 'Description du problème', false, true);
$table_editor->apply($page, $action, $id);
}
$page->assign('title', 'Gestion des coupures');
$table_editor = new PLTableEditor('admin/downtime','downtimes','id');
$table_editor->describe('debut','date',true);
- $table_editor->describe('duree','durée',false);
+ $table_editor->describe('duree','durée',false, true);
$table_editor->describe('resume','résumé',true);
$table_editor->describe('services','services affectés',true);
- $table_editor->describe('description','description',false);
+ $table_editor->describe('description','description',false, true);
$table_editor->apply($page, $action, $id);
}
$pids = array_unique($new_pids);
// Updates years.
- XDB::execute('UPDATE profile_education
- SET entry_year = {?}, grad_year = {?}, promo_year = {?}
- WHERE pid IN {?} AND eduid = {?} AND degreeid = {?}',
- $entry_year, $promotion, $promotion, $old_pids, $edu_id, $degree_id);
+ if (count($old_pids)) {
+ XDB::execute('UPDATE profile_education
+ SET entry_year = {?}, grad_year = {?}, promo_year = {?}
+ WHERE pid IN {?} AND eduid = {?} AND degreeid = {?}',
+ $entry_year, $promotion, $promotion, $old_pids, $edu_id, $degree_id);
+ }
}
// Precomputes values common to all users.
XDB::execute('INSERT INTO profile_education (id, pid, eduid, degreeid, entry_year, grad_year, promo_year, flags)
SELECT ' . $select . '
FROM profile_education
- WHERE pid = {?}',
+ WHERE pid = {?}
+ GROUP BY pid',
$pid);
}
XDB::commit();