| 450 |
break; |
break; |
| 451 |
case 'D': // Delete article |
case 'D': // Delete article |
| 452 |
case 'X': // Delete article by Admin |
case 'X': // Delete article by Admin |
| 453 |
p_article->visible = 0; |
if (section_list_set_article_visible(p_section, atoi(row[1]), 0) < 0) |
|
if (p_article->tid == 0) |
|
| 454 |
{ |
{ |
| 455 |
// Set articles in the topic to be invisible |
log_error("section_list_set_article_visible(sid=%d, aid=%d, visible=0) error\n", p_section->sid, atoi(row[1])); |
| 456 |
do |
} |
| 457 |
{ |
if (section_list_calculate_page(p_section, atoi(row[1])) < 0) |
| 458 |
p_article = p_article->p_topic_next; |
{ |
| 459 |
p_article->visible = 0; |
log_error("section_list_calculate_page(aid=%d) error\n", atoi(row[1])); |
|
} while (p_article->tid != 0); |
|
| 460 |
} |
} |
| 461 |
break; |
break; |
| 462 |
case 'S': // Restore article |
case 'S': // Restore article |
| 463 |
p_article->visible = 1; |
if (section_list_set_article_visible(p_section, atoi(row[1]), 1) < 0) |
| 464 |
|
{ |
| 465 |
|
log_error("section_list_set_article_visible(sid=%d, aid=%d, visible=1) error\n", p_section->sid, atoi(row[1])); |
| 466 |
|
} |
| 467 |
|
if (section_list_calculate_page(p_section, atoi(row[1])) < 0) |
| 468 |
|
{ |
| 469 |
|
log_error("section_list_calculate_page(aid=%d) error\n", atoi(row[1])); |
| 470 |
|
} |
| 471 |
break; |
break; |
| 472 |
case 'L': // Lock article |
case 'L': // Lock article |
| 473 |
p_article->lock = 1; |
p_article->lock = 1; |