- Patch #141131 by mfer: remember anonyous comment posters.
parent
8cc8f87896
commit
d1e28d4273
|
@ -27,6 +27,7 @@ Drupal 6.0, xxxx-xx-xx (development version)
|
||||||
* Check for clean URL support automatically with JavaScript.
|
* Check for clean URL support automatically with JavaScript.
|
||||||
* Removed default/settings.php. Instead the installer will create it from default.settings.php.
|
* Removed default/settings.php. Instead the installer will create it from default.settings.php.
|
||||||
* Made it possible to configure your own date formats.
|
* Made it possible to configure your own date formats.
|
||||||
|
* Remember anonymous comment posters.
|
||||||
- Theme system:
|
- Theme system:
|
||||||
* Added .info files to themes and made it easier to specify regions and features.
|
* Added .info files to themes and made it easier to specify regions and features.
|
||||||
* Added theme registry: modules can directly provide .tpl.php files for their themes without having to create theme_ functions.
|
* Added theme registry: modules can directly provide .tpl.php files for their themes without having to create theme_ functions.
|
||||||
|
|
|
@ -1458,6 +1458,10 @@ function comment_form($edit, $title = NULL) {
|
||||||
|
|
||||||
$op = isset($_POST['op']) ? $_POST['op'] : '';
|
$op = isset($_POST['op']) ? $_POST['op'] : '';
|
||||||
|
|
||||||
|
if (!$user->uid && variable_get('comment_anonymous', COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
|
||||||
|
drupal_add_js(drupal_get_path('module', 'comment') . '/comment.js');
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->uid) {
|
if ($user->uid) {
|
||||||
if (!empty($edit['cid']) && user_access('administer comments')) {
|
if (!empty($edit['cid']) && user_access('administer comments')) {
|
||||||
if (!empty($edit['author'])) {
|
if (!empty($edit['author'])) {
|
||||||
|
@ -1681,6 +1685,10 @@ function comment_form_add_preview($form, $edit, &$form_state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_form_validate($form_values, $form, &$form_state) {
|
function comment_form_validate($form_values, $form, &$form_state) {
|
||||||
|
foreach (array('name', 'homepage', 'mail') as $field) {
|
||||||
|
//set cookie for 365 days
|
||||||
|
setrawcookie('comment_info_' . $field, rawurlencode($form_values[$field]), time() + 31536000);
|
||||||
|
}
|
||||||
comment_validate($form_values);
|
comment_validate($form_values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue