1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00
spip_ynh/sources/plugins-dist/sites/action/instituer_syndic_article.php
2015-04-28 17:10:23 +02:00

31 lines
1.3 KiB
PHP

<?php
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
* Copyright (c) 2001-2014 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
\***************************************************************************/
if (!defined("_ECRIRE_INC_VERSION")) return;
// http://doc.spip.org/@action_instituer_syndic_article_dist
function action_instituer_syndic_article_dist() {
$securiser_action = charger_fonction('securiser_action', 'inc');
$arg = $securiser_action();
list($id_syndic_article, $statut) = preg_split('/\W/', $arg);
if ($id_syndic_article = intval($id_syndic_article)
AND $id_syndic = sql_getfetsel('id_syndic','spip_syndic_articles',"id_syndic_article=".intval($id_syndic_article))
AND autoriser('moderer','site',$id_syndic)) {
sql_updateq("spip_syndic_articles", array("statut" => $statut), "id_syndic_article=".intval($id_syndic_article));
}
}
?>