forked from GNUsocial/gnu-social
		
	Don't enqueue into plugin or SMS queues when disabled (breaks unqueuehandler if SMS queue isn't attached)
This commit is contained in:
		
							
								
								
									
										12
									
								
								lib/util.php
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								lib/util.php
									
									
									
									
									
								
							@@ -996,9 +996,14 @@ function common_enqueue_notice($notice)
 | 
				
			|||||||
    static $localTransports = array('omb',
 | 
					    static $localTransports = array('omb',
 | 
				
			||||||
                                    'ping');
 | 
					                                    'ping');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    static $allTransports = array('sms', 'plugin');
 | 
					    $transports = array();
 | 
				
			||||||
 | 
					    if (common_config('sms', 'enabled')) {
 | 
				
			||||||
    $transports = $allTransports;
 | 
					        $transports[] = 'sms';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    if (Event::hasHandler('HandleQueuedNotice')) {
 | 
				
			||||||
 | 
					        $transports[] = 'plugin';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $xmpp = common_config('xmpp', 'enabled');
 | 
					    $xmpp = common_config('xmpp', 'enabled');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1006,6 +1011,7 @@ function common_enqueue_notice($notice)
 | 
				
			|||||||
        $transports[] = 'jabber';
 | 
					        $transports[] = 'jabber';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // @fixme move these checks into QueueManager and/or individual handlers
 | 
				
			||||||
    if ($notice->is_local == Notice::LOCAL_PUBLIC ||
 | 
					    if ($notice->is_local == Notice::LOCAL_PUBLIC ||
 | 
				
			||||||
        $notice->is_local == Notice::LOCAL_NONPUBLIC) {
 | 
					        $notice->is_local == Notice::LOCAL_NONPUBLIC) {
 | 
				
			||||||
        $transports = array_merge($transports, $localTransports);
 | 
					        $transports = array_merge($transports, $localTransports);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user