Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 557)
+++ admin/blog_pref.php	(revision 848)
@@ -135,7 +135,4 @@
 	if ($nb_post_per_feed <= 1) { $nb_post_per_feed = 1; }
 	
-	$nb_comment_per_feed = abs((integer) $_POST['nb_comment_per_feed']);
-	if ($nb_comment_per_feed <= 1) { $nb_comment_per_feed = 1; }
-	
 	try
 	{
@@ -182,12 +179,4 @@
 		$blog_settings->system->put('date_format',$_POST['date_format']);
 		$blog_settings->system->put('time_format',$_POST['time_format']);
-		$blog_settings->system->put('comments_ttl',abs((integer) $_POST['comments_ttl']));
-		$blog_settings->system->put('trackbacks_ttl',abs((integer) $_POST['trackbacks_ttl']));
-		$blog_settings->system->put('allow_comments',!empty($_POST['allow_comments']));
-		$blog_settings->system->put('allow_trackbacks',!empty($_POST['allow_trackbacks']));
-		$blog_settings->system->put('comments_pub',empty($_POST['comments_pub']));
-		$blog_settings->system->put('trackbacks_pub',empty($_POST['trackbacks_pub']));
-		$blog_settings->system->put('comments_nofollow',!empty($_POST['comments_nofollow']));
-		$blog_settings->system->put('wiki_comments',!empty($_POST['wiki_comments']));
 		$blog_settings->system->put('enable_xmlrpc',!empty($_POST['enable_xmlrpc']));
 		
@@ -199,5 +188,4 @@
 		$blog_settings->system->put('media_img_title_pattern',$_POST['media_img_title_pattern']);
 		$blog_settings->system->put('nb_post_per_feed',$nb_post_per_feed);
-		$blog_settings->system->put('nb_comment_per_feed',$nb_comment_per_feed);
 		$blog_settings->system->put('short_feed_items',!empty($_POST['short_feed_items']));
 		
@@ -331,47 +319,4 @@
 	
 	echo
-	'<fieldset><legend>'.__('Comments and trackbacks').'</legend>'.
-	'<div class="two-cols">'.
-	'<div class="col">'.
-	'<p><label for="allow_comments" class="classic">'.
-	form::checkbox('allow_comments','1',$blog_settings->system->allow_comments).
-	__('Accept comments').'</label></p>'.
-	
-	'<p><label for="comments_pub" class="classic">'.
-	form::checkbox('comments_pub','1',!$blog_settings->system->comments_pub).
-	__('Moderate comments').'</label></p>'.
-	
-	'<p><label for="comments_ttl" class="classic">'.sprintf(__('Leave comments open for %s days'),
-	form::field('comments_ttl',2,3,$blog_settings->system->comments_ttl)).
-	'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.
-	
-	'<p><label for="wiki_comments" class="classic">'.
-	form::checkbox('wiki_comments','1',$blog_settings->system->wiki_comments).
-	__('Wiki syntax for comments').'</label></p>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="allow_trackbacks" class="classic">'.
-	form::checkbox('allow_trackbacks','1',$blog_settings->system->allow_trackbacks).
-	__('Accept trackbacks').'</label></p>'.
-	
-	'<p><label for="trackbacks_pub" class="classic">'.
-	form::checkbox('trackbacks_pub','1',!$blog_settings->system->trackbacks_pub).
-	__('Moderate trackbacks').'</label></p>'.
-	
-	'<p><label for="trackbacks_ttl" class="classic">'.sprintf(__('Leave trackbacks open for %s days'),
-	form::field('trackbacks_ttl',2,3,$blog_settings->system->trackbacks_ttl)).'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.
-	
-	'<p><label for="comments_nofollow" class="classic">'.
-	form::checkbox('comments_nofollow','1',$blog_settings->system->comments_nofollow).
-	__('Add "nofollow" relation on comments and trackbacks links').'</label></p>'.
-	'</div>'.
-	'</div>'.
-	'<br class="clear" />'. //Opera sucks
-	'</fieldset>';
-	
-	echo
 	'<fieldset><legend>'.__('Blog presentation').'</legend>'.
 	'<div class="two-cols">'.
@@ -397,8 +342,4 @@
 	'<p><label for="nb_post_per_feed" class="classic">'.sprintf(__('Display %s entries per feed'),
 	form::field('nb_post_per_feed',2,3,$blog_settings->system->nb_post_per_feed)).
-	'</label></p>'.
-	
-	'<p><label for="nb_comment_per_feed" class="classic">'.sprintf(__('Display %s comments per feed'),
-	form::field('nb_comment_per_feed',2,3,$blog_settings->system->nb_comment_per_feed)).
 	'</label></p>'.
 	
Index: admin/comment.php
===================================================================
--- admin/comment.php	(revision 500)
+++ 	(revision )
@@ -1,236 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-$comment_id = null;
-$comment_dt = '';
-$comment_author = '';
-$comment_email = '';
-$comment_site = '';
-$comment_content = '';
-$comment_ip = '';
-$comment_status = '';
-$comment_trackback = 0;
-$comment_spam_status = '';
-
-# Status combo
-foreach ($core->blog->getAllCommentStatus() as $k => $v) {
-	$status_combo[$v] = (string) $k;
-}
-
-# Adding comment
-if (!empty($_POST['add']) && !empty($_POST['post_id']))
-{
-	try
-	{
-		$rs = $core->blog->getPosts(array('post_id' => $_POST['post_id'], 'post_type' => ''));
-		
-		if ($rs->isEmpty()) {
-			throw new Exception(__('Entry does not exist.'));
-		}
-		
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		
-		$cur->comment_author = $_POST['comment_author'];
-		$cur->comment_email = html::clean($_POST['comment_email']);
-		$cur->comment_site = html::clean($_POST['comment_site']);
-		$cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
-		$cur->post_id = (integer) $_POST['post_id'];
-		
-		# --BEHAVIOR-- adminBeforeCommentCreate
-		$core->callBehavior('adminBeforeCommentCreate',$cur);
-		
-		$comment_id = $core->blog->addComment($cur);
-		
-		# --BEHAVIOR-- adminAfterCommentCreate
-		$core->callBehavior('adminAfterCommentCreate',$cur,$comment_id);
-		
-		http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id,false).'&co=1&creaco=1');
-	} catch (Exception $e) {
-		$core->error->add($e->getMessage());
-	}
-}
-
-if (!empty($_REQUEST['id']))
-{
-	$params['comment_id'] = $_REQUEST['id'];
-	
-	try {
-		$rs = $core->blog->getComments($params);
-		if (!$rs->isEmpty()) {
-			$comment_id = $rs->comment_id;
-			$post_id = $rs->post_id;
-			$post_type = $rs->post_type;
-			$post_title = $rs->post_title;
-			$comment_dt = $rs->comment_dt;
-			$comment_author = $rs->comment_author;
-			$comment_email = $rs->comment_email;
-			$comment_site = $rs->comment_site;
-			$comment_content = $rs->comment_content;
-			$comment_ip = $rs->comment_ip;
-			$comment_status = $rs->comment_status;
-			$comment_trackback = (boolean) $rs->comment_trackback;
-			$comment_spam_status = $rs->comment_spam_status;
-		}
-	} catch (Exception $e) {
-		$core->error->add($e->getMessage());
-	}
-}
-
-if (!$comment_id && !$core->error->flag()) {
-	$core->error->add(__('No comment'));
-}
-
-if (!$core->error->flag() && isset($rs))
-{
-	$can_edit = $can_delete = $can_publish = $core->auth->check('contentadmin',$core->blog->id);
-	
-	if (!$core->auth->check('contentadmin',$core->blog->id) && $core->auth->userID() == $rs->user_id) {
-		$can_edit = true;
-		if ($core->auth->check('delete',$core->blog->id)) {
-			$can_delete = true;
-		}
-		if ($core->auth->check('publish',$core->blog->id)) {
-			$can_publish = true;
-		}
-	}
-	
-	# update comment
-	if (!empty($_POST['update']) && $can_edit)
-	{
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		
-		$cur->comment_author = $_POST['comment_author'];
-		$cur->comment_email = html::clean($_POST['comment_email']);
-		$cur->comment_site = html::clean($_POST['comment_site']);
-		$cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
-		
-		if (isset($_POST['comment_status'])) {
-			$cur->comment_status = (integer) $_POST['comment_status'];
-		}
-		
-		try
-		{
-			# --BEHAVIOR-- adminBeforeCommentUpdate
-			$core->callBehavior('adminBeforeCommentUpdate',$cur,$comment_id);
-			
-			$core->blog->updComment($comment_id,$cur);
-			
-			# --BEHAVIOR-- adminAfterCommentUpdate
-			$core->callBehavior('adminAfterCommentUpdate',$cur,$comment_id);
-			
-			http::redirect('comment.php?id='.$comment_id.'&upd=1');
-		}
-		catch (Exception $e)
-		{
-			$core->error->add($e->getMessage());
-		}
-	}
-	
-	if (!empty($_POST['delete']) && $can_delete)
-	{
-		try {
-			# --BEHAVIOR-- adminBeforeCommentDelete
-			$core->callBehavior('adminBeforeCommentDelete',$comment_id);
-			
-			$core->blog->delComment($comment_id);
-			http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id).'&co=1#c'.$comment_id,false);
-		} catch (Exception $e) {
-			$core->error->add($e->getMessage());
-		}
-	}
-	
-	if (!$can_edit) {
-		$core->error->add(__("You can't edit this comment."));
-	}
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-dcPage::open(__('Edit comment'),
-	dcPage::jsConfirmClose('comment-form').
-	dcPage::jsToolBar().
-	dcPage::jsLoad('js/_comment.js').
-	# --BEHAVIOR-- adminCommentHeaders
-	$core->callBehavior('adminCommentHeaders')
-);
-
-if ($comment_id)
-{
-	if (!empty($_GET['upd'])) {
-		echo '<p class="message">'.__('Comment has been successfully updated.').'</p>';
-	}
-	
-	$comment_mailto = '';
-	if ($comment_email)
-	{
-		$comment_mailto = '<a href="mailto:'.html::escapeHTML($comment_email)
-		.'?subject='.rawurlencode(sprintf(__('Your comment on my blog %s'),$core->blog->name))
-		.'&body='
-		.rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"),$rs->getPostURL()))
-		.'">'.__('Send an e-mail').'</a>';
-	}
-	
-	echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <a href="'.
-		$core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id.'"> '.
-		$post_title.'</a> &rsaquo; <span class="page-title">'.__('Edit comment').'</span></h2>';
-		
-	echo
-	'<form action="comment.php" method="post" id="comment-form">'.
-	'<p>'.__('IP address:').'<br /> '.
-	'<a href="comments.php?ip='.$comment_ip.'">'.$comment_ip.'</a></p>'.
-	
-	'<p>'.__('Date:').'<br /> '.
-	dt::dt2str(__('%Y-%m-%d %H:%M'),$comment_dt).'</p>'.
-	
-	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr>'.__('Author:').
-	form::field('comment_author',30,255,html::escapeHTML($comment_author)).
-	'</label></p>'.
-	
-	'<p><label for="comment_email">'.__('Email:').
-	form::field('comment_email',30,255,html::escapeHTML($comment_email)).
-	$comment_mailto.
-	'</label></p>'.
-	
-	'<p><label for="comment_site">'.__('Web site:').
-	form::field('comment_site',30,255,html::escapeHTML($comment_site)).
-	'</label></p>'.
-	
-	'<p><label for="comment_status">'.__('Status:').
-	form::combo('comment_status',$status_combo,$comment_status,'','',!$can_publish).
-	'</label></p>'.
-	
-	# --BEHAVIOR-- adminAfterCommentDesc
-	$core->callBehavior('adminAfterCommentDesc', $rs).
-	
-	'<p class="area"><label for="comment_content">'.__('Comment:').'</label> '.
-	form::textarea('comment_content',50,10,html::escapeHTML($comment_content)).
-	'</p>'.
-	
-	'<p>'.form::hidden('id',$comment_id).
-	$core->formNonce().
-	'<input type="submit" accesskey="s" name="update" value="'.__('Save').'" /> ';
-	
-	if ($can_delete) {
-		echo '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" />';
-	}
-	echo
-	'</p>'.
-	'</form>';
-}
-
-dcPage::helpBlock('core_comments');
-dcPage::close();
-?>
Index: admin/comments.php
===================================================================
--- admin/comments.php	(revision 796)
+++ 	(revision )
@@ -1,251 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-# Creating filter combo boxes
-# Filter form we'll put in html_block
-$status_combo = array(
-'-' => ''
-);
-foreach ($core->blog->getAllCommentStatus() as $k => $v) {
-	$status_combo[$v] = (string) $k;
-}
-
-$type_combo = array(
-'-' => '',
-__('comment') => 'co',
-__('trackback') => 'tb'
-);
-
-$sortby_combo = array(
-__('Date') => 'comment_dt',
-__('Entry title') => 'post_title',
-__('Author') => 'comment_author',
-__('Status') => 'comment_status'
-);
-
-$order_combo = array(
-__('Descending') => 'desc',
-__('Ascending') => 'asc'
-);
-
-
-/* Get comments
--------------------------------------------------------- */
-$author = isset($_GET['author']) ?	$_GET['author'] : '';
-$status = isset($_GET['status']) ?		$_GET['status'] : '';
-$type = !empty($_GET['type']) ?		$_GET['type'] : '';
-$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'comment_dt';
-$order = !empty($_GET['order']) ?		$_GET['order'] : 'desc';
-$ip = !empty($_GET['ip']) ?			$_GET['ip'] : '';
-
-$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip;
-
-$show_filters = false;
-
-$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
-$nb_per_page =  30;
-
-if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
-	if ($nb_per_page != $_GET['nb']) {
-		$show_filters = true;
-	}
-	$nb_per_page = (integer) $_GET['nb'];
-}
-
-$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-$params['no_content'] = true;
-
-# Author filter
-if ($author !== '') {
-	$params['q_author'] = $author;
-	$show_filters = true;
-} else {
-	$author='';
-}
-
-# - Type filter
-if ($type == 'tb' || $type == 'co') {
-	$params['comment_trackback'] = ($type == 'tb');
-	$show_filters = true;
-} else {
-	$type='';
-}
-
-# - Status filter
-if ($status !== '' && in_array($status,$status_combo)) {
-	$params['comment_status'] = $status;
-	$show_filters = true;
-} elseif (!$with_spam) {
-	$params['comment_status_not'] = -2;
-	$status='';
-} else {
-	$status='';
-}
-
-# - IP filter
-if ($ip) {
-	$params['comment_ip'] = $ip;
-	$show_filters = true;
-}
-
-# Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-	} else {
-		$order = 'desc';
-	}
-	
-	if ($sortby != 'comment_dt' || $order != 'desc') {
-		$show_filters = true;
-	}
-} else {
-	$sortby = 'comment_dt';
-	$order = 'desc';
-}
-
-# Actions combo box
-$combo_action = array();
-$default = '';
-if ($core->auth->check('publish,contentadmin',$core->blog->id))
-{
-	$combo_action[__('publish')] = 'publish';
-	$combo_action[__('unpublish')] = 'unpublish';
-	$combo_action[__('mark as pending')] = 'pending';
-	$combo_action[__('mark as junk')] = 'junk';
-}
-if ($core->auth->check('delete,contentadmin',$core->blog->id))
-{
-	$combo_action[__('Delete')] = 'delete';
-	if ($status == -2) {
-		$default = 'delete';
-	}
-}
-
-# --BEHAVIOR-- adminCommentsActionsCombo
-$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
-
-/* Get comments
--------------------------------------------------------- */
-try {
-	$comments = $core->blog->getComments($params);
-	$counter = $core->blog->getComments($params,true);
-	$comment_list = new adminCommentList($core,$comments,$counter->f(0));
-} catch (Exception $e) {
-	$core->error->add($e->getMessage());
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-$starting_script = dcPage::jsLoad('js/_comments.js');
-if (!$show_filters) {
-	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
-}
-# --BEHAVIOR-- adminCommentsHeaders
-$starting_script .= $core->callBehavior('adminCommentsHeaders');
-
-dcPage::open(__('Comments and trackbacks'),$starting_script);
-
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Comments and trackbacks').'</span></h2>';
-
-if (!$core->error->flag())
-{
-	# Filters
-	if (!$show_filters) {
-		echo '<p><a id="filter-control" class="form-control" href="#">'.
-		__('Filters').'</a></p>';
-	}
-	
-	echo
-	'<form action="comments.php" method="get" id="filters-form">'.
-	'<fieldset><legend>'.__('Filters').'</legend>'.
-	'<div class="three-cols">'.
-	'<div class="col">'.
-	'<label for="type">'.__('Type:').' '.
-	form::combo('type',$type_combo,$type).
-	'</label> '.
-	'<label for="status">'.__('Status:').' '.
-	form::combo('status',$status_combo,$status).
-	'</label>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="sortby">'.__('Order by:').' '.
-	form::combo('sortby',$sortby_combo,$sortby).
-	'</label> '.
-	'<label for="order">'.__('Sort:').' '.
-	form::combo('order',$order_combo,$order).
-	'</label></p>'.
-	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
-	__('Comments per page').'</label></p>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="author">'.__('Comment author:').' '.
-	form::field('author',20,255,html::escapeHTML($author)).
-	'</label>'.
-	'<label for="ip">'.__('IP address:').' '.
-	form::field('ip',20,39,html::escapeHTML($ip)).
-	'</label></p>'.
-	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
-	'</div>'.
-	
-	'</div>'.
-	'<br class="clear" />'. //Opera sucks
-	'</fieldset>'.
-	'</form>';
-	
-	if (!$with_spam) {
-		$spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0);
-		if ($spam_count == 1) {
-			echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '.
-			'<a href="comments.php?status=-2">'.__('Show it.').'</a></p>';
-		} elseif ($spam_count > 1) {
-			echo '<p>'.sprintf(__('You have %s spam comments.'),'<strong>'.$spam_count.'</strong>').' '.
-			'<a href="comments.php?status=-2">'.__('Show them.').'</a></p>';
-		}
-	}
-	
-	# Show comments
-	$comment_list->display($page,$nb_per_page,
-	'<form action="comments_actions.php" method="post" id="form-comments">'.
-	
-	'%s'.
-	
-	'<div class="two-cols">'.
-	'<p class="col checkboxes-helpers"></p>'.
-	
-	'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-	form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"').
-	$core->formNonce().
-	'<input type="submit" value="'.__('ok').'" /></p>'.
-	form::hidden(array('type'),$type).
-	form::hidden(array('sortby'),$sortby).
-	form::hidden(array('order'),$order).
-	form::hidden(array('author'),preg_replace('/%/','%%',$author)).
-	form::hidden(array('status'),$status).
-	form::hidden(array('ip'),preg_replace('/%/','%%',$ip)).
-	form::hidden(array('page'),$page).
-	form::hidden(array('nb'),$nb_per_page).
-	'</div>'.
-	
-	'</form>'
-	);
-}
-
-dcPage::helpBlock('core_comments');
-dcPage::close();
-?>
Index: admin/comments_actions.php
===================================================================
--- admin/comments_actions.php	(revision 270)
+++ 	(revision )
@@ -1,136 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-$params = array();
-$redir = 'comments.php';
-
-if (!empty($_POST['action']) && !empty($_POST['comments']))
-{
-	$comments = $_POST['comments'];
-	$action = $_POST['action'];
-	
-	if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
-	{
-		$redir = $_POST['redir'];
-	}
-	else
-	{
-		$redir =
-		'comments.php?type='.$_POST['type'].
-		'&author='.$_POST['author'].
-		'&status='.$_POST['status'].
-		'&sortby='.$_POST['sortby'].
-		'&ip='.$_POST['ip'].
-		'&order='.$_POST['order'].
-		'&page='.$_POST['page'].
-		'&nb='.(integer) $_POST['nb'];
-	}
-	
-	foreach ($comments as $k => $v) {
-		$comments[$k] = (integer) $v;
-	}
-	
-	$params['sql'] = 'AND C.comment_id IN('.implode(',',$comments).') ';
-	
-	if (!isset($_POST['full_content']) || empty($_POST['full_content'])) {
-		$params['no_content'] = true;
-	}
-	
-	$co = $core->blog->getComments($params);
-	
-	# --BEHAVIOR-- adminCommentsActions
-	$core->callBehavior('adminCommentsActions',$core,$co,$action,$redir);
-	
-	if (preg_match('/^(publish|unpublish|pending|junk)$/',$action))
-	{
-		switch ($action) {
-			case 'unpublish' : $status = 0; break;
-			case 'pending' : $status = -1; break;
-			case 'junk' : $status = -2; break;
-			default : $status = 1; break;
-		}
-		
-		while ($co->fetch())
-		{
-			try {
-				$core->blog->updCommentStatus($co->comment_id,$status);
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-			}
-		}
-		
-		if (!$core->error->flag()) {
-			http::redirect($redir);
-		}
-	}
-	elseif ($action == 'delete')
-	{
-		while ($co->fetch())
-		{
-			try {
-				# --BEHAVIOR-- adminBeforeCommentDelete
-				$core->callBehavior('adminBeforeCommentDelete',$co->comment_id);				
-				
-				$core->blog->delComment($co->comment_id);
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-			}
-		}
-		
-		if (!$core->error->flag()) {
-			http::redirect($redir);
-		}
-	}
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-dcPage::open(__('Comments'));
-
-if (!isset($action)) {
-	dcPage::close();
-	exit;
-}
-
-$hidden_fields = '';
-while ($co->fetch()) {
-	$hidden_fields .= form::hidden(array('comments[]'),$co->comment_id);
-} 
-
-if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
-{
-	$hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir']));
-}
-else
-{
-	$hidden_fields .=
-	form::hidden(array('type'),$_POST['type']).
-	form::hidden(array('author'),$_POST['author']).
-	form::hidden(array('status'),$_POST['status']).
-	form::hidden(array('sortby'),$_POST['sortby']).
-	form::hidden(array('ip'),$_POST['ip']).
-	form::hidden(array('order'),$_POST['order']).
-	form::hidden(array('page'),$_POST['page']).
-	form::hidden(array('nb'),$_POST['nb']);
-}
-
-# --BEHAVIOR-- adminCommentsActionsContent
-$core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields);
-
-echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('back').'</a></p>';
-
-dcPage::close();
-?>
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 691)
+++ admin/index.php	(revision 848)
@@ -71,7 +71,4 @@
 $str_entries = ($post_count > 1) ? __('%d entries') : __('%d entry');
 
