<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
* @return array
* @throws Exception
*/
- static function details($csID, $ssID = NULL, $gID = NULL) {
+ public static function details($csID, $ssID = NULL, $gID = NULL) {
$error = array(NULL, NULL, NULL);
if (!$csID &&
if (!$ext->isExtensionKey($customSearchClass)) {
$customSearchFile = str_replace('_',
- DIRECTORY_SEPARATOR,
- $customSearchClass
- ) . '.php';
+ DIRECTORY_SEPARATOR,
+ $customSearchClass
+ ) . '.php';
}
else {
$customSearchFile = $ext->keyToPath($customSearchClass);
$customSearchClass = $ext->keyToClass($customSearchClass);
}
- $error = include_once ($customSearchFile);
+ $error = include_once $customSearchFile;
if ($error == FALSE) {
CRM_Core_Error::fatal('Custom search file: ' . $customSearchFile . ' does not exist. Please verify your custom search settings in CiviCRM administrative panel.');
}
* @return mixed
* @throws Exception
*/
- static function customClass($csID, $ssID) {
+ public static function customClass($csID, $ssID) {
list($customSearchID, $customSearchClass, $formValues) = self::details($csID, $ssID);
if (!$customSearchID) {
}
// instantiate the new class
- $customClass = new $customSearchClass( $formValues );
+ $customClass = new $customSearchClass($formValues);
return $customClass;
}
*
* @return mixed
*/
- static function contactIDSQL($csID, $ssID) {
+ public static function contactIDSQL($csID, $ssID) {
$customClass = self::customClass($csID, $ssID);
return $customClass->contactIDs();
}
*
* @return array
*/
- static function &buildFormValues($args) {
+ public static function &buildFormValues($args) {
$args = trim($args);
$values = explode("\n", $args);
*
* @return array
*/
- static function fromWhereEmail($csID, $ssID) {
+ public static function fromWhereEmail($csID, $ssID) {
$customClass = self::customClass($csID, $ssID);
$from = $customClass->from();
$where = $customClass->where();
-
return array($from, $where);
}
-}
+}