<?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 *
require_once 'newsletter.inc.php';
- if (Post::has('see')) {
+ if (Post::has('see') || (Post::has('valid') && (!trim(Post::v('title')) || !trim(Post::v('body'))))) {
+ if (!Post::has('see')) {
+ $page->trig("L'article doit avoir un titre et un contenu");
+ }
$art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'));
$page->assign('art', $art);
} elseif (Post::has('valid')) {
$art->submit();
$page->assign('submited', true);
}
+ $page->addCssLink('nl.css');
}
function handler_admin_nl(&$page, $new = false) {
$table_editor->describe('titre','intitulé',true);
$table_editor->describe('pos','position',true);
$table_editor->apply($page, $action, $id);
- }
-
+ }
}
?>