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

4.7.x
Gerhard Killesreiter 2006-03-30 14:24:52 +00:00
parent 2347d3f93c
commit 0f4d2e64c2
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}