CMS
Version 3.9
publish_comment.inc
Go to the documentation of this file.
1
<?php
2
/*
3
* publish/Un-Publish a comment.
4
*
5
*
6
*/
7
8
Fakoli::using
(
"comment"
);
9
10
$comment_id
= checkNumeric($_GET[
"comment_id"
]);
11
12
$comment
=
new
Comment
();
13
14
if
(
$comment_id
)
15
{
16
$comment
->load(
$comment_id
);
17
}
18
19
if
(!
$comment
->published)
20
{
21
$comment
->published =
true
;
22
}
23
else
24
{
25
$comment
->published =
false
;
26
}
27
28
if
(
$comment
->save())
29
{
30
Fakoli::end
(
"OK"
);
31
}
32
else
33
{
34
Fakoli::end
(
"save failed"
);
35
}
36
37
?>
Comment
Definition:
comment.inc:40
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
Fakoli\end
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
Definition:
core.inc:1149
$comment
$comment
Definition:
publish_comment.inc:12
$comment_id
$comment_id
Definition:
publish_comment.inc:10
code
cms.sonjara.com
cms
components
comment
handlers
publish_comment.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1