/[drupal]/contributions/modules/cocomment/cocomment.module
ViewVC logotype

Diff of /contributions/modules/cocomment/cocomment.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8, Thu Jan 17 11:26:20 2008 UTC revision 1.9, Sat Jul 19 22:02:02 2008 UTC
# Line 1  Line 1 
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
# Line 7  Line 7 
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  }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.2