Changeset 916:d4fd1fc3fb7d for admin/post.php
- Timestamp:
- 10/26/12 16:31:26 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r907 r916 422 422 '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 423 423 __('Accept comments').'</label></p>'. 424 ($core->blog->settings->system->allow_comments ? 425 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 426 '' : 427 '<p class="form-note warn">'.__('Warning: Comments are not more accepted for this entry.').'</p>') : 428 '<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>'). 429 424 430 '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 425 431 __('Accept trackbacks').'</label></p>'. 432 ($core->blog->settings->system->allow_trackbacks ? 433 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 434 '' : 435 '<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 436 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'). 437 426 438 '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. 427 439 __('Selected entry').'</label></p>'. … … 567 579 } 568 580 581 # Controls comments or trakbacks capabilities 582 function isContributionAllowed($id,$dt,$com=true) 583 { 584 global $core; 585 586 if (!$id) { 587 return true; 588 } 589 if ($com) { 590 if (($core->blog->settings->system->comments_ttl == 0) || 591 (time() - $core->blog->settings->system->comments_ttl*86400 < $dt)) { 592 return true; 593 } 594 } else { 595 if (($core->blog->settings->system->trackbacks_ttl == 0) || 596 (time() - $core->blog->settings->system->trackbacks_ttl*86400 < $dt)) { 597 return true; 598 } 599 } 600 return false; 601 } 569 602 570 603 # Show comments or trackbacks
Note: See TracChangeset
for help on using the changeset viewer.