Commit 56fdfc52 authored by totten's avatar totten

INFRA-132 - bin, extern, install, settings, xml - PHPStorm cleanup

parent 92915c55
......@@ -190,9 +190,9 @@ class CiviContributeProcessor {
$dao->trxn_id = $value;
if ($dao->find(TRUE)) {
preg_match('/(\d+)$/', $name, $matches);
$seq = $matches[1];
$seq = $matches[1];
$email = $result["l_email{$seq}"];
$amt = $result["l_amt{$seq}"];
$amt = $result["l_amt{$seq}"];
CRM_Core_Error::debug_log_message("Skipped (already recorded) - $email, $amt, $value ..<p>", TRUE);
continue;
}
......@@ -234,9 +234,9 @@ class CiviContributeProcessor {
}
}
if ($result['l_errorcode0'] == '11002') {
$end = $result['l_timestamp99'];
$end_time = strtotime("{$end}", time());
$end_date = date('Y-m-d\T00:00:00.00\Z', $end_time);
$end = $result['l_timestamp99'];
$end_time = strtotime("{$end}", time());
$end_date = date('Y-m-d\T00:00:00.00\Z', $end_time);
$args['enddate'] = $end_date;
}
} while ($result['l_errorcode0'] == '11002');
......@@ -272,8 +272,8 @@ class CiviContributeProcessor {
if (is_array($response[1][$response[0]]['notifications']['charge-amount-notification'])) {
if (array_key_exists('google-order-number',
$response[1][$response[0]]['notifications']['charge-amount-notification']
)) {
$response[1][$response[0]]['notifications']['charge-amount-notification']
)) {
// sometimes 'charge-amount-notification' itself is an absolute
// array and not array of arrays. This is the case when there is only one
// charge-amount-notification. Hack for this special case -
......@@ -283,10 +283,10 @@ class CiviContributeProcessor {
}
foreach ($response[1][$response[0]]['notifications']['charge-amount-notification']
as $amtData
as $amtData
) {
$searchParams = array(
'order-numbers' => array($amtData['google-order-number']['VALUE']),
'order-numbers' => array($amtData['google-order-number']['VALUE']),
'notification-types' => array('risk-information', 'new-order', 'charge-amount'),
);
$response = CRM_Core_Payment_Google::invokeAPI($paymentProcessor,
......@@ -323,9 +323,9 @@ class CiviContributeProcessor {
static
function csv() {
$csvFile = '/home/deepak/Desktop/crm-4247.csv';
$csvFile = '/home/deepak/Desktop/crm-4247.csv';
$delimiter = ";";
$row = 1;
$row = 1;
$handle = fopen($csvFile, "r");
if (!$handle) {
......
......@@ -50,7 +50,7 @@ function initialize() {
function run() {
initialize();
$fh = fopen('php://output', 'w');
$fh = fopen('php://output', 'w');
$rows = CRM_Upgrade_Incremental_php_FourTwo::deleteInvalidPairs();
if (!empty($rows)) {
......
......@@ -36,7 +36,6 @@
* base class for doing all command line operations via civicrm
* used by cli.php
**/
class civicrm_cli {
// required values that must be passed
// via the command line
......@@ -138,7 +137,7 @@ class civicrm_cli {
// find the value of this arg
if (preg_match('/=/', $arg)) {
$parts = explode('=', $arg);
$arg = $parts[0];
$arg = $parts[0];
$value = $parts[1];
}
else {
......@@ -199,7 +198,7 @@ class civicrm_cli {
$_SERVER['HTTP_HOST'] = $this->_site;
$_SERVER['REMOTE_ADDR'] = "127.0.0.1";
$_SERVER['SERVER_SOFTWARE'] = NULL;
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_METHOD'] = 'GET';
// SCRIPT_FILENAME needed by CRM_Utils_System::cmsRootPath
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
......@@ -224,9 +223,9 @@ class civicrm_cli {
// Now we have a Config object, we can set it from the Base URL.
if ($_SERVER['HTTP_HOST'] == 'localhost') {
$_SERVER['HTTP_HOST'] = preg_replace(
'!^https?://([^/]+)/$!i',
'$1',
$this->_config->userFrameworkBaseURL);
'!^https?://([^/]+)/$!i',
'$1',
$this->_config->userFrameworkBaseURL);
}
$class = 'CRM_Utils_System_' . $this->_config->userFramework;
......@@ -314,7 +313,6 @@ class civicrm_cli {
* class used by csv/export.php to export records from
* the database in a csv file format.
**/
class civicrm_cli_csv_exporter extends civicrm_cli {
var $separator = ',';
......@@ -358,7 +356,6 @@ class civicrm_cli_csv_exporter extends civicrm_cli {
* records based on those found in a csv file
* passed to the script.
**/
class civicrm_cli_csv_file extends civicrm_cli {
var $header;
var $separator = ',';
......@@ -432,7 +429,6 @@ class civicrm_cli_csv_file extends civicrm_cli {
* used by csv/import.php
*
**/
class civicrm_cli_csv_importer extends civicrm_cli_csv_file {
/**
* @param array $params
......@@ -453,7 +449,6 @@ class civicrm_cli_csv_importer extends civicrm_cli_csv_file {
* used by csv/delete.php
*
**/
class civicrm_cli_csv_deleter extends civicrm_cli_csv_file {
/**
* @param array $params
......
......@@ -132,9 +132,9 @@ LEFT JOIN civicrm_event event ON ( event.id = participant.event_id )
$transaction = new CRM_Core_Transaction();
require_once 'CRM/Event/BAO/Participant.php';
$ids = array($participantId);
$ids = array($participantId);
$expiredId = array_search('Expired', $expiredStatuses);
$results = CRM_Event_BAO_Participant::transitionParticipants($ids, $expiredId, $values['status_id'], TRUE, TRUE);
$results = CRM_Event_BAO_Participant::transitionParticipants($ids, $expiredId, $values['status_id'], TRUE, TRUE);
$transaction->commit();
if (!empty($results)) {
......
......@@ -69,20 +69,25 @@ class CRM_UpdateGreeting {
$config = CRM_Core_Config::singleton();
$contactType = CRM_Utils_Request::retrieve('ct', 'String', CRM_Core_DAO::$_nullArray, FALSE, NULL, 'REQUEST');
if (!in_array($contactType,
array('Individual', 'Household', 'Organization')
)) {
array('Individual', 'Household', 'Organization')
)
) {
CRM_Core_Error::fatal(ts('Invalid Contact Type.'));
}
$greeting = CRM_Utils_Request::retrieve('gt', 'String', CRM_Core_DAO::$_nullArray, FALSE, NULL, 'REQUEST');
if (!in_array($greeting,
array('email_greeting', 'postal_greeting', 'addressee')
)) {
array('email_greeting', 'postal_greeting', 'addressee')
)
) {
CRM_Core_Error::fatal(ts('Invalid Greeting Type.'));
}
if (in_array($greeting, array(
'email_greeting', 'postal_greeting')) && $contactType == 'Organization') {
'email_greeting',
'postal_greeting'
)) && $contactType == 'Organization'
) {
CRM_Core_Error::fatal(ts('You cannot use %1 for contact type %2.', array(1 => $greeting, 2 => $contactType)));
}
......@@ -92,8 +97,8 @@ class CRM_UpdateGreeting {
if (!$valueID) {
require_once 'CRM/Core/OptionGroup.php';
$contactTypeFilters = array(1 => 'Individual', 2 => 'Household', 3 => 'Organization');
$filter = CRM_Utils_Array::key($contactType, $contactTypeFilters);
$defaulValueID = CRM_Core_OptionGroup::values($greeting, NULL, NULL, NULL,
$filter = CRM_Utils_Array::key($contactType, $contactTypeFilters);
$defaulValueID = CRM_Core_OptionGroup::values($greeting, NULL, NULL, NULL,
" AND is_default = 1 AND ( filter = {$filter} OR filter = 0 )",
"value"
);
......@@ -124,7 +129,9 @@ class CRM_UpdateGreeting {
$force = CRM_Utils_Request::retrieve('force', 'String', CRM_Core_DAO::$_nullArray, FALSE, NULL, 'REQUEST');
$processAll = $processOnlyIdSet = FALSE;
if (in_array($force, array(
1, 'true'))) {
1,
'true'
))) {
$processAll = TRUE;
}
elseif ($force == 2) {
......
......@@ -70,7 +70,10 @@ class CRM_UpdatePledgeRecord {
//unset statues that we never use for pledges
foreach (array(
'Completed', 'Cancelled', 'Failed') as $statusKey) {
'Completed',
'Cancelled',
'Failed'
) as $statusKey) {
if ($key = CRM_Utils_Array::key($statusKey, $allStatus)) {
unset($allStatus[$key]);
}
......@@ -143,7 +146,8 @@ SELECT pledge.contact_id as contact_id,
if (CRM_Utils_Date::overdue(CRM_Utils_Date::customFormat($dao->scheduled_date, '%Y%m%d'),
$now
) && $dao->payment_status != array_search('Overdue', $allStatus)) {
) && $dao->payment_status != array_search('Overdue', $allStatus)
) {
$pledgePayments[$dao->pledge_id][$dao->payment_id] = $dao->payment_id;
}
}
......@@ -170,7 +174,7 @@ SELECT pledge.contact_id as contact_id,
require_once 'CRM/Core/SelectValues.php';
$domain = CRM_Core_BAO_Domain::getDomain();
$tokens = array(
'domain' => array('name', 'phone', 'address', 'email'),
'domain' => array('name', 'phone', 'address', 'email'),
'contact' => CRM_Core_SelectValues::contactTokens(),
);
......
......@@ -473,7 +473,7 @@ class Givi {
* @return bool
*/
function doReview($baseBranch = NULL) {
if (! $this->doCheckoutAll($baseBranch)) {
if (!$this->doCheckoutAll($baseBranch)) {
return FALSE;
}
......@@ -485,7 +485,8 @@ class Givi {
$pullRequest = PullRequest::get($prUrl, $this->repos);
if ($pullRequest) {
$pullRequests[] = $pullRequest;
} else {
}
else {
return $this->returnError("Invalid pull-request URL: $prUrl");
}
}
......@@ -551,14 +552,15 @@ class Givi {
return $this->returnError("Missing <branch>[:<branch>]\n");
}
if (FALSE !== strpos($newBranchNames, ':')) {
list ($newBranchFromName,$newBranchToName) = explode(':', $newBranchNames);
list ($newBranchFromName, $newBranchToName) = explode(':', $newBranchNames);
foreach ($this->repos as $repo => $relPath) {
$filteredFromName = $this->filterBranchName($repo, $newBranchFromName);
$filteredToName = $this->filterBranchName($repo, $newBranchToName);
$this->run($repo, $relPath, 'git', 'push', $newBranchRepo, $filteredFromName . ':' . $filteredToName);
}
} else {
}
else {
foreach ($this->repos as $repo => $relPath) {
$filteredName = $this->filterBranchName($repo, $newBranchNames);
$this->run($repo, $relPath, 'git', 'push', $newBranchRepo, $filteredName);
......@@ -630,7 +632,8 @@ class Givi {
printf("\n\n\nRUN [%s]: %s\n", $repoName, $command);
if ($this->dryRun) {
$r = NULL;
} else {
}
else {
$r = system($command);
}
......@@ -729,7 +732,8 @@ class HttpClient {
// PHP native client is unreliable PITA for HTTPS
if (exec("which wget")) {
self::run('wget', '-q', '-O', $file, $url);
} elseif (exec("which curl")) {
}
elseif (exec("which curl")) {
self::run('curl', '-o', $file, $url);
}
......
......@@ -42,7 +42,7 @@ $authorizeNetIPN = new CRM_Core_Payment_AuthorizeNetIPN($_REQUEST);
try {
$authorizeNetIPN->main();
}
catch(CRM_Core_Exception $e) {
catch (CRM_Core_Exception $e) {
CRM_Core_Error::debug_log_message($e->getMessage());
CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
......
......@@ -51,7 +51,7 @@ else {
try {
$paypalIPN->main();
}
catch(CRM_Core_Exception $e) {
catch (CRM_Core_Exception $e) {
CRM_Core_Error::debug_log_message($e->getMessage());
CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
......
......@@ -35,9 +35,9 @@ $params = array(1 => array($_GET['userid'], 'String'));
$dpsSettings = CRM_Core_DAO::executeQuery($query, $params);
while ($dpsSettings->fetch()) {
$dpsUrl = $dpsSettings->url_site;
$dpsUser = $dpsSettings->user_name;
$dpsKey = $dpsSettings->password;
$dpsUrl = $dpsSettings->url_site;
$dpsUser = $dpsSettings->user_name;
$dpsKey = $dpsSettings->password;
$dpsMacKey = $dpsSettings->signature;
}
......
......@@ -38,9 +38,9 @@ $config = CRM_Core_Config::singleton();
$template = CRM_Core_Smarty::singleton();
require_once 'CRM/Utils/Request.php';
$cpageId = CRM_Utils_Request::retrieve('cpageId', 'Positive', CRM_Core_DAO::$_nullObject);
$cpageId = CRM_Utils_Request::retrieve('cpageId', 'Positive', CRM_Core_DAO::$_nullObject);
$widgetId = CRM_Utils_Request::retrieve('widgetId', 'Positive', CRM_Core_DAO::$_nullObject);
$format = CRM_Utils_Request::retrieve('format', 'Positive', CRM_Core_DAO::$_nullObject);
$format = CRM_Utils_Request::retrieve('format', 'Positive', CRM_Core_DAO::$_nullObject);
require_once 'CRM/Contribute/BAO/Widget.php';
......
......@@ -209,14 +209,14 @@ function civicrm_config(&$config) {
$params['baseURL'] = isset($config['base_url']) ? $config['base_url'] : civicrm_cms_base();
if ($installType == 'drupal') {
if (version_compare(VERSION, '7.0-rc1') >= 0) {
$params['cms'] = 'Drupal';
$params['cms'] = 'Drupal';
$params['CMSdbUser'] = addslashes($config['drupal']['username']);
$params['CMSdbPass'] = addslashes($config['drupal']['password']);
$params['CMSdbHost'] = $config['drupal']['server'];
$params['CMSdbName'] = addslashes($config['drupal']['database']);
}
elseif (version_compare(VERSION, '6.0') >= 0) {
$params['cms'] = 'Drupal6';
$params['cms'] = 'Drupal6';
$params['CMSdbUser'] = addslashes($config['drupal']['username']);
$params['CMSdbPass'] = addslashes($config['drupal']['password']);
$params['CMSdbHost'] = $config['drupal']['server'];
......@@ -224,7 +224,7 @@ function civicrm_config(&$config) {
}
}
else {
$params['cms'] = 'WordPress';
$params['cms'] = 'WordPress';
$params['CMSdbUser'] = addslashes(DB_USER);
$params['CMSdbPass'] = addslashes(DB_PASSWORD);
$params['CMSdbHost'] = DB_HOST;
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $errorTitle ?></title>
<link rel="stylesheet" type="text/css" href=<?php global $installURLPath; echo $installURLPath . "template.css"?> />
<title><?php echo $errorTitle ?></title>
<link rel="stylesheet" type="text/css" href=<?php global
$installURLPath; echo $installURLPath . "template.css"?> />
</head>
<body>
<div id="All">
<h1><?php echo $errorTitle ?></h1>
<h1><?php echo $errorTitle ?></h1>
<?php echo $errorMsg ?>
<?php echo $errorMsg ?>
</div>
</body>
......
......@@ -51,7 +51,10 @@ global $installType;
$installType = strtolower($_SESSION['civicrm_install_type']);
if (!in_array($installType, array(
'drupal', 'wordpress'))) {
'drupal',
'wordpress'
))
) {
$errorTitle = "Oops! Unsupported installation mode";
$errorMsg = "";
errorDisplayPage($errorTitle, $errorMsg);
......@@ -83,11 +86,15 @@ if ($installType == 'drupal') {
$pattern = '/' . preg_quote(CIVICRM_DIRECTORY_SEPARATOR . 'modules', CIVICRM_DIRECTORY_SEPARATOR) . '/';
if (!preg_match($pattern,
str_replace("\\", "/", $_SERVER['SCRIPT_FILENAME'])
)) {
str_replace("\\", "/", $_SERVER['SCRIPT_FILENAME'])
)
) {
$errorTitle = "Oops! Please Correct Your Install Location";
$errorMsg = "Please untar (uncompress) your downloaded copy of CiviCRM in the <strong>" . implode(CIVICRM_DIRECTORY_SEPARATOR, array(
'sites', 'all', 'modules')) . "</strong> directory below your Drupal root directory. Refer to the online " . $docLink . " for more information.";
'sites',
'all',
'modules'
)) . "</strong> directory below your Drupal root directory. Refer to the online " . $docLink . " for more information.";
errorDisplayPage($errorTitle, $errorMsg);
}
}
......@@ -166,7 +173,10 @@ if ($alreadyInstalled) {
if ($installType == 'drupal') {
$errorMsg = "CiviCRM has already been installed in this Drupal site. <ul><li>To <strong>start over</strong>, you must delete or rename the existing CiviCRM settings file - <strong>civicrm.settings.php</strong> - from <strong>" . implode(CIVICRM_DIRECTORY_SEPARATOR, array(
'[your Drupal root directory]', 'sites', $siteDir)) . "</strong>.</li><li>To <strong>upgrade an existing installation</strong>, refer to the online " . $docLink . ".</li></ul>";
'[your Drupal root directory]',
'sites',
$siteDir
)) . "</strong>.</li><li>To <strong>upgrade an existing installation</strong>, refer to the online " . $docLink . ".</li></ul>";
}
elseif ($installType == 'wordpress') {
$errorMsg = "CiviCRM has already been installed in this WordPress site. <ul><li>To <strong>start over</strong>, you must delete or rename the existing CiviCRM settings file - <strong>civicrm.settings.php</strong> - from <strong>" . $cmsPath . "</strong>.</li><li>To <strong>upgrade an existing installation</strong>, refer to the online " . $docLink . ".</li></ul>";
......@@ -276,12 +286,13 @@ class InstallRequirements {
*/
function checkdatabase($databaseConfig, $dbName) {
if ($this->requireFunction('mysql_connect',
array(
"PHP Configuration",
"MySQL support",
"MySQL support not included in PHP.",
)
)) {
array(
"PHP Configuration",
"MySQL support",
"MySQL support not included in PHP.",
)
)
) {
$this->requireMySQLServer($databaseConfig['server'],
array(
"MySQL $dbName Configuration",
......@@ -291,14 +302,15 @@ class InstallRequirements {
)
);
if ($this->requireMysqlConnection($databaseConfig['server'],
$databaseConfig['username'],
$databaseConfig['password'],
array(
"MySQL $dbName Configuration",
"Are the access credentials correct",
"That username/password doesn't work",
)
)) {
$databaseConfig['username'],
$databaseConfig['password'],
array(
"MySQL $dbName Configuration",
"Are the access credentials correct",
"That username/password doesn't work",
)
)
) {
@$this->requireMySQLVersion("5.1",
array(
"MySQL $dbName Configuration",
......@@ -324,7 +336,8 @@ class InstallRequirements {
array(
"MySQL $dbName Configuration",
"Does MySQL thread_stack meet minimum (" . self::MINIMUM_THREAD_STACK . "k)",
"", // "The MySQL thread_stack does not meet minimum " . CRM_Upgrade_Form::MINIMUM_THREAD_STACK . "k. Please update thread_stack in my.cnf.",
"",
// "The MySQL thread_stack does not meet minimum " . CRM_Upgrade_Form::MINIMUM_THREAD_STACK . "k. Please update thread_stack in my.cnf.",
)
);
}
......@@ -394,7 +407,12 @@ class InstallRequirements {
$this->errors = NULL;
$this->requirePHPVersion('5.3.3', array("PHP Configuration", "PHP5 installed", NULL, "PHP version " . phpversion()));
$this->requirePHPVersion('5.3.3', array(
"PHP Configuration",
"PHP5 installed",
NULL,
"PHP version " . phpversion()
));
// Check that we can identify the root folder successfully
$this->requireFile($crmPath . CIVICRM_DIRECTORY_SEPARATOR . 'README.txt',
......@@ -421,7 +439,10 @@ class InstallRequirements {
foreach ($requiredDirectories as $dir) {
$this->requireFile($crmPath . CIVICRM_DIRECTORY_SEPARATOR . $dir,
array(
"File permissions", "$dir folder exists", "There is no $dir folder"), TRUE
"File permissions",
"$dir folder exists",
"There is no $dir folder"
), TRUE
);
}
......@@ -477,7 +498,11 @@ class InstallRequirements {
}
// Check for $_SERVER configuration
$this->requireServerVariables(array('SCRIPT_NAME', 'HTTP_HOST', 'SCRIPT_FILENAME'), array("Webserver config", "Recognised webserver", "You seem to be using an unsupported webserver. The server variables SCRIPT_NAME, HTTP_HOST, SCRIPT_FILENAME need to be set."));
$this->requireServerVariables(array('SCRIPT_NAME', 'HTTP_HOST', 'SCRIPT_FILENAME'), array(
"Webserver config",
"Recognised webserver",
"You seem to be using an unsupported webserver. The server variables SCRIPT_NAME, HTTP_HOST, SCRIPT_FILENAME need to be set."
));
// Check for MySQL support
$this->requireFunction('mysql_connect',
......@@ -492,9 +517,9 @@ class InstallRequirements {
// Check for xcache_isset and emit warning if exists
$this->checkXCache(array(
"PHP Configuration",
"XCache compatibility",
"XCache is installed and there are known compatibility issues between XCache and CiviCRM. Consider using an alternative PHP caching mechanism or disable PHP caching altogether.",
));
"XCache compatibility",
"XCache is installed and there are known compatibility issues between XCache and CiviCRM. Consider using an alternative PHP caching mechanism or disable PHP caching altogether.",
));
// Check memory allocation
$this->requireMemory(32 * 1024 * 1024,
......@@ -627,7 +652,7 @@ class InstallRequirements {
$this->testing($testDetails);
$phpVersion = phpversion();
$phpVersion = phpversion();
$aboveMinVersion = version_compare($phpVersion, $minVersion) >= 0;
$belowMaxVersion = $maxVersion ? version_compare($phpVersion, $maxVersion) < 0 : TRUE;
......@@ -1033,7 +1058,8 @@ class InstallRequirements {
* @param $testDetails
* @param bool $onlyRequire
*/
function requireDatabaseOrCreatePermissions($server,
function requireDatabaseOrCreatePermissions(
$server,
$username,
$password,
$database,
......@@ -1185,7 +1211,8 @@ class Installer extends InstallRequirements {
return;
}
if (@mysql_query("CREATE DATABASE $database")) {}
if (@mysql_query("CREATE DATABASE $database")) {
}
else {
$errorTitle = "Oops! Could not create Database $database";
$errorMsg = "We encountered an error when attempting to create the database. Please check your mysql server permissions and the database name and try again.";
......@@ -1403,7 +1430,8 @@ function civicrm_install_set_drupal_perms() {
watchdog('civicrm',
'Cannot grant the %perm permission because it does not yet exist.',
array(
'%perm' => $perm), WATCHDOG_ERROR
'%perm' => $perm
), WATCHDOG_ERROR
);
}
$perms = array_intersect($perms, $allPerms);
......@@ -1442,8 +1470,8 @@ function getSiteDir($cmsPath, $str) {
for ($j = count($server); $j > 0; $j--) {
$dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
if (file_exists($cmsPath . CIVICRM_DIRECTORY_SEPARATOR .
'sites' . CIVICRM_DIRECTORY_SEPARATOR . $dir
)) {
'sites' . CIVICRM_DIRECTORY_SEPARATOR . $dir
)) {
$siteDir = $dir;
return $siteDir;
}
......
body {
background: #eee;
}
#All {
font-family: Arial, sans-serif;
width: auto;
......@@ -11,9 +12,11 @@ body {
background: #fff;
max-width: 1200px;
}
form {
margin: 0;
}
h1 {
margin-top: 0;
}
......@@ -48,6 +51,7 @@ p.error {
color: white;
clear: both;
}
p.warning {
padding: 0.5em;
background-color: #e70;
......@@ -55,6 +59,7 @@ p.warning {
color: white;
clear: both;
}
p.good {
padding: 0.5em;
background-color: #0c0;
......@@ -71,6 +76,7 @@ p.error a {
border-collapse: collapse;
font-size: 80%;
}
.testResults td {
border: 1px #ccc solid;
width: 400px;
......
This diff is collapsed.
......@@ -50,5 +50,5 @@ return array(
'is_contact' => 1,
'description' => "WRITE ME",
'help_text' => 'WRITE ME',
),
),
);
This diff is collapsed.
......@@ -48,7 +48,7 @@ return array(
'title' => 'Enable Double Opt-in for Profile Group(s) field',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'help_text' => NULL,
),
'track_civimail_replies' => array(
......@@ -119,7 +119,7 @@ return array(
'title' => 'Enable Double Opt-in for Profile Group(s) field',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'help_text' => NULL,
),
'profile_add_to_group_double_optin' => array(
......
......@@ -89,4 +89,4 @@ return array(
'description' => '',
'help_text' => NULL,
),
);
);
......@@ -2,12 +2,15 @@
ini_set('include_path', '.' . PATH_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . '..');
// make sure the memory_limit is at least 512 MB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit = strtolower(substr($memLimitString, -1));
$memLimit = (int) $memLimitString;
$memLimitUnit = strtolower(substr($memLimitString, -1));
$memLimit = (int) $memLimitString;
switch ($memLimitUnit) {
case 'g': $memLimit *= 1024;
case 'm': $memLimit *= 1024;
case 'k': $memLimit *= 1024;
case 'g':
$memLimit *= 1024;
case 'm':
$memLimit *= 1024;
case 'k':
$memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 536870912) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment