Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -0,0 +1,59 @@
<?php
/**
* @file bulkMailFilter.php Abstract Bulk Mail Filter Class
*
* $Copyright: $
* $License: $
* $Author: mark $
* $LastChangedDate: 2012-02-13 05:07:16 -0500 (Mon, 13 Feb 2012) $
* $Revision: 10290 $
* @since 23rd August 2012
*/
abstract class bulkMailFilter
{
/**
* Constructor
*/
public function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
/**
* Get Setting Field
*
* @param mixed Value as returned by the save method
* @return string HTML to show in ACP when adding a reminder that will allow admins to set up a reminder
*/
abstract public function getSettingField( $criteria );
/**
* Save Setting Field
*
* @param array POST data from the form using the form elements provided in the getSettingField method
* @return mixed If this criteria should be ignored, return FALSE. Otherwise, return whatever data you will need in your
* getMembers method to fetch members that match the chosen criteria
* @throws Exception You can throw an Exception with the message being the error to display if the user has provided invalid data
*/
abstract public function save( $post );
/**
* Get Members
*
* @param mixed Whatever data was returned by save method
* @return array Array with two elements:
* 'joins' should be an array of any additional tables to join (as per ipsRegistry::DB()->build)
* 'where' should be an array of where clauses
* The table 'members' is already available with the prefix 'm'
*/
abstract public function getMembers( $data );
}
@@ -3,10 +3,10 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Subscriptions Hooks Gateway "Handler"
* Owner: Matt "Oh Lord, why did I get assigned this?" Mecham
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
class members_hookGateway
{
@@ -0,0 +1,80 @@
<?php
/**
* @file mandrill.php Mandrill Integration Class
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2012 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 10 October 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class Mandrill
* @brief Mandrill Integration Class
*/
class Mandrill
{
/**
* Base URL
*/
const URL = 'https://mandrillapp.com/api/1.0/';
/**
* API Key
*
* @var string
*/
private $api_key;
/**
* classFileManagement
*
* @var classFileManagement
*/
private $cfm;
/**
* Constructor
*
* @param string [Optional API key to override setting]
*/
public function __construct( $overrideApiKey=NULL )
{
require_once IPS_KERNEL_PATH . 'classFileManagement.php';
$this->cfm = new classFileManagement();
$this->api_key = $overrideApiKey ? $overrideApiKey : ipsRegistry::$settings['mandrill_api_key'];
}
/**
* Send API Call
*
* @param string Method
* @param array Arguments
* @return stdClass Object from returned JSON
*/
public function __call( $method, $args )
{
$send = array_merge( array( 'key' => $this->api_key ), ( isset( $args[0] ) and is_array( $args[0] ) ) ? $args[0] : array() );
if ( IPS_DOC_CHAR_SET != 'UTF-8' )
{
$send['message']['html'] = IPSText::convertCharsets( $send['message']['html'], IPS_DOC_CHAR_SET, 'utf-8' );
}
$response = $this->cfm->postFileContents( self::URL . str_replace( '_', '/', $method ) . '.json', json_encode( $send ) );
if ( $json = json_decode( $response ) )
{
return $json;
}
return NULL;
}
}
File diff suppressed because it is too large. Load diff