| 1 |
<?php |
<?php |
| 2 |
// $Id: cocomment.module,v 1.7 2008/01/17 10:29:45 sanduhrs Exp $ |
// $Id: cocomment.module,v 1.8 2008/01/17 11:26:20 sanduhrs Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* CoComment integration |
* CoComment integration |
| 7 |
* |
* |
| 8 |
* @author |
* @author |
| 9 |
* Developed by Olaf Schettler |
* Developed by Olaf Schettler |
| 10 |
* Update to Drupal-5 by Stefan Auditor <stefan.auditor@erdfisch.de> |
* Update to Drupal-5/6 by |
| 11 |
|
* Stefan Auditor <stefan.auditor@erdfisch.de> |
| 12 |
*/ |
*/ |
| 13 |
|
|
| 14 |
/** |
/** |
| 15 |
* Implementation of hook_menu(). |
* Implementation of hook_menu(). |
| 16 |
*/ |
*/ |
| 17 |
function cocomment_menu($may_cache) { |
function cocomment_menu() { |
| 18 |
if (!$may_cache) { |
//This is a workaround to reset $op to it's original value |
| 19 |
//This is a workaround to reset $op to it's original value |
//that has been changed by cocomment's enabler.js and prevents |
| 20 |
//that has been changed by cocomment's enabler.js and prevents |
//the comment submission |
| 21 |
//the comment submission |
if ($_POST['form_id'] == 'comment_form') { |
| 22 |
if ($_POST['form_id'] == 'comment_form') { |
if ($_POST['op'] != t('Preview comment') AND $_POST['op'] != t('Post comment')) { |
| 23 |
if ($_POST['op'] != t('Preview comment') AND $_POST['op'] != t('Post comment')) { |
$_POST['op'] = t('Post comment'); |
|
$_POST['op'] = t('Post comment'); |
|
|
} |
|
| 24 |
} |
} |
| 25 |
} |
} |
| 26 |
} |
} |