-$comment_count = $core->blog->getComments(array(),true)->f(0);
-$str_comments = ($comment_count > 1) ? __('%d comments') : __('%d comment');
-
 $ws = $core->auth->user_prefs->addWorkspace('favorites');
 $count = 0;
@@ -83,5 +80,5 @@
 			$count++;
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
-				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
+				$fav['title']);
 			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
@@ -98,5 +95,5 @@
 			$count++;
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
-				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
+				$fav['title']);
 			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 557)
+++ admin/install/index.php	(revision 848)
@@ -166,18 +166,5 @@
 		$cur->post_content_xhtml = $cur->post_content;
 		$cur->post_status = 1;
-		$cur->post_open_comment = 1;
-		$cur->post_open_tb = 0;
 		$post_id = $core->blog->addPost($cur);
-		
-		# Add a comment to it
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		$cur->post_id = $post_id;
-		$cur->comment_tz = $default_tz;
-		$cur->comment_author = __('Dotclear Team');
-		$cur->comment_email = 'contact@dotclear.net';
-		$cur->comment_site = 'http://www.dotclear.org/';
-		$cur->comment_content = __("<p>This is a comment.</p>\n<p>To delete it, log in and ".
-			"view your blog's comments. Then you might remove or edit it.</p>");
-		$core->blog->addComment($cur);
 		
 		#  Plugins initialization
@@ -210,7 +197,4 @@
 		$init_fav['posts'] = array('posts','Entries','posts.php',
 			'images/menu/entries.png','images/menu/entries-b.png',
-			'usage,contentadmin',null,null);
-		$init_fav['comments'] = array('comments','Comments','comments.php',
-			'images/menu/comments.png','images/menu/comments-b.png',
 			'usage,contentadmin',null,null);
 		$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 776)
+++ admin/post.php	(revision 848)
@@ -30,6 +30,4 @@
 $post_status = $core->auth->getInfo('user_post_status');
 $post_selected = false;
-$post_open_comment = $core->blog->settings->system->allow_comments;
-$post_open_tb = $core->blog->settings->system->allow_trackbacks;
 
 $page_title = __('New entry');
@@ -117,6 +115,4 @@
 		$post_status = $post->post_status;
 		$post_selected = (boolean) $post->post_selected;
-		$post_open_comment = (boolean) $post->post_open_comment;
-		$post_open_tb = (boolean) $post->post_open_tb;
 		
 		$page_title = __('Edit entry');
@@ -170,6 +166,4 @@
 	}
 	
-	$post_open_comment = !empty($_POST['post_open_comment']);
-	$post_open_tb = !empty($_POST['post_open_tb']);
 	$post_selected = !empty($_POST['post_selected']);
 	$post_lang = $_POST['post_lang'];
@@ -207,6 +201,4 @@
 	$cur->post_status = $post_status;
 	$cur->post_selected = (integer) $post_selected;
-	$cur->post_open_comment = (integer) $post_open_comment;
-	$cur->post_open_tb = (integer) $post_open_tb;
 	
 	if (isset($_POST['post_url'])) {
@@ -275,7 +267,4 @@
 	$default_tab = '';
 }
-if (!empty($_GET['co'])) {
-	$default_tab = 'comments';
-}
 
 dcPage::open($page_title.' - '.__('Entries'),
@@ -285,5 +274,5 @@
 	dcPage::jsMetaEditor().
 	dcPage::jsLoad('js/_post.js').
-	dcPage::jsConfirmClose('entry-form','comment-form').
+	dcPage::jsConfirmClose('entry-form').
 	# --BEHAVIOR-- adminPostHeaders
 	$core->callBehavior('adminPostHeaders').
@@ -305,7 +294,4 @@
 }
 
-if (!empty($_GET['creaco'])) {
-		echo '<p class="message">'.__('Comment has been successfully created.').'</p>';
-	}
 
 # XHTML conversion
@@ -421,8 +407,4 @@
 	'<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'.
 	
-	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '.
-	__('Accept comments').'</label></p>'.
-	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
-	__('Accept trackbacks').'</label></p>'.
 	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '.
 	__('Selected entry').'</label></p>'.
@@ -457,165 +439,4 @@
 	echo '</div>';
 	
-	if ($post_id && $post->post_status == 1) {
-		echo '<p><a href="trackbacks.php?id='.$post_id.'" class="multi-part">'.
-		__('Ping blogs').'</a></p>';
-	}
-	
-}
-
-
-/* Comments and trackbacks
--------------------------------------------------------- */
-if ($post_id)
-{
-	$params = array('post_id' => $post_id, 'order' => 'comment_dt ASC');
-	
-	$comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0)));
-	$trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));
-	
-	# Actions combo box
-	$combo_action = array();
-	if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id))
-	{
-		$combo_action[__('publish')] = 'publish';
-		$combo_action[__('unpublish')] = 'unpublish';
-		$combo_action[__('mark as pending')] = 'pending';
-		$combo_action[__('mark as junk')] = 'junk';
-	}
-	
-	if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
-	{
-		$combo_action[__('Delete')] = 'delete';
-	}
-	
-	# --BEHAVIOR-- adminCommentsActionsCombo
-	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
-	
-	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
-	
-	echo
-	'<div id="comments" class="multi-part" title="'.__('Comments').'">';
-	
-	if ($has_action) {
-		echo '<form action="comments_actions.php" id="form-comments" method="post">';
-	}
-	
-	echo '<h3>'.__('Trackbacks').'</h3>';
-	
-	if (!$trackbacks->isEmpty()) {
-		showComments($trackbacks,$has_action,true);
-	} else {
-		echo '<p>'.__('No trackback').'</p>';
-	}
-	
-	echo '<h3>'.__('Comments').'</h3>';
-	if (!$comments->isEmpty()) {
-		showComments($comments,$has_action);
-	} else {
-		echo '<p>'.__('No comment').'</p>';
-	}
-	
-	if ($has_action) {
-		echo
-		'<div class="two-cols">'.
-		'<p class="col checkboxes-helpers"></p>'.
-		
-		'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-		form::combo('action',$combo_action).
-		form::hidden('redir','post.php?id='.$post_id.'&amp;co=1').
-		$core->formNonce().
-		'<input type="submit" value="'.__('ok').'" /></p>'.
-		'</div>'.
-		'</form>';
-	}
-	
-	echo '</div>';
-}
-
-/* Add a comment
--------------------------------------------------------- */
-if ($post_id)
-{
-	echo
-	'<div class="multi-part" id="add-comment" title="'.__('Add a comment').'">'.
-	'<h3>'.__('Add a comment').'</h3>'.
-	
-	'<form action="comment.php" method="post" id="comment-form">'.
-	'<div class="constrained">'.
-	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').
-	form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))).
-	'</label></p>'.
-	
-	'<p><label for="comment_email">'.__('Email:').
-	form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))).
-	'</label></p>'.
-	
-	'<p><label for="comment_site">'.__('Web site:').
-	form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))).
-	'</label></p>'.
-	
-	'<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '.
-	__('Comment:').'</label> '.
-	form::textarea('comment_content',50,8,html::escapeHTML('')).
-	'</p>'.
-	
-	'<p>'.form::hidden('post_id',$post_id).
-	$core->formNonce().
-	'<input type="submit" name="add" value="'.__('Save').'" /></p>'.
-	'</div>'.
-	'</form>'.
-	'</div>';
-}
-
-
-# Show comments or trackbacks
-function showComments($rs,$has_action,$tb=false)
-{
-	echo
-	'<table class="comments-list"><tr>'.
-	'<th colspan="2">'.__('Author').'</th>'.
-	'<th>'.__('Date').'</th>'.
-	'<th class="nowrap">'.__('IP address').'</th>'.
-	'<th>'.__('Status').'</th>'.
-	'<th>&nbsp;</th>'.
-	'</tr>';
-	
-	while($rs->fetch())
-	{
-		$comment_url = 'comment.php?id='.$rs->comment_id;
-		
-		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
-		switch ($rs->comment_status) {
-			case 1:
-				$img_status = sprintf($img,__('published'),'check-on.png');
-				break;
-			case 0:
-				$img_status = sprintf($img,__('unpublished'),'check-off.png');
-				break;
-			case -1:
-				$img_status = sprintf($img,__('pending'),'check-wrn.png');
-				break;
-			case -2:
-				$img_status = sprintf($img,__('junk'),'junk.png');
-				break;
-		}
-		
-		echo
-		'<tr class="line'.($rs->comment_status != 1 ? ' offline' : '').'"'.
-		' id="c'.$rs->comment_id.'">'.
-		
-		'<td class="nowrap">'.
-		($has_action ? form::checkbox(array('comments[]'),$rs->comment_id,'','','',0,'title="'.($tb ? __('select this trackback') : __('select this comment')).'"') : '').'</td>'.
-		'<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'.
-		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->comment_dt).'</td>'.
-		'<td class="nowrap"><a href="comments.php?ip='.$rs->comment_ip.'">'.$rs->comment_ip.'</a></td>'.
-		'<td class="nowrap status">'.$img_status.'</td>'.
-		'<td class="nowrap status"><a href="'.$comment_url.'">'.
-		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'.
-		
-		'</tr>';
-	}
-	
-	echo '</table>';
 }
 
Index: admin/search.php
===================================================================
--- admin/search.php	(revision 747)
+++ admin/search.php	(revision 848)
@@ -49,22 +49,4 @@
 		}
 	}
-	# Get comments
-	elseif ($qtype == 'c')
-	{
-		$starting_scripts .= dcPage::jsLoad('js/_comments.js');
-		
-		$params['search'] = $q;
-		$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-		$params['no_content'] = true;
-		$params['order'] = 'comment_dt DESC';
-		
-		try {
-			$comments = $core->blog->getComments($params);
-			$counter = $core->blog->getComments($params,true);
-			$comment_list = new adminCommentList($core,$comments,$counter->f(0));
-		} catch (Exception $e) {
-			$core->error->add($e->getMessage());
-		}
-	}
 }
 
@@ -78,5 +60,5 @@
 '<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'.
 '<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search entries').'</label> '.
-'<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search comments').'</label></p>'.
+'</p>'.
 '</p><input type="submit" value="'.__('Search').'" /></p>'.
 '</div>'.
@@ -134,44 +116,4 @@
 		);
 	}
-	# Show posts
-	elseif ($qtype == 'c')
-	{
-		# Actions combo box
-		$combo_action = array();
-		if ($core->auth->check('publish,contentadmin',$core->blog->id))
-		{
-			$combo_action[__('publish')] = 'publish';
-			$combo_action[__('unpublish')] = 'unpublish';
-			$combo_action[__('mark as pending')] = 'pending';
-			$combo_action[__('mark as junk')] = 'junk';
-		}
-		if ($core->auth->check('delete,contentadmin',$core->blog->id))
-		{
-			$combo_action[__('Delete')] = 'delete';
-		}
-		
-		if ($counter->f(0) > 0) {
-			printf('<h3>'.
-			($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')).
-			'</h3>',$counter->f(0));
-		}
-		
-		$comment_list->display($page,$nb_per_page,
-		'<form action="comments_actions.php" method="post" id="form-comments">'.
-		
-		'%s'.
-		
-		'<div class="two-cols">'.
-		'<p class="col checkboxes-helpers"></p>'.
-		
-		'<p class="col right"><label for="action2" class="classic">'.__('Selected comments action:').'</label> '.
-		form::combo(array('action','action2'),$combo_action).
-		'<input type="submit" value="'.__('ok').'" /></p>'.
-		form::hidden('redir',preg_replace('/%/','%%',$redir)).
-		$core->formNonce().
-		'</div>'.
-		'</form>'
-		);
-	}
 }
 
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 323)
+++ admin/services.php	(revision 848)
@@ -18,5 +18,4 @@
 
 $core->rest->addFunction('getPostById',array('dcRestMethods','getPostById'));
-$core->rest->addFunction('getCommentById',array('dcRestMethods','getCommentById'));
 $core->rest->addFunction('quickPost',array('dcRestMethods','quickPost'));
 $core->rest->addFunction('validatePostMarkup',array('dcRestMethods','validatePostMarkup'));
@@ -70,8 +69,4 @@
 		$rsp->post_status($rs->post_status);
 		$rsp->post_selected($rs->post_selected);
-		$rsp->post_open_comment($rs->post_open_comment);
-		$rsp->post_open_tb($rs->post_open_tb);
-		$rsp->nb_comment($rs->nb_comment);
-		$rsp->nb_trackback($rs->nb_trackback);
 		$rsp->user_name($rs->user_name);
 		$rsp->user_firstname($rs->user_firstname);
@@ -100,42 +95,4 @@
 	}
 	
-	public static function getCommentById($core,$get)
-	{
-		if (empty($get['id'])) {
-			throw new Exception('No comment ID');
-		}
-		
-		$rs = $core->blog->getComments(array('comment_id' => (integer) $get['id']));
-		
-		if ($rs->isEmpty()) {
-			throw new Exception('No comment for this ID');
-		}
-		
-		$rsp = new xmlTag('post');
-		$rsp->id = $rs->comment_id;
-		
-		$rsp->comment_dt($rs->comment_dt);
-		$rsp->comment_upddt($rs->comment_upddt);
-		$rsp->comment_author($rs->comment_author);
-		$rsp->comment_site($rs->comment_site);
-		$rsp->comment_content($rs->comment_content);
-		$rsp->comment_trackback($rs->comment_trackback);
-		$rsp->comment_status($rs->comment_status);
-		$rsp->post_title($rs->post_title);
-		$rsp->post_url($rs->post_url);
-		$rsp->post_id($rs->post_id);
-		$rsp->post_dt($rs->post_dt);
-		$rsp->user_id($rs->user_id);
-		
-		$rsp->comment_display_content($rs->getContent(true));
-		
-		if ($core->auth->userID()) {
-			$rsp->comment_ip($rs->comment_ip);
-			$rsp->comment_email($rs->comment_email);
-			$rsp->comment_spam_disp(dcAntispam::statusMessage($rs));
-		}
-		
-		return $rsp;
-	}
 	
 	public static function quickPost($core,$get,$post)
@@ -150,6 +107,4 @@
 		$cur->post_lang = !empty($post['post_lang']) ? $post['post_lang'] : '';
 		$cur->post_status = !empty($post['post_status']) ? (integer) $post['post_status'] : 0;
-		$cur->post_open_comment = (integer) $core->blog->settings->system->allow_comments;
-		$cur->post_open_tb = (integer) $core->blog->settings->system->allow_trackbacks;
 		
 		# --BEHAVIOR-- adminBeforePostCreate
