Changeset 26859
- Timestamp:
- Jan 18, 2014, 3:31:03 PM (10 years ago)
- Location:
- extensions/rv_akismet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_akismet/check.inc.php
r18945 r26859 1 1 <?php 2 function akismet_user_comment_check($action, $comment )2 function akismet_user_comment_check($action, $comment, $where) 3 3 { 4 4 global $conf; … … 13 13 14 14 set_make_full_url(); 15 $url = duplicate_picture_url( array('image_id'=>$comment['image_id']) ); 15 switch($where) 16 { 17 case 'guestbook': 18 $url = defined('GUESTBOOK_URL') ? GUESTBOOK_URL : get_absolute_root_url(); 19 break; 20 case 'album': 21 // build category url with minimum data (only id is always known) 22 $url = duplicate_index_url( array( 23 'section'=>'categories', 24 'category'=>array('id'=>$comment['category_id'], 'name'=>'', 'permalink'=>'') 25 ) ); 26 break; 27 default: 28 $url = duplicate_picture_url( array('image_id'=>$comment['image_id']) ); 29 } 16 30 unset_make_full_url(); 31 17 32 $aki_comm = array( 18 33 'author' => $comment['author'], -
extensions/rv_akismet/main.inc.php
r25963 r26859 11 11 define('AKIS_PATH' , PHPWG_PLUGINS_PATH . AKIS_DIR . '/'); 12 12 13 add_event_handler('user_comment_check', 'akismet_user_comment_check_wrapper', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2);13 add_event_handler('user_comment_check', 'akismet_user_comment_check_wrapper', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 3); 14 14 add_event_handler('loc_begin_page_tail', 'akismet_page_tail' ); 15 15 … … 34 34 35 35 36 function akismet_user_comment_check_wrapper($action, $comment )36 function akismet_user_comment_check_wrapper($action, $comment, $where=null) 37 37 { 38 38 include_once( dirname(__FILE__).'/check.inc.php' ); 39 $action = akismet_user_comment_check($action, $comment );39 $action = akismet_user_comment_check($action, $comment, $where); 40 40 return $action; 41 41 }
Note: See TracChangeset
for help on using the changeset viewer.