Commit 0f4d2e64 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#56488, use named constants for comment status, patch, by Moshe

parent 2347d3f9
......@@ -638,13 +638,13 @@ function _blogapi_mt_extra(&$node, $struct) {
if (array_key_exists('mt_allow_comments', $struct)) {
switch ($struct['mt_allow_comments']) {
case 0:
$node->comment = 0;
$node->comment = COMMENT_NODE_DISABLED;
break;
case 1:
$node->comment = 2;
$node->comment = COMMENT_NODE_READ_WRITE;
break;
case 2:
$node->comment = 1;
$node->comment = COMMENT_NODE_READ_ONLY;
break;
}
}
......
......@@ -638,13 +638,13 @@ function _blogapi_mt_extra(&$node, $struct) {
if (array_key_exists('mt_allow_comments', $struct)) {
switch ($struct['mt_allow_comments']) {
case 0:
$node->comment = 0;
$node->comment = COMMENT_NODE_DISABLED;
break;
case 1:
$node->comment = 2;
$node->comment = COMMENT_NODE_READ_WRITE;
break;
case 2:
$node->comment = 1;
$node->comment = COMMENT_NODE_READ_ONLY;
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment