Skip to content

Commit

Permalink
Merge pull request #6633 from ChurchCRM/readme-badges-update
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudIO authored Nov 8, 2023
2 parents 982a9f8 + 30cc2e8 commit 90ffe50
Show file tree
Hide file tree
Showing 285 changed files with 5,936 additions and 5,746 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Welcome to Church Web CRM
---
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![All Releases](https://img.shields.io/github/downloads/churchcrm/crm/total.svg)](https://github.com/ChurchCRM/CRM/releases)
[![Release 5.0.0](https://img.shields.io/github/downloads/churchcrm/crm/5.0.3/total.svg)](https://github.com/ChurchCRM/CRM/releases/5.0.3)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
[![Total All-Time Downloads](https://img.shields.io/github/downloads/churchcrm/crm/total.svg?label=Total%20All-Time%20Downloads)](https://github.com/ChurchCRM/CRM/releases)
[![Latest Release](https://img.shields.io/github/downloads/churchcrm/crm/latest/total.svg?label=Latest%20Release)](https://github.com/ChurchCRM/CRM/releases/latest)

### Development
[![GitHub contributors](https://img.shields.io/github/contributors/churchcrm/crm.svg)]()
Expand Down
7 changes: 3 additions & 4 deletions docker/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$sUSER = 'churchcrm';
$sPASSWORD = 'changeme';
$sDATABASE = 'churchcrm';
#$TwoFASecretKey = 'ChangeThisToASecureRandomStringBeforeUse';
//$TwoFASecretKey = 'ChangeThisToASecureRandomStringBeforeUse';

// Root path of your ChurchCRM installation ( THIS MUST BE SET CORRECTLY! )
//
Expand All @@ -29,7 +29,7 @@

// Set $bLockURL=TRUE to enforce https access by specifying exactly
// which URL's your users may use to log into ChurchCRM.
$bLockURL = FALSE;
$bLockURL = false;

// URL[0] is the URL that you prefer most users use when they
// log in. These are case sensitive.
Expand Down Expand Up @@ -60,5 +60,4 @@
//
// Absolute path must be specified since this file is called
// from scripts located in other directories
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'LoadConfigs.php');
?>
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'LoadConfigs.php';
36 changes: 17 additions & 19 deletions locale/extract-db-locale-terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,28 @@
echo "========== Building locale from DB started === \n";
echo "=============================================== \n\n";

$filename = "../BuildConfig.json";
$filename = '../BuildConfig.json';

if (file_exists($filename)) {

$buildConfig = file_get_contents($filename);
$config = json_decode($buildConfig, true);

if (empty($config["Env"]["local"]["database"])) {
if (empty($config['Env']['local']['database'])) {
echo "ERROR: The file $filename does not have local db env, check ".$filename.".example for schema\n";
} else {
$localDBEnv = $config["Env"]["local"]["database"];
$localDBEnv = $config['Env']['local']['database'];

$db_server = $localDBEnv["server"];
$db_port = $localDBEnv["port"];
$db_server = $localDBEnv['server'];
$db_port = $localDBEnv['port'];

$db_name = $localDBEnv["database"];
$db_username = $localDBEnv["user"];
$db_password = $localDBEnv["password"];
$db_name = $localDBEnv['database'];
$db_username = $localDBEnv['user'];
$db_password = $localDBEnv['password'];

$stringsDir = 'db-strings';
$stringFiles = [];

$db = new PDO('mysql:host=' . $db_server . ':' . $db_port . ';dbname=' . $db_name . ';charset=utf8mb4', $db_username, $db_password);
$db = new PDO('mysql:host='.$db_server.':'.$db_port.';dbname='.$db_name.';charset=utf8mb4', $db_username, $db_password);
$query = 'select DISTINCT ucfg_tooltip as term, "" as translation, "userconfig_ucfg" as cntx from userconfig_ucfg
union all
select DISTINCT qry_Name as term, "" as translation, "query_qry" as cntx from query_qry
Expand All @@ -42,42 +41,41 @@
echo "DB read complete \n";

foreach ($db->query($query) as $row) {
$stringFile = $stringsDir . '/' . $row['cntx'] . '.php';
$stringFile = $stringsDir.'/'.$row['cntx'].'.php';
if (!file_exists($stringFile)) {
file_put_contents($stringFile, "<?php\r\n", FILE_APPEND);
array_push($stringFiles, $stringFile);
}
$rawDBTerm = $row['term'];
$dbTerm = addslashes($rawDBTerm);
file_put_contents($stringFile, "gettext('" . $dbTerm . "');\n", FILE_APPEND);
file_put_contents($stringFile, "gettext('".$dbTerm."');\n", FILE_APPEND);
}
foreach ($stringFiles as $stringFile) {
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);
}

$stringFile = $stringsDir . '/settings-countries.php';
$stringFile = $stringsDir.'/settings-countries.php';
require '../src/ChurchCRM/data/Countries.php';
require '../src/ChurchCRM/data/Country.php';
file_put_contents($stringFile, "<?php\r\n", FILE_APPEND);

foreach (ChurchCRM\data\Countries::getNames() as $country) {
file_put_contents($stringFile, 'gettext("' . addslashes($country) . "\");\r\n", FILE_APPEND);
file_put_contents($stringFile, 'gettext("'.addslashes($country)."\");\r\n", FILE_APPEND);
}
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);

$stringFile = $stringsDir . '/settings-locales.php';
$stringFile = $stringsDir.'/settings-locales.php';
file_put_contents($stringFile, "<?php\r\n", FILE_APPEND);
$localesFile = file_get_contents("../src/locale/locales.json");
$localesFile = file_get_contents('../src/locale/locales.json');
$locales = json_decode($localesFile, true);
foreach ($locales as $key => $value) {
file_put_contents($stringFile, 'gettext("' . $key . "\");\r\n", FILE_APPEND);
file_put_contents($stringFile, 'gettext("'.$key."\");\r\n", FILE_APPEND);
}
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);
echo $stringFile . " updated";
echo $stringFile.' updated';
}
} else {
echo "ERROR: The file $filename does not exist \n";

}
echo "\n\n=============================================== \n";
echo "========== Building locale from DB end === \n";
Expand Down
6 changes: 3 additions & 3 deletions src/AddDonors.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

if ($iFundRaiserID > 0) {
// Get the current fund raiser record
$sSQL = 'SELECT * from fundraiser_fr WHERE fr_ID = ' . $iFundRaiserID;
$sSQL = 'SELECT * from fundraiser_fr WHERE fr_ID = '.$iFundRaiserID;
$rsFRR = RunQuery($sSQL);
extract(mysqli_fetch_array($rsFRR));
// Set current fundraiser
Expand All @@ -42,11 +42,11 @@
// Get all the people listed as donors for this fundraiser
$sSQL = "SELECT a.per_id as donorID FROM donateditem_di
LEFT JOIN person_per a ON di_donor_ID=a.per_ID
WHERE di_FR_ID = '" . $iFundRaiserID . "' ORDER BY a.per_id";
WHERE di_FR_ID = '".$iFundRaiserID."' ORDER BY a.per_id";
$rsDonors = RunQuery($sSQL);

$extraPaddleNum = 1;
$sSQL = "SELECT MAX(pn_NUM) AS pn_max FROM paddlenum_pn WHERE pn_FR_ID = '" . $iFundRaiserID . "'";
$sSQL = "SELECT MAX(pn_NUM) AS pn_max FROM paddlenum_pn WHERE pn_FR_ID = '".$iFundRaiserID."'";
$rsMaxPaddle = RunQuery($sSQL);
if (mysqli_num_rows($rsMaxPaddle) > 0) {
$oneRow = mysqli_fetch_array($rsMaxPaddle);
Expand Down
Loading

0 comments on commit 90ffe50

Please sign in to comment.