Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
setsysrss.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Set RSS usable for all users
9  *
10  * @author Anakeen 2000
11  * @version $Id: setsysrss.php,v 1.1 2006/11/27 11:43:04 marc Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage GED
15  */
16 /**
17  */
18 include_once ("FDL/Class.Doc.php");
19 
20 function setsysrss(&$action)
21 {
22  // Set the globals elements
23  $dbaccess = $action->GetParam("FREEDOM_DB");
24  $docid = GetHttpVars("id", 0); // document to edit
25  $rss = new_Doc($dbaccess, $docid);
26  if (is_object($rss) && $rss->isAffected()) {
27  if ($rss->getValue("gui_sysrss") == "yes") {
28  $rss->setValue("gui_sysrss", "no");
29  $msg = _("rss unavaible for users");
30  } else {
31  $rss->setValue("gui_isrss", "yes");
32  $rss->setValue("gui_sysrss", "yes");
33  $msg = _("rss avaible for users");
34  }
35  AddWarningMsg($msg);
36  $rss->modify(true, array(
37  "gui_isrss",
38  "gui_sysrss"
39  ) , true);
40  }
41  redirect($action, "FDL", "FDL_CARD&id=$docid", $action->GetParam("CORE_STANDURL"));
42 }
43 ?>
← centre documentaire © anakeen - published under CC License - Dynacase