<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$page->assign('valid_mesg', $valid_mesg);
$page->assign('action', strtolower($action));
- if ($action == 'Confirmer') {
+ if ($action && (!trim($texte) || !trim($titre))) {
+ $page->trig("L'article doit avoir un titre et un contenu");
+ } elseif ($action == 'Confirmer') {
$texte = $texte_catch_url;
require_once 'validations.inc.php';
$evtreq = new EvtReq($titre, $texte, $promo_min, $promo_max,
function handler_tips(&$page, $tips = null)
{
+ header('Content-Type: text/html; charset="ISO-8859-15"');
$page->changeTpl('include/tips.tpl', NO_SKIN);
$page->assign('tips', $this->get_tips($tips));
}
$table_editor->describe('titre', 'titre', true);
$table_editor->describe('state', 'actif', true);
$table_editor->describe('text', 'texte (html) de l\'astuce', false);
- $table_editor->describe('priorite', 'priorité (0=min, 256=max)', false);
+ $table_editor->describe('priorite', '0<=priorité<=255', true);
$table_editor->apply($page, $action, $id);
if ($action == 'edit' && !is_null($id)) {
$page->changeTpl('events/admin_tips.tpl');