Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
fdl_forumopen.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
* FDL Forum open action
9
*
10
* @author Anakeen 2000
11
* @version $Id: fdl_forumopen.php,v 1.1 2007/10/15 10:05:35 marc Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage
15
*/
16
/**
17
*/
18
include_once (
"FDL/Class.Doc.php"
);
19
include_once (
"FDL/freedom_util.php"
);
20
21
function
fdl_forumopen
(&
$action
)
22
{
23
24
$docid
=
GetHttpVars
(
"docid"
,
""
);
25
26
$dbaccess
= GetParam(
"FREEDOM_DB"
);
27
28
if
(
$docid
==
""
)
$action
->exitError(_(
"no document reference"
));
29
$doc
=
new_Doc
(
$dbaccess
,
$docid
);
30
if
(!
$doc
->isAffected())
$action
->exitError(sprintf(_(
"cannot see unknow reference %s"
) ,
$docid
));
31
32
if
(
$doc
->Control(
"edit"
) !=
""
)
$action
->exitError(sprintf(_(
"you don't have privilege to edit forum for document %s"
) ,
$doc
->title));
33
34
$doc
->forumid = abs(
$doc
->forumid);
35
36
$doc
->modify(
true
, array(
37
"forumid"
38
));
39
40
redirect(
$action
,
"FDL"
,
"FDL_CARD&sole=Y&id="
.
$doc
->id);
41
}
42
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase