Changeset 662 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php
- Timestamp:
- Oct 9, 2010, 2:15:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php
r538 r662 35 35 } 36 36 37 function Notification_triggerEvent($ category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null)37 function Notification_triggerEvent($force_reserve = false,$category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null) 38 38 { 39 39 global $xoops_db,$xoops_config; 40 global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin; 41 40 42 //When notifying by a private message, 41 43 //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method. … … 56 58 // } 57 59 // } 58 if ( defined("XOOPS_MAINFILE_INCLUDED")) {60 if (!$force_reserve && defined("XOOPS_MAINFILE_INCLUDED") ) { 59 61 if ( defined("XPRESS_EVENT_DEBUG")) xpress_debug_message($message = 'call $notification_handler->triggerEvent'); 60 62 $module_id = get_xpress_modid() ; … … 72 74 // require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ; 73 75 // $notification_handler =& xoops_gethandler( 'notification' ) ; 74 Notification_triggerEvent( 'global' , 0 , 'waiting') ; 76 77 // Fixed Compile Error : /wp-includes/class-phpmailer.php - Cannot redeclare class PHPMailer 78 $comments_notify = get_option('comments_notify'); 79 if($comments_notify) $force_reserve = true; else $force_reserve = false; 80 81 Notification_triggerEvent($force_reserve,'global' , 0 , 'waiting') ; 75 82 } 76 83 … … 103 110 104 111 $comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ; 105 Notification_triggerEvent('global' , 0 , 'comment' , $comment_tags , false); 106 Notification_triggerEvent('author' , $post_author , 'comment' , $comment_tags , false); 107 Notification_triggerEvent('post' , $comment_post_ID , 'comment' , $comment_tags , false); 112 113 // Fixed Compile Error : /wp-includes/class-phpmailer.php - Cannot redeclare class PHPMailer 114 $moderation_notify = get_option('moderation_notify'); 115 if($moderation_notify) $force_reserve = true; else $force_reserve = false; 116 117 Notification_triggerEvent($force_reserve, 'global' , 0 , 'comment' , $comment_tags , false); 118 Notification_triggerEvent($force_reserve, 'author' , $post_author , 'comment' , $comment_tags , false); 119 Notification_triggerEvent($force_reserve, 'post' , $comment_post_ID , 'comment' , $comment_tags , false); 108 120 109 121 // categorie notification … … 120 132 $cat_name = $categorie->cat_name; 121 133 $comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_CAT_TITLE' => $cat_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ; 122 Notification_triggerEvent( 'category' , $cat_id , 'comment' , $comment_tags , false);134 Notification_triggerEvent($force_reserve, 'category' , $cat_id , 'comment' , $comment_tags , false); 123 135 124 136 } … … 152 164 153 165 $posts_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ; 154 166 $force_reserve = false; 155 167 switch ($not_event) { 156 168 case 'newpost' : 157 Notification_triggerEvent( 'global' , 0 , 'newpost' , $posts_tags , false);158 Notification_triggerEvent( 'author' , $post_author , 'newpost' , $posts_tags , false);169 Notification_triggerEvent($force_reserve, 'global' , 0 , 'newpost' , $posts_tags , false); 170 Notification_triggerEvent($force_reserve, 'author' , $post_author , 'newpost' , $posts_tags , false); 159 171 160 172 // categorie notification … … 171 183 $cat_name = $categorie->cat_name; 172 184 $posts_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_CAT_TITLE' => $cat_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ; 173 Notification_triggerEvent( 'category' , $cat_id , 'newpost' , $posts_tags , false);185 Notification_triggerEvent($force_reserve, 'category' , $cat_id , 'newpost' , $posts_tags , false); 174 186 } 175 187 break; 176 188 case 'editpost' : 177 Notification_triggerEvent( 'post' , $post_id , 'editpost' , $posts_tags , false);189 Notification_triggerEvent($force_reserve, 'post' , $post_id , 'editpost' , $posts_tags , false); 178 190 break; 179 191 default :
Note: See TracChangeset
for help on using the changeset viewer.