From 03e040023000db22f6184abeb84578a3359a0439 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 May 2013 14:30:59 +1200 Subject: [PATCH] CRM-12595 fix formatting in remaing files --- .../QueryBuilder/IndividualUnsupervised.php | 27 +- CRM/Event/BAO/Participant.php | 2 +- CRM/Event/BAO/ParticipantStatusType.php | 4 +- CRM/Event/Cart/BAO/MerParticipant.php | 28 +- CRM/Event/Cart/Form/Checkout/Payment.php | 6 +- CRM/Event/Form/ManageEvent/EventInfo.php | 4 +- CRM/Event/Form/ManageEvent/Fee.php | 6 +- CRM/Event/Form/ManageEvent/Location.php | 4 +- .../Form/ManageEvent/ScheduleReminders.php | 2 +- CRM/Event/Form/Participant.php | 6 +- CRM/Event/Form/Registration/ThankYou.php | 2 +- CRM/Event/Form/Task/Batch.php | 2 +- CRM/Event/Form/Task/PickProfile.php | 2 +- CRM/Event/Form/Task/SearchTaskHookSample.php | 2 +- CRM/Event/Import/Parser.php | 2 +- CRM/Event/Page/AJAX.php | 6 +- CRM/Event/Page/ParticipantListing/Simple.php | 4 +- CRM/Export/Form/Select.php | 2 +- CRM/Extension/Manager/Interface.php | 2 +- CRM/Financial/BAO/ExportFormat.php | 442 +++++++++--------- CRM/Financial/BAO/ExportFormat/CSV.php | 8 +- CRM/Financial/BAO/FinancialItem.php | 31 +- CRM/Financial/BAO/FinancialTypeAccount.php | 41 +- CRM/Financial/BAO/PaymentProcessor.php | 4 +- CRM/Financial/Form/BatchTransaction.php | 11 +- CRM/Financial/Form/Export.php | 5 +- CRM/Financial/Form/FinancialAccount.php | 21 +- CRM/Financial/Form/FinancialBatch.php | 5 +- CRM/Financial/Form/FinancialTypeAccount.php | 101 ++-- CRM/Financial/Page/BatchTransaction.php | 5 +- CRM/Financial/Page/FinancialAccount.php | 3 +- CRM/Financial/Page/FinancialBatch.php | 3 +- CRM/Financial/Page/FinancialType.php | 3 +- CRM/Financial/Page/FinancialTypeAccount.php | 3 +- CRM/Friend/Form.php | 6 +- CRM/Grant/Controller/PaymentSearch.php | 9 +- CRM/Grant/Form/Search.php | 14 +- CRM/Grant/Form/Task/SearchTaskHookSample.php | 4 +- CRM/Grant/Page/GrantProgram.php | 33 +- CRM/Grant/Page/Payment.php | 37 +- CRM/Grant/Selector/PaymentSearch.php | 198 ++++---- CRM/Group/Page/AJAX.php | 8 +- CRM/Import/Field.php | 2 +- CRM/Import/Parser.php | 2 +- CRM/Logging/ReportDetail.php | 10 +- CRM/Mailing/Event/BAO/Opened.php | 4 +- CRM/Mailing/Event/BAO/Queue.php | 8 +- CRM/Mailing/Event/BAO/Reply.php | 4 +- CRM/Mailing/Event/BAO/Resubscribe.php | 10 +- CRM/Mailing/Form/Subscribe.php | 2 +- CRM/Mailing/Form/Upload.php | 2 +- CRM/Member/BAO/MembershipType.php | 20 +- CRM/Member/Form.php | 2 +- CRM/Member/Form/MembershipRenewal.php | 14 +- CRM/Member/Form/MembershipView.php | 8 +- CRM/Member/Form/Search.php | 14 +- CRM/Member/Form/Task/Batch.php | 2 +- CRM/Member/Form/Task/Delete.php | 2 +- CRM/Member/Form/Task/Email.php | 2 +- CRM/Member/Form/Task/SearchTaskHookSample.php | 6 +- CRM/Member/Import/Parser.php | 2 +- CRM/Member/Page/AJAX.php | 2 +- CRM/Queue/Runner.php | 2 +- CRM/SMS/Page/Callback.php | 6 +- CRM/UF/Page/AJAX.php | 6 +- agpl-3.0.txt | 2 +- css/Audit/style.css | 282 +++++------ css/civicrm-new.css | 2 +- css/print.css | 12 +- gpl.txt | 14 +- install/template.html | 6 +- 71 files changed, 797 insertions(+), 761 deletions(-) diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php index 1b8f1dcaf2b6..45c24c50d365 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php @@ -1,4 +1,29 @@ now() OR event.end_date IS NULL) - AND event.is_active = 1 - ORDER BY participant.register_date, participant.id + AND event.is_active = 1 + ORDER BY participant.register_date, participant.id "; $dao = CRM_Core_DAO::executeQuery($query); while ($dao->fetch()) { diff --git a/CRM/Event/Cart/BAO/MerParticipant.php b/CRM/Event/Cart/BAO/MerParticipant.php index 79c3a7aff981..67e61ca6532b 100644 --- a/CRM/Event/Cart/BAO/MerParticipant.php +++ b/CRM/Event/Cart/BAO/MerParticipant.php @@ -1,10 +1,36 @@ cart->get_main_events_in_carts() as $event_in_cart) { if ($payment_processor_id == NULL && $event_in_cart->event->payment_processor != NULL) { $payment_processor_id = $event_in_cart->event->payment_processor; - $this->financial_type_id = $event_in_cart->event->financial_type_id; + $this->financial_type_id = $event_in_cart->event->financial_type_id; } else { if ($event_in_cart->event->payment_processor != NULL && $event_in_cart->event->payment_processor != $payment_processor_id) { @@ -559,7 +559,7 @@ function make_payment(&$params) { 'payment_processor' => $this->_paymentProcessor['payment_processor_type'], 'trxn_id' => $result['trxn_id'], ); - $trxn = new CRM_Financial_DAO_FinancialTrxn(); + $trxn = new CRM_Financial_DAO_FinancialTrxn(); $trxn->copyValues($trxnParams); if (!CRM_Utils_Rule::currencyCode($trxn->currency)) { $config = CRM_Core_Config::singleton(); @@ -618,7 +618,7 @@ function record_contribution(&$mer_participant, &$params, $event) { 'amount' => $params['amount'], 'currency' => CRM_Utils_Array::value('currencyID', $params), ); - $entity_trxn =& new CRM_Financial_DAO_EntityFinancialTrxn(); + $entity_trxn =& new CRM_Financial_DAO_EntityFinancialTrxn(); $entity_trxn->copyValues($entity_financial_trxn_params); $entity_trxn->save(); } diff --git a/CRM/Event/Form/ManageEvent/EventInfo.php b/CRM/Event/Form/ManageEvent/EventInfo.php index ebccf785fb7f..ff0b5c73e699 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -348,7 +348,7 @@ public function postProcess() { CRM_Price_BAO_Set::addTo('civicrm_event', $event->id, $priceSetId); } } - + $this->set('id', $event->id); if ($this->_action & CRM_Core_Action::ADD) { @@ -380,7 +380,7 @@ public function getTitle() { return ts('Event Information and Settings'); } - /* Retrieve event template custom data values + /* Retrieve event template custom data values * and set as default values for current new event. * * @params int $tempId event template id. diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index a266b15140de..d9732e29484e 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -257,8 +257,8 @@ public function buildQuickForm() { NULL, NULL, NULL, NULL, array('  ', '  ', '  ', '
') ); - - // financial type + + // financial type $financialType = CRM_Financial_BAO_FinancialType::getIncomeFinancialType(); $this->add('select', 'financial_type_id', ts('Financial Type'), array('' => ts('- select -')) + $financialType @@ -476,7 +476,7 @@ static function formRule($values) { } } } - if ($values['is_monetary']) { + if ($values['is_monetary']) { //check if financial type is selected if (!$values['financial_type_id']) { $errors['financial_type_id'] = ts("Please select financial type."); diff --git a/CRM/Event/Form/ManageEvent/Location.php b/CRM/Event/Form/ManageEvent/Location.php index aca5706e1829..071da30d24db 100644 --- a/CRM/Event/Form/ManageEvent/Location.php +++ b/CRM/Event/Form/ManageEvent/Location.php @@ -120,7 +120,7 @@ function setDefaultValues() { if (!isset($defaults['address'][1]['country_id'])) { $defaults['address'][1]['country_id'] = $config->defaultContactCountry; } - + if (!isset($defaults['address'][1]['state_province_id'])) { $defaults['address'][1]['state_province_id'] = $config->defaultContactStateProvince; } @@ -197,7 +197,7 @@ public function buildQuickForm() { } // get the list of location blocks being used by other events - + $locationEvents = CRM_Event_BAO_Event::getLocationEvents(); // remove duplicates and make sure that the duplicate entry with key as // loc_block_id of this event (this->_id) is preserved diff --git a/CRM/Event/Form/ManageEvent/ScheduleReminders.php b/CRM/Event/Form/ManageEvent/ScheduleReminders.php index 5dc23949915f..8d4fde8a034d 100755 --- a/CRM/Event/Form/ManageEvent/ScheduleReminders.php +++ b/CRM/Event/Form/ManageEvent/ScheduleReminders.php @@ -104,7 +104,7 @@ function setDefaultValues() { * @access public */ public function buildQuickForm() { - $field = 'civicrm_event'; + $field = 'civicrm_event'; if ($this->_isTemplate) { $field = 'event_template'; } diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 757be992e014..e9555ef4be17 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1173,10 +1173,10 @@ public function postProcess() { // set source if not set if (empty($params['source'])) { - $this->_params['participant_source'] = ts('Offline Registration for Event: %2 by: %1', array(1 => $userName, 2 => $eventTitle)); + $this->_params['participant_source'] = ts('Offline Registration for Event: %2 by: %1', array(1 => $userName, 2 => $eventTitle)); } else { - $this->_params['participant_source'] = $params['source']; + $this->_params['participant_source'] = $params['source']; } $this->_params['description'] = $this->_params['participant_source']; @@ -1253,7 +1253,7 @@ public function postProcess() { if (($this->_lineItem || !isset($params['proceSetId'])) && !$this->_paymentId && $this->_id) { CRM_Price_BAO_LineItem::deleteLineItems($this->_id, 'civicrm_participant'); } - + if ($this->_mode) { // add all the additioanl payment params we need $this->_params["state_province-{$this->_bltID}"] = $this->_params["billing_state_province-{$this->_bltID}"] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($this->_params["billing_state_province_id-{$this->_bltID}"]); diff --git a/CRM/Event/Form/Registration/ThankYou.php b/CRM/Event/Form/Registration/ThankYou.php index 75efd3e292a6..137da6482451 100644 --- a/CRM/Event/Form/Registration/ThankYou.php +++ b/CRM/Event/Form/Registration/ThankYou.php @@ -98,7 +98,7 @@ public function buildQuickForm() { $this->assign('email', $email); } $this->assignToTemplate(); - + if ($this->_priceSetId && !CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $this->_priceSetId, 'is_quick_config')) { $lineItemForTemplate = array(); foreach ($this->_lineItem as $key => $value) { diff --git a/CRM/Event/Form/Task/Batch.php b/CRM/Event/Form/Task/Batch.php index 72c28aa0d553..80ffa00872d6 100644 --- a/CRM/Event/Form/Task/Batch.php +++ b/CRM/Event/Form/Task/Batch.php @@ -68,7 +68,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task { * * @return void * @access public - */ + */ function preProcess() { /* * initialize the task and row fields diff --git a/CRM/Event/Form/Task/PickProfile.php b/CRM/Event/Form/Task/PickProfile.php index ea0a1d41c7b8..c1d57dc4d1e9 100644 --- a/CRM/Event/Form/Task/PickProfile.php +++ b/CRM/Event/Form/Task/PickProfile.php @@ -62,7 +62,7 @@ class CRM_Event_Form_Task_PickProfile extends CRM_Event_Form_Task { * * @return void * @access public - */ + */ function preProcess() { /* * initialize the task and row fields diff --git a/CRM/Event/Form/Task/SearchTaskHookSample.php b/CRM/Event/Form/Task/SearchTaskHookSample.php index 0b1baa2f9525..6d4a8a0f46a1 100644 --- a/CRM/Event/Form/Task/SearchTaskHookSample.php +++ b/CRM/Event/Form/Task/SearchTaskHookSample.php @@ -53,7 +53,7 @@ function preProcess() { $query = " SELECT p.fee_amount as amount, p.register_date as register_date, - p.source as source, + p.source as source, ct.display_name as display_name FROM civicrm_participant p INNER JOIN civicrm_contact ct ON ( p.contact_id = ct.id ) diff --git a/CRM/Event/Import/Parser.php b/CRM/Event/Import/Parser.php index fde3aca78d4b..6e5e9c157a99 100644 --- a/CRM/Event/Import/Parser.php +++ b/CRM/Event/Import/Parser.php @@ -451,7 +451,7 @@ function setActiveFields($fieldKeys) { $this->_activeFields[$i]->_hasLocationType = $elements[$i]; } } - + function setActiveFieldPhoneTypes( $elements ) { for ($i = 0; $i < count( $elements ); $i++) { diff --git a/CRM/Event/Page/AJAX.php b/CRM/Event/Page/AJAX.php index 43dea82b0505..bbc4bf6e8d16 100644 --- a/CRM/Event/Page/AJAX.php +++ b/CRM/Event/Page/AJAX.php @@ -78,7 +78,7 @@ function eventType() { SELECT v.label ,v.value FROM civicrm_option_value v, civicrm_option_group g -WHERE v.option_group_id = g.id +WHERE v.option_group_id = g.id AND g.name = 'event_type' AND v.is_active = 1 AND {$whereClause} @@ -102,14 +102,14 @@ function eventFee() { } $whereClause = "cv.label LIKE '$name%' "; - + $query = "SELECT DISTINCT ( cv.label ), cv.id FROM civicrm_price_field_value cv LEFT JOIN civicrm_price_field cf ON cv.price_field_id = cf.id LEFT JOIN civicrm_price_set_entity ce ON ce.price_set_id = cf.price_set_id -WHERE ce.entity_table = 'civicrm_event' AND {$whereClause} +WHERE ce.entity_table = 'civicrm_event' AND {$whereClause} GROUP BY cv.label"; $dao = CRM_Core_DAO::executeQuery($query); while ($dao->fetch()) { diff --git a/CRM/Event/Page/ParticipantListing/Simple.php b/CRM/Event/Page/ParticipantListing/Simple.php index ab690363f003..1f74da28eb50 100644 --- a/CRM/Event/Page/ParticipantListing/Simple.php +++ b/CRM/Event/Page/ParticipantListing/Simple.php @@ -59,8 +59,8 @@ function run() { $fromClause = " FROM civicrm_contact -INNER JOIN civicrm_participant ON ( civicrm_contact.id = civicrm_participant.contact_id - AND civicrm_contact.is_deleted = 0 ) +INNER JOIN civicrm_participant ON ( civicrm_contact.id = civicrm_participant.contact_id + AND civicrm_contact.is_deleted = 0 ) INNER JOIN civicrm_event ON civicrm_participant.event_id = civicrm_event.id LEFT JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1 ) "; diff --git a/CRM/Export/Form/Select.php b/CRM/Export/Form/Select.php index 89b941731ace..28e9bb502eb0 100644 --- a/CRM/Export/Form/Select.php +++ b/CRM/Export/Form/Select.php @@ -149,7 +149,7 @@ function preProcess() { CRM_Case_Form_Task::preProcessCommon($this, TRUE); $this->_exportMode = self::CASE_EXPORT; $componentName = array('', 'Case'); - break; + break; } $this->_task = $values['task']; diff --git a/CRM/Extension/Manager/Interface.php b/CRM/Extension/Manager/Interface.php index c16eee198861..7574dace12a4 100644 --- a/CRM/Extension/Manager/Interface.php +++ b/CRM/Extension/Manager/Interface.php @@ -44,7 +44,7 @@ public function onPostEnable(CRM_Extension_Info $info); /** * Perform type-specific removal logic (before updating the extension * row in the "civicrm_extension" table). - * + * * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy) * @see CRM_Extension_Manager::createInfoFromDB */ diff --git a/CRM/Financial/BAO/ExportFormat.php b/CRM/Financial/BAO/ExportFormat.php index 30a656c5a33f..033e8c3e5ea1 100644 --- a/CRM/Financial/BAO/ExportFormat.php +++ b/CRM/Financial/BAO/ExportFormat.php @@ -1,222 +1,222 @@ -_exportParams = $exportParams; - return $exportParams; - } - - function output($fileName = NULL) { - switch ($this->getFileExtension()) { - case 'csv': - self::createActivityExport($this->_batchIds, $fileName); - break; - - case 'iif': - $tplFile = $this->getTemplateFileName(); - $out = self::getTemplate()->fetch( $tplFile ); - $fileName = $this->putFile($out); - self::createActivityExport($this->_batchIds, $fileName); - break; - } - } - - function getMimeType() { - return 'text/plain'; - } - - function getFileExtension() { - return 'txt'; - } - - // Override this if appropriate - function getTemplateFileName() { - return null; - } - - static function &getTemplate() { - return self::$_template; - } - - function assign($var, $value = NULL) { - self::$_template->assign($var, $value); - } - - /* - * This gets called for every item of data being compiled before being sent to the exporter for output. - * - * Depending on the output format might want to override this, e.g. for IIF tabs need to be escaped etc, - * but for CSV it doesn't make sense because php has built in csv output functions. - */ - static function format($s, $type = 'string') { - if (!empty($s)) { - return $s; - } - else { - return NULL; - } - } - - function initiateDownload() { - $config = CRM_Core_Config::singleton(); - //zip files if more than one. - if (count($this->_downloadFile)>1) { - $zip = $config->customFileUploadDir.'Financial_Transactions_'.date('YmdHis').'.zip'; - $result = $this->createZip($this->_downloadFile, $zip, TRUE); - if ($result) { - header('Content-Type: application/zip'); - header('Content-Disposition: attachment; filename='.CRM_Utils_File::cleanFileName(basename($zip))); - header('Content-Length: ' . filesize($zip)); - ob_clean(); - flush(); - readfile($config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($zip))); - unlink($zip); //delete the zip to avoid clutter. - CRM_Utils_System::civiExit(); - } - } - else { - header('Content-Type: '.mime_content_type($this->_downloadFile[0])); - header('Content-Disposition: attachment; filename='.CRM_Utils_File::cleanFileName(basename($this->_downloadFile[0]))); - header('Content-Length: ' . filesize($this->_downloadFile[0])); - ob_clean(); - flush(); - readfile($config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($this->_downloadFile[0]))); - CRM_Utils_System::civiExit(); - } - } - - static function createActivityExport($batchIds, $fileName) { - $session = CRM_Core_Session::singleton(); - $values = array(); - $params = array('id' => $batchIds); - CRM_Batch_BAO_Batch::retrieve($params, $values); - $createdBy = CRM_Contact_BAO_Contact::displayName($values['created_id']); - $modifiedBy = CRM_Contact_BAO_Contact::displayName($values['modified_id']); - - $values['payment_instrument_id'] = ''; - if (isset($values['payment_instrument_id'])) { - $paymentInstrument = array_flip(CRM_Contribute_PseudoConstant::paymentInstrument('label')); - $values['payment_instrument_id'] = array_search($values['payment_instrument_id'], $paymentInstrument); - } - $details = '

' . ts('Record: ') . $values['title'] . '

' . ts('Description: ') . '

' . ts('Created By: ') . $createdBy . '

' . ts('Created Date: ') . $values['created_date'] . '

' . ts('Last Modified By: ') . $modifiedBy . '

' . ts('Payment Instrument: ') . $values['payment_instrument_id'] . '

'; - $subject = ''; - if (CRM_Utils_Array::value('total', $values)) { - $subject .= ts('Total') . '['. CRM_Utils_Money::format($values['total']) .'],'; - } - if (CRM_Utils_Array::value('item_count', $values)) { - $subject .= ' ' . ts('Count') . '['. $values['item_count'] .'],'; - } - - //create activity. - $subject .= ' ' . ts('Batch') . '['. $values['title'] .']'; - $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); - $activityParams = array( - 'activity_type_id' => array_search('Export Accounting Batch', $activityTypes), - 'subject' => $subject, - 'status_id' => 2, - 'activity_date_time' => date('YmdHis'), - 'source_contact_id' => $session->get('userID'), - 'source_record_id' => $values['id'], - 'target_contact_id' => $session->get('userID'), - 'details' => $details, - 'attachFile_1' => array ( - 'uri' => $fileName, - 'type' => 'text/csv', - 'location' => $fileName, - 'upload_date' => date('YmdHis'), - ), - ); - - CRM_Activity_BAO_Activity::create($activityParams); - } - - function createZip($files = array(), $destination = NULL, $overwrite = FALSE) { - //if the zip file already exists and overwrite is false, return false - if (file_exists($destination) && !$overwrite) { - return FALSE; - } - $valid_files = array(); - if (is_array($files)) { - foreach ($files as $file) { - //make sure the file exists - if (file_exists($file)) { - $validFiles[] = $file; - } - } - } - if (count($validFiles)) { - $zip = new ZipArchive(); - if ($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== TRUE) { - return FALSE; - } - foreach ($validFiles as $file) { - $zip->addFile($file, CRM_Utils_File::cleanFileName(basename($file))); - } - $zip->close(); - return file_exists($destination); - } - else { - return FALSE; - } - } +_exportParams = $exportParams; + return $exportParams; + } + + function output($fileName = NULL) { + switch ($this->getFileExtension()) { + case 'csv': + self::createActivityExport($this->_batchIds, $fileName); + break; + + case 'iif': + $tplFile = $this->getTemplateFileName(); + $out = self::getTemplate()->fetch( $tplFile ); + $fileName = $this->putFile($out); + self::createActivityExport($this->_batchIds, $fileName); + break; + } + } + + function getMimeType() { + return 'text/plain'; + } + + function getFileExtension() { + return 'txt'; + } + + // Override this if appropriate + function getTemplateFileName() { + return null; + } + + static function &getTemplate() { + return self::$_template; + } + + function assign($var, $value = NULL) { + self::$_template->assign($var, $value); + } + + /* + * This gets called for every item of data being compiled before being sent to the exporter for output. + * + * Depending on the output format might want to override this, e.g. for IIF tabs need to be escaped etc, + * but for CSV it doesn't make sense because php has built in csv output functions. + */ + static function format($s, $type = 'string') { + if (!empty($s)) { + return $s; + } + else { + return NULL; + } + } + + function initiateDownload() { + $config = CRM_Core_Config::singleton(); + //zip files if more than one. + if (count($this->_downloadFile)>1) { + $zip = $config->customFileUploadDir.'Financial_Transactions_'.date('YmdHis').'.zip'; + $result = $this->createZip($this->_downloadFile, $zip, TRUE); + if ($result) { + header('Content-Type: application/zip'); + header('Content-Disposition: attachment; filename='.CRM_Utils_File::cleanFileName(basename($zip))); + header('Content-Length: ' . filesize($zip)); + ob_clean(); + flush(); + readfile($config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($zip))); + unlink($zip); //delete the zip to avoid clutter. + CRM_Utils_System::civiExit(); + } + } + else { + header('Content-Type: '.mime_content_type($this->_downloadFile[0])); + header('Content-Disposition: attachment; filename='.CRM_Utils_File::cleanFileName(basename($this->_downloadFile[0]))); + header('Content-Length: ' . filesize($this->_downloadFile[0])); + ob_clean(); + flush(); + readfile($config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($this->_downloadFile[0]))); + CRM_Utils_System::civiExit(); + } + } + + static function createActivityExport($batchIds, $fileName) { + $session = CRM_Core_Session::singleton(); + $values = array(); + $params = array('id' => $batchIds); + CRM_Batch_BAO_Batch::retrieve($params, $values); + $createdBy = CRM_Contact_BAO_Contact::displayName($values['created_id']); + $modifiedBy = CRM_Contact_BAO_Contact::displayName($values['modified_id']); + + $values['payment_instrument_id'] = ''; + if (isset($values['payment_instrument_id'])) { + $paymentInstrument = array_flip(CRM_Contribute_PseudoConstant::paymentInstrument('label')); + $values['payment_instrument_id'] = array_search($values['payment_instrument_id'], $paymentInstrument); + } + $details = '

' . ts('Record: ') . $values['title'] . '

' . ts('Description: ') . '

' . ts('Created By: ') . $createdBy . '

' . ts('Created Date: ') . $values['created_date'] . '

' . ts('Last Modified By: ') . $modifiedBy . '

' . ts('Payment Instrument: ') . $values['payment_instrument_id'] . '

'; + $subject = ''; + if (CRM_Utils_Array::value('total', $values)) { + $subject .= ts('Total') . '['. CRM_Utils_Money::format($values['total']) .'],'; + } + if (CRM_Utils_Array::value('item_count', $values)) { + $subject .= ' ' . ts('Count') . '['. $values['item_count'] .'],'; + } + + //create activity. + $subject .= ' ' . ts('Batch') . '['. $values['title'] .']'; + $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); + $activityParams = array( + 'activity_type_id' => array_search('Export Accounting Batch', $activityTypes), + 'subject' => $subject, + 'status_id' => 2, + 'activity_date_time' => date('YmdHis'), + 'source_contact_id' => $session->get('userID'), + 'source_record_id' => $values['id'], + 'target_contact_id' => $session->get('userID'), + 'details' => $details, + 'attachFile_1' => array ( + 'uri' => $fileName, + 'type' => 'text/csv', + 'location' => $fileName, + 'upload_date' => date('YmdHis'), + ), + ); + + CRM_Activity_BAO_Activity::create($activityParams); + } + + function createZip($files = array(), $destination = NULL, $overwrite = FALSE) { + //if the zip file already exists and overwrite is false, return false + if (file_exists($destination) && !$overwrite) { + return FALSE; + } + $valid_files = array(); + if (is_array($files)) { + foreach ($files as $file) { + //make sure the file exists + if (file_exists($file)) { + $validFiles[] = $file; + } + } + } + if (count($validFiles)) { + $zip = new ZipArchive(); + if ($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== TRUE) { + return FALSE; + } + foreach ($validFiles as $file) { + $zip->addFile($file, CRM_Utils_File::cleanFileName(basename($file))); + } + $zip->close(); + return file_exists($destination); + } + else { + return FALSE; + } + } } \ No newline at end of file diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 4962615464de..66365a0e0031 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -85,7 +85,7 @@ function generateExportQuery($batchId) { c.source AS source, ft.currency AS currency, cov_status.label AS status, - CASE + CASE WHEN efti.entity_id IS NOT NULL THEN efti.amount ELSE eftc.amount @@ -163,7 +163,7 @@ function makeCSV($export) { $financialItems = array(); $this->_batchIds = $batchId; while ($dao->fetch()) { - $creditAccountName = $creditAccountType = + $creditAccountName = $creditAccountType = $creditAccount = NULL; if ($dao->credit_account) { $creditAccountName = $dao->credit_account_name; @@ -173,9 +173,9 @@ function makeCSV($export) { else { $creditAccountName = $dao->from_credit_account_name; $creditAccountType = $dao->from_credit_account_type_code; - $creditAccount = $dao->from_credit_account; + $creditAccount = $dao->from_credit_account; } - + $financialItems[] = array( 'Transaction Date' => $dao->trxn_date, 'Debit Account' => $dao->to_account_code, diff --git a/CRM/Financial/BAO/FinancialItem.php b/CRM/Financial/BAO/FinancialItem.php index 79f7f61d0360..6db9134a47b2 100644 --- a/CRM/Financial/BAO/FinancialItem.php +++ b/CRM/Financial/BAO/FinancialItem.php @@ -1,5 +1,4 @@ contribution_status_id == array_search('Completed', $contributionStatuses)) { $itemStatus = array_search('Paid', $financialItemStatus); - } + } elseif ($contribution->contribution_status_id == array_search('Pending', $contributionStatuses)) { $itemStatus = array_search('Unpaid', $financialItemStatus); - } + } $params = array( 'transaction_date' => CRM_Utils_Date::isoToMysql($contribution->receive_date), - 'contact_id' => $contribution->contact_id, + 'contact_id' => $contribution->contact_id, 'amount' => $lineItem->line_total, 'currency' => $contribution->currency, 'entity_table' => 'civicrm_line_item', @@ -96,9 +95,9 @@ static function add($lineItem, $contribution) { 'description' => ( $lineItem->qty != 1 ? $lineItem->qty . ' of ' : ''). ' ' . $lineItem->label, 'status_id' => $itemStatus, ); - + if ($lineItem->financial_type_id) { - $searchParams = array( + $searchParams = array( 'entity_table' => 'civicrm_financial_type', 'entity_id' => $lineItem->financial_type_id, 'account_relationship' => 1, @@ -113,7 +112,7 @@ static function add($lineItem, $contribution) { $trxnId['id'] = $trxn['financialTrxnId']; self::create($params, NULL, $trxnId); - } + } /** * function to create the financial Items and financial enity trxn @@ -121,16 +120,16 @@ static function add($lineItem, $contribution) { * @param array $params associated array to create financial items * @param array $ids financial item ids * @param array $trxnIds financial item ids - * + * * @access public - * @static + * @static * @return object */ static function create(&$params, $ids = NULL, $trxnIds = NULL) { $financialItem = new CRM_Financial_DAO_FinancialItem(); $financialItem->copyValues($params); if (CRM_Utils_Array::value('id', $ids)) { - $financialItem->id = $ids['id']; + $financialItem->id = $ids['id']; } $financialItem->save(); @@ -141,7 +140,7 @@ static function create(&$params, $ids = NULL, $trxnIds = NULL) { 'financial_trxn_id' => $trxnIds['id'], 'amount' => $params['amount'], ); - + $entity_trxn = new CRM_Financial_DAO_EntityFinancialTrxn(); $entity_trxn->copyValues($entity_financial_trxn_params); if (CRM_Utils_Array::value('entityFinancialTrxnId', $ids)) { @@ -150,7 +149,7 @@ static function create(&$params, $ids = NULL, $trxnIds = NULL) { $entity_trxn->save(); } return $financialItem; - } + } /** * takes an associative array and creates a entity financial transaction object @@ -173,7 +172,7 @@ static function createEntityTrxn($params) { * * @param array $params (reference ) an assoc array of name/value pairs * - * @param boolean $maxID to retrive max id + * @param boolean $maxID to retrive max id * * @return array * @access public @@ -196,7 +195,7 @@ static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) { 'financial_trxn_id' => $financialItem->financial_trxn_id, 'amount' => $financialItem->amount, ); - } + } if (!empty($financialItems)) { return $financialItems; } diff --git a/CRM/Financial/BAO/FinancialTypeAccount.php b/CRM/Financial/BAO/FinancialTypeAccount.php index bc6b03f349f0..6112a7327d13 100644 --- a/CRM/Financial/BAO/FinancialTypeAccount.php +++ b/CRM/Financial/BAO/FinancialTypeAccount.php @@ -1,5 +1,4 @@ save(); return $financialTypeAccount; } - + /** - * Function to delete financial Types - * + * Function to delete financial Types + * * @param int $contributionTypeId * @static */ static function del($financialTypeAccountId, $accountId = null) { - //checking if financial type is present + //checking if financial type is present $check = false; $relationValues = CRM_Core_PseudoConstant::accountOptionValues('account_relationship'); - + $financialTypeId = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_EntityFinancialAccount', $financialTypeAccountId, 'entity_id' ); //check dependencies // FIXME more table containing financial_type_id to come @@ -148,20 +147,20 @@ static function del($financialTypeAccountId, $accountId = null) { } return CRM_Utils_System::redirect( CRM_Utils_System::url( 'civicrm/admin/financial/financialType/accounts', "reset=1&action=browse&aid={$accountId}" )); } - + //delete from financial Type table $financialType = new CRM_Financial_DAO_EntityFinancialAccount( ); $financialType->id = $financialTypeAccountId; $financialType->delete(); } - + /** - * Function to get Financial Account Name - * + * Function to get Financial Account Name + * * @param int $entityId - * - * @param string $entityTable - * + * + * @param string $entityTable + * * @param string $columnName Column to fetch * @static */ @@ -182,18 +181,18 @@ static function getFinancialAccount($entityId, $entityTable, $columnName = 'name } /** - * Function to financial Account for payment instrument - * + * Function to financial Account for payment instrument + * * @param int $paymentInstrumentValue payment instrument value - * + * * @static */ static function getInstrumentFinancialAccount($paymentInstrumentValue = NULL) { if (!self::$financialAccount) { $query = "SELECT ceft.financial_account_id, cov.value FROM civicrm_entity_financial_account ceft -INNER JOIN civicrm_option_value cov ON cov.id = ceft.entity_id AND ceft.entity_table = 'civicrm_option_value' -INNER JOIN civicrm_option_group cog ON cog.id = cov.option_group_id +INNER JOIN civicrm_option_value cov ON cov.id = ceft.entity_id AND ceft.entity_table = 'civicrm_option_value' +INNER JOIN civicrm_option_group cog ON cog.id = cov.option_group_id WHERE cog.name = 'payment_instrument' "; if ($paymentInstrumentValue) { diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index a61a8ee3b623..e536683819ad 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -66,7 +66,7 @@ static function create($params) { $processor->payment_type = $ppTypeDAO->payment_type; $processor->save(); - // CRM-11826, add entry in civicrm_entity_financial_account + // CRM-11826, add entry in civicrm_entity_financial_account // if financial_account_id is not NULL if (CRM_Utils_Array::value('financial_account_id', $params)) { $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' ")); @@ -76,7 +76,7 @@ static function create($params) { 'account_relationship' => $relationTypeId, 'financial_account_id' => $params['financial_account_id'] ); - CRM_Financial_BAO_FinancialTypeAccount::add($values); + CRM_Financial_BAO_FinancialTypeAccount::add($values); } return $processor; } diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index ee5d6563af08..110d25de3c4a 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -1,5 +1,4 @@ _batchStatusId == 2) { - $this->add('submit', 'export_batch', ts('Export Batch')); + $this->add('submit', 'export_batch', ts('Export Batch')); } - + // do not build rest of form unless it is open batch if ($this->_batchStatusId != 1 ) { return; @@ -103,7 +102,7 @@ public function buildQuickForm() { ); $this->_group = CRM_Core_PseudoConstant::group(); - + // multiselect for groups if ($this->_group) { $this->add('select', 'group', ts('Groups'), $this->_group, FALSE, @@ -111,7 +110,7 @@ public function buildQuickForm() { ); } $contactTags = CRM_Core_BAO_Tag::getTags(); - + if ($contactTags) { $this->add('select', 'contact_tags', ts('Tags'), $contactTags, FALSE, array('id' => 'contact_tags', 'multiple' => 'multiple', 'title' => ts('- select -')) @@ -141,7 +140,7 @@ public function buildQuickForm() { ) ) ); - + $this->addElement('checkbox', 'toggleSelect', NULL, NULL); $this->add( 'select', 'trans_assign', diff --git a/CRM/Financial/Form/Export.php b/CRM/Financial/Form/Export.php index 646ed8966581..99a4cca31447 100644 --- a/CRM/Financial/Form/Export.php +++ b/CRM/Financial/Form/Export.php @@ -1,5 +1,4 @@ replaceUserContext(CRM_Utils_System::url('civicrm/financial/financialbatches', "reset=1&batchStatus=5")); } - + /** * Build the form * @@ -152,7 +151,7 @@ function buildQuickForm() { ) ); } - + /** * process the form after the input has been submitted and validated * diff --git a/CRM/Financial/Form/FinancialAccount.php b/CRM/Financial/Form/FinancialAccount.php index 392219b47b06..a9bb9c948afd 100644 --- a/CRM/Financial/Form/FinancialAccount.php +++ b/CRM/Financial/Form/FinancialAccount.php @@ -1,5 +1,4 @@ _action & CRM_Core_Action::DELETE) { return; } - + $this->applyFilter('__ALL__', 'trim'); $attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_FinancialAccount'); $this->add('text', 'name', ts('Name'), $attributes['name'],true); $this->addRule('name', ts('A financial type with this name already exists. Please select another name.'), 'objectExists', array('CRM_Financial_DAO_FinancialAccount', $this->_id)); - + $this->add('text', 'description', ts('Description'), $attributes['description']); $this->add('text', 'accounting_code', ts('Accounting Code'), $attributes['accounting_code']); $this->add('text', 'account_type_code', ts('Account Type Code'), $attributes['account_type_code']); @@ -72,20 +71,20 @@ public function buildQuickForm( ) { $this->add('checkbox', 'is_active', ts('Enabled?')); $this->add('checkbox', 'is_tax', ts('Is Tax?')); $this->add('checkbox', 'is_default', ts('Default?')); - + $financialAccountType = CRM_Core_PseudoConstant::accountOptionValues('financial_account_type'); if (!empty($financialAccountType)) { $this->add('select', 'financial_account_type_id', ts('Financial Account Type'), array('' => '- select -') + $financialAccountType, true); } - + if ($this->_action == CRM_Core_Action::UPDATE && CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $this->_id, 'is_reserved')) { $this->freeze(array('name', 'description', 'is_active')); } $this->addFormRule(array('CRM_Financial_Form_FinancialAccount', 'formRule'), $this); } - + /** * global validation rules for the form * @@ -104,7 +103,7 @@ static function formRule( $values, $files, $self ) { } return CRM_Utils_Array::crmIsEmptyArray( $errorMsg ) ? true : $errorMsg; } - + /** * This function sets the default values for the form. * the default values are retrieved from the database @@ -121,7 +120,7 @@ function setDefaultValues() { } return $defaults; } - + /** * Function to process the form * @@ -137,11 +136,11 @@ public function postProcess() { $ids = array( ); // store the submitted values in an array $params = $this->exportValues(); - + if ($this->_action & CRM_Core_Action::UPDATE) { $ids['contributionType'] = $this->_id; } - + $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids); CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $contributionType->name))); } diff --git a/CRM/Financial/Form/FinancialBatch.php b/CRM/Financial/Form/FinancialBatch.php index cf833104605b..fd4376e333f1 100644 --- a/CRM/Financial/Form/FinancialBatch.php +++ b/CRM/Financial/Form/FinancialBatch.php @@ -1,5 +1,4 @@ _action & CRM_Core_Action::UPDATE && $this->_id) { $batchStatus = CRM_Core_PseudoConstant::accountOptionValues('batch_status'); - + //unset exported status $exportedStatusId = CRM_Utils_Array::key('Exported', $batchStatus ); unset($batchStatus[$exportedStatusId]); @@ -231,7 +230,7 @@ public function postProcess() { $params['created_date'] = date('YmdHis'); $params['created_id'] = $session->get('userID'); $details = "{$params['title']} batch has been created by this contact."; - $activityTypeName = 'Create Batch'; + $activityTypeName = 'Create Batch'; } elseif ($this->_action & CRM_Core_Action::UPDATE && $this->_id) { $details = "{$params['title']} batch has been edited by this contact."; diff --git a/CRM/Financial/Form/FinancialTypeAccount.php b/CRM/Financial/Form/FinancialTypeAccount.php index df162e8994e0..f059ca8ea3d1 100644 --- a/CRM/Financial/Form/FinancialTypeAccount.php +++ b/CRM/Financial/Form/FinancialTypeAccount.php @@ -1,5 +1,4 @@ _aid = CRM_Utils_Request::retrieve('aid', 'Positive', $this); - $this->_id = CRM_Utils_Request::retrieve('id' , 'Positive', $this); + $this->_id = CRM_Utils_Request::retrieve('id' , 'Positive', $this); if (!$this->_id && ($this->_action & CRM_Core_Action::UPDATE)) { $this->_id = CRM_Utils_Type::escape($this->_id , 'Positive'); } @@ -79,19 +78,19 @@ public function preProcess() { if ($this->_aid && ($this->_action & CRM_Core_Action::ADD)) { $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_aid, 'name'); CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Financial Accounts')); - - $url = CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', - "reset=1&action=browse&aid={$this->_aid}"); - - $session = CRM_Core_Session::singleton(); + + $url = CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', + "reset=1&action=browse&aid={$this->_aid}"); + + $session = CRM_Core_Session::singleton(); $session->pushUserContext($url); - } + } if ($this->_id) { $financialAccount = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $this->_id, 'financial_account_id'); $fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $financialAccount, 'name'); CRM_Utils_System::setTitle($fieldTitle .' - '.ts('Financial Type Accounts')); } - + $url = CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', "reset=1&action=browse&aid={$this->_aid}"); $breadCrumb = array( array('title' => ts('Financial Type Accounts'), @@ -100,7 +99,7 @@ public function preProcess() { ); CRM_Utils_System::appendBreadCrumb($breadCrumb); } - + /** * Function to build the form * @@ -114,7 +113,7 @@ public function buildQuickForm() { 'type' => 'next', 'name' => ts('Delete Financial Account Type'), 'spacing' => '         ', - 'isDefault' => TRUE + 'isDefault' => TRUE ), array( 'type' => 'cancel', @@ -123,39 +122,39 @@ public function buildQuickForm() { ); return; } - + parent::buildQuickForm(); - + if (isset($this->_id)) { $params = array('id' => $this->_id); CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, $defaults); $this->setDefaults($defaults); $financialAccountTitle = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $defaults['financial_account_id'], 'name'); } - + $this->applyFilter('__ALL__', 'trim'); - + if ($this->_action == CRM_Core_Action::UPDATE) { $this->assign('aid', $this->_id); //hidden field to catch the group id in profile $this->add('hidden', 'financial_type_id', $this->_aid); - + //hidden field to catch the field id in profile $this->add('hidden', 'account_type_id', $this->_id); } $AccountTypeRelationship = CRM_Core_PseudoConstant::accountOptionValues('account_relationship'); if (!empty($AccountTypeRelationship)) { - $this->add('select', - 'account_relationship', + $this->add('select', + 'account_relationship', ts('Financial Account Relationship'), array('select' => '- select -') + $AccountTypeRelationship, - TRUE + TRUE ); } - + if ($this->_action == CRM_Core_Action::ADD) { - if (CRM_Utils_Array::value('account_relationship', $this->_submitValues) || CRM_Utils_Array::value('financial_account_id', $this->_submitValues)) { - $financialAccountType = array( + if (CRM_Utils_Array::value('account_relationship', $this->_submitValues) || CRM_Utils_Array::value('financial_account_id', $this->_submitValues)) { + $financialAccountType = array( '5' => 5, //expense '3' => 1, //AR relation '1' => 3, //revenue @@ -164,10 +163,10 @@ public function buildQuickForm() { '8' => 1, //premium inventory '9' => 3 //discount account is ); - + $financialAccountType = $financialAccountType[$this->_submitValues['account_relationship']]; $result = CRM_Contribute_PseudoConstant::financialAccount(NULL, $financialAccountType); - + $financialAccountSelect = array('' => ts('- select -')) + $result; } else { @@ -177,7 +176,7 @@ public function buildQuickForm() { } } if ($this->_action == CRM_Core_Action::UPDATE) { - $financialAccountType = array( + $financialAccountType = array( '5' => 5, //expense '3' => 1, //AR relation '1' => 3, //revenue @@ -186,16 +185,16 @@ public function buildQuickForm() { '8' => 1, //premium inventory '9' => 3 //discount account is ); - + $financialAccountType = $financialAccountType[$this->_defaultValues['account_relationship']]; $result = CRM_Contribute_PseudoConstant::financialAccount(NULL, $financialAccountType); - + $financialAccountSelect = array('' => ts('- select -')) + $result; - + } - $this->add('select', - 'financial_account_id', - ts('Financial Account'), + $this->add('select', + 'financial_account_id', + ts('Financial Account'), $financialAccountSelect, TRUE ); @@ -218,7 +217,7 @@ public function buildQuickForm() { ); $this->addFormRule(array('CRM_Financial_Form_FinancialTypeAccount', 'formRule'), $this); } - + /** * global validation rules for the form * @@ -228,7 +227,7 @@ public function buildQuickForm() { * @static * @access public */ - static function formRule($values, $files, $self) { + static function formRule($values, $files, $self) { $errorMsg = array(); $errorFlag = FALSE; if ($self->_action == CRM_Core_Action::DELETE) { @@ -251,7 +250,7 @@ static function formRule($values, $files, $self) { $errorMsg['financial_account_id'] = 'Financial Account is a required field.'; } if (CRM_Utils_Array::value('account_relationship', $values) && CRM_Utils_Array::value('financial_account_id', $values)) { - $params = array( + $params = array( 'account_relationship' => $values['account_relationship'], 'entity_id' => $self->_aid ); @@ -273,15 +272,15 @@ static function formRule($values, $files, $self) { $errorFlag = TRUE; } } - } - + } + if ($errorFlag) { $errorMsg['account_relationship'] = ts('This account relationship already exits'); } } return CRM_Utils_Array::crmIsEmptyArray($errorMsg) ? TRUE : $errorMsg; } - + /** * Function to process the form * @@ -292,17 +291,17 @@ public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { CRM_Financial_BAO_FinancialTypeAccount::del($this->_id, $this->_aid); CRM_Core_Session::setStatus(ts('Selected financial type account has been deleted.')); - } - else { + } + else { $params = $ids = array(); // store the submitted values in an array $params = $this->exportValues(); - + if ($this->_action & CRM_Core_Action::UPDATE) { $ids['entityFinancialAccount'] = $this->_id; } if ($this->_action & CRM_Core_Action::ADD || $this->_action & CRM_Core_Action::UPDATE) { - $params['financial_account_id'] = $this->_submitValues['financial_account_id']; + $params['financial_account_id'] = $this->_submitValues['financial_account_id']; } $params['entity_table'] = 'civicrm_financial_type'; if ($this->_action & CRM_Core_Action::ADD) { @@ -317,14 +316,14 @@ public function postProcess() { if ($buttonName == $this->getButtonName('next', 'new')) { CRM_Core_Session::setStatus(ts(' You can add another Financial Account Type.')); - $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', + $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', "reset=1&action=add&aid={$this->_aid}")); - } + } else { - $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', + $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', "reset=1&action=browse&aid={$this->_aid}")); - } + } } } - + diff --git a/CRM/Financial/Page/BatchTransaction.php b/CRM/Financial/Page/BatchTransaction.php index 7e5fe8b36e46..595dea4a3aec 100644 --- a/CRM/Financial/Page/BatchTransaction.php +++ b/CRM/Financial/Page/BatchTransaction.php @@ -1,5 +1,4 @@ assign('action', $action); - + self::$_entityID = CRM_Utils_Request::retrieve('bid' , 'Positive'); if (isset(self::$_entityID)) { $statusID = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'status_id'); diff --git a/CRM/Financial/Page/FinancialAccount.php b/CRM/Financial/Page/FinancialAccount.php index da7f58b66321..5581502b3d58 100644 --- a/CRM/Financial/Page/FinancialAccount.php +++ b/CRM/Financial/Page/FinancialAccount.php @@ -1,5 +1,4 @@ edit($action, $id) ; } - // parent run + // parent run return parent::run(); } diff --git a/CRM/Financial/Page/FinancialBatch.php b/CRM/Financial/Page/FinancialBatch.php index a0a47196d0ad..9fcb7d6fd321 100644 --- a/CRM/Financial/Page/FinancialBatch.php +++ b/CRM/Financial/Page/FinancialBatch.php @@ -1,5 +1,4 @@ id; $params['entity_table'] = 'civicrm_financial_type'; CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, CRM_Core_DAO::$_nullArray, $financialAccountIds); diff --git a/CRM/Financial/Page/FinancialTypeAccount.php b/CRM/Financial/Page/FinancialTypeAccount.php index 83ebeab520f4..2f2f3a08a072 100644 --- a/CRM/Financial/Page/FinancialTypeAccount.php +++ b/CRM/Financial/Page/FinancialTypeAccount.php @@ -1,5 +1,4 @@ financial_account_type_id)) { $optionGroupName = 'financial_account_type'; $financialType[$dao->id]['financial_account_type'] = CRM_Utils_Array::value($financialAccount->financial_account_type_id, $financialAccountType); - + } if (!empty($dao->account_relationship)) { $optionGroupName = 'account_relationship'; diff --git a/CRM/Friend/Form.php b/CRM/Friend/Form.php index b4d3bb13840a..27b3ab7a50bb 100644 --- a/CRM/Friend/Form.php +++ b/CRM/Friend/Form.php @@ -90,7 +90,7 @@ public function preProcess() { $this->_entityTable = 'civicrm_event'; $isShare = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_entityId, 'is_share'); } else { - $isShare = CRM_Utils_Array::value('is_share', $values); + $isShare = CRM_Utils_Array::value('is_share', $values); } // Tell Form.tpl whether to include SocialNetwork.tpl for social media sharing $this->assign('isShare', $isShare); @@ -112,10 +112,10 @@ public function preProcess() { $this->_entityTable = 'civicrm_pcp'; $sql = ' - SELECT pcp.title, + SELECT pcp.title, contrib.campaign_id FROM civicrm_pcp pcp - INNER JOIN civicrm_contribution_page contrib ON ( pcp.page_id = contrib.id AND pcp.page_type = "contribute" ) + INNER JOIN civicrm_contribution_page contrib ON ( pcp.page_id = contrib.id AND pcp.page_type = "contribute" ) WHERE pcp.id = %1'; $pcp = CRM_Core_DAO::executeQuery($sql, array(1 => array($this->_entityId, 'Positive'))); while ($pcp->fetch()) { diff --git a/CRM/Grant/Controller/PaymentSearch.php b/CRM/Grant/Controller/PaymentSearch.php index 0f5064876dce..af109e5c67d8 100644 --- a/CRM/Grant/Controller/PaymentSearch.php +++ b/CRM/Grant/Controller/PaymentSearch.php @@ -1,5 +1,4 @@ _stateMachine = new CRM_Grant_StateMachine_PaymentSearch( $this, $action ); - + // create and instantiate the pages $this->addPages( $this->_stateMachine, $action ); - + // add all the actions $config = CRM_Core_Config::singleton( ); $this->addActions( ); diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index a85b632bfe2a..094f5fac1c10 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -21,7 +21,7 @@ | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | - | see the CiviCRM license FAQ at http://civicrm.org/licensing + | see the CiviCRM license FAQ at http://civicrm.org/licensing +--------------------------------------------------------------------+ */ @@ -148,9 +148,9 @@ class CRM_Grant_Form_Search extends CRM_Core_Form { $this->_done = FALSE; $this->defaults = array(); - /* - * we allow the controller to set force/reset externally, useful when we are being - * driven by the wizard framework + /* + * we allow the controller to set force/reset externally, useful when we are being + * driven by the wizard framework */ $this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject); @@ -229,9 +229,9 @@ function buildQuickForm() { CRM_Grant_BAO_Query::buildSearchForm($this); - /* - * add form checkboxes for each row. This is needed out here to conform to QF protocol - * of all elements being declared in builQuickForm + /* + * add form checkboxes for each row. This is needed out here to conform to QF protocol + * of all elements being declared in builQuickForm */ diff --git a/CRM/Grant/Form/Task/SearchTaskHookSample.php b/CRM/Grant/Form/Task/SearchTaskHookSample.php index 290eab2c5c37..16fc3c516475 100644 --- a/CRM/Grant/Form/Task/SearchTaskHookSample.php +++ b/CRM/Grant/Form/Task/SearchTaskHookSample.php @@ -54,9 +54,9 @@ function preProcess() { SELECT grt.decision_date as decision_date, grt.amount_total as amount_total, grt.amount_granted as amount_granted, - ct.display_name as display_name + ct.display_name as display_name FROM civicrm_grant grt -INNER JOIN civicrm_contact ct ON ( grt.contact_id = ct.id ) +INNER JOIN civicrm_contact ct ON ( grt.contact_id = ct.id ) WHERE grt.id IN ( $grantIDs )"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); diff --git a/CRM/Grant/Page/GrantProgram.php b/CRM/Grant/Page/GrantProgram.php index 4d25de60da96..3ee9cd6ebfd1 100644 --- a/CRM/Grant/Page/GrantProgram.php +++ b/CRM/Grant/Page/GrantProgram.php @@ -1,5 +1,4 @@ ts('View'), 'url' => 'civicrm/grant_program', 'qs' => 'action=view&id=%%id%%&reset=1', - 'title' => ts('View Grant Program') + 'title' => ts('View Grant Program') ), CRM_Core_Action::UPDATE => array( 'name' => ts('Edit'), 'url' => 'civicrm/grant_program', 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Grant Program') + 'title' => ts('Edit Grant Program') ), CRM_Core_Action::DELETE => array( 'name' => ts('Delete'), 'url' => 'civicrm/grant_program', 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete Grant Program') + 'title' => ts('Delete Grant Program') ) ); } return self::$_links; } - + function browse( ) { - + $grantProgram = array(); require_once 'CRM/Grant/DAO/GrantProgram.php'; $dao = new CRM_Grant_DAO_GrantProgram(); - + $dao->orderBy('label'); $dao->find(); - + while ($dao->fetch()) { $grantProgram[$dao->id] = array(); CRM_Core_DAO::storeValues( $dao, $grantProgram[$dao->id]); $action = array_sum(array_keys($this->links())); - $grantProgram[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), $action, + $grantProgram[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $dao->id)); } require_once 'CRM/Grant/PseudoConstant.php'; @@ -109,17 +108,17 @@ function browse( ) { } $this->assign('rows',$grantProgram ); } - - function run( ) + + function run( ) { $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 0 ); - if ( $action & CRM_Core_Action::VIEW ) { - $this->view( $action); + if ( $action & CRM_Core_Action::VIEW ) { + $this->view( $action); } else if ( $action & ( CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE ) ) { $this->edit( $action); } else { - $this->browse( ); + $this->browse( ); } $this->assign('action', $action); return parent::run( ); @@ -133,10 +132,10 @@ function edit($action) $result = $controller->run(); } - function view( $action ) - { + function view( $action ) + { $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_GrantProgramView', ts(''), $action ); - $controller->setEmbedded( true ); + $controller->setEmbedded( true ); $result = $controller->process(); $result = $controller->run(); } diff --git a/CRM/Grant/Page/Payment.php b/CRM/Grant/Page/Payment.php index 13ec19bfd858..6d2e56bd2eec 100644 --- a/CRM/Grant/Page/Payment.php +++ b/CRM/Grant/Page/Payment.php @@ -1,5 +1,4 @@ view( $action ); + if ( $action & CRM_Core_Action::VIEW ) { + $this->view( $action ); } elseif ( $action & ( CRM_Core_Action::STOP) ) { $this->stop( $action ); } elseif ( $action & ( CRM_Core_Action::REPRINT ) ) { - $this->reprint( $action ); + $this->reprint( $action ); } else { - $this->withdraw( $action ); + $this->withdraw( $action ); } $this->assign('action', $action); return parent::run( ); } - function view( $action ) - { + function view( $action ) + { $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); - $controller->setEmbedded( true ); + $controller->setEmbedded( true ); $result = $controller->process(); $result = $controller->run(); } - function stop( $action ) - { + function stop( $action ) + { $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); - $controller->setEmbedded( true ); + $controller->setEmbedded( true ); $result = $controller->process(); $result = $controller->run(); } - function reprint( $action ) - { + function reprint( $action ) + { $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); - $controller->setEmbedded( true ); + $controller->setEmbedded( true ); $result = $controller->process(); $result = $controller->run(); } - function withdraw( $action ) - { + function withdraw( $action ) + { $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); - $controller->setEmbedded( true ); + $controller->setEmbedded( true ); $result = $controller->process(); $result = $controller->run(); } diff --git a/CRM/Grant/Selector/PaymentSearch.php b/CRM/Grant/Selector/PaymentSearch.php index 5ef5734c88b0..8cc9ecbcfd77 100644 --- a/CRM/Grant/Selector/PaymentSearch.php +++ b/CRM/Grant/Selector/PaymentSearch.php @@ -47,9 +47,9 @@ * results of advanced search options. * */ -class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements CRM_Core_Selector_API +class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements CRM_Core_Selector_API { - + /** * This defines two actions- View and Edit. * @@ -80,28 +80,28 @@ class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements 'amount', ); - /** - * are we restricting ourselves to a single contact - * - * @access protected - * @var boolean - */ + /** + * are we restricting ourselves to a single contact + * + * @access protected + * @var boolean + */ protected $_single = false; - /** - * are we restricting ourselves to a single contact - * - * @access protected - * @var boolean - */ + /** + * are we restricting ourselves to a single contact + * + * @access protected + * @var boolean + */ protected $_limit = null; /** * what context are we being invoked from - * - * @access protected + * + * @access protected * @var string - */ + */ protected $_context = null; /** @@ -111,7 +111,7 @@ class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements * @var array * @access protected */ - public $_queryParams; + public $_queryParams; /** * represent the type of selector @@ -121,18 +121,18 @@ class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements */ protected $_action; - /** - * The additional clause that we restrict the search with - * - * @var string - */ + /** + * The additional clause that we restrict the search with + * + * @var string + */ protected $_grantClause = null; - /** + /** * The query object - * - * @var string - */ + * + * @var string + */ protected $_query; /** @@ -140,7 +140,7 @@ class CRM_Grant_Selector_PaymentSearch extends CRM_Core_Selector_Base implements * * @param array $queryParams array of parameters for query * @param int $action - action of search basic or advanced. - * @param string $grantClause if the caller wants to further restrict the search + * @param string $grantClause if the caller wants to further restrict the search * @param boolean $single are we dealing only with one contact? * @param int $limit how many participations do we want returned * @@ -152,11 +152,11 @@ function __construct(&$queryParams, $grantClause = null, $single = false, $limit = null, - $context = 'search' ) + $context = 'search' ) { // submitted form values $this->_queryParams =& $queryParams; - + $this->_single = $single; $this->_limit = $limit; @@ -169,18 +169,18 @@ function __construct(&$queryParams, $this->_query = new CRM_Grant_BAO_PaymentSearch( $this->_queryParams, null, null, false, false, CRM_Grant_BAO_PaymentSearch::MODE_GRANT_PAYMENT ); - - + + $this->_query->_distinctComponentClause = " civicrm_payment.id"; $this->_query->_groupByComponentClause = " GROUP BY civicrm_payment.id"; - + }//end of constructor /** * This method returns the links that are given for each search row. - * currently the links added for each row are - * + * currently the links added for each row are + * * - View * - Edit * @@ -189,10 +189,10 @@ function __construct(&$queryParams, * */ static function &links( $key = null ) - { + { $id = CRM_Utils_Request::retrieve('id', 'Integer', $this); $extraParams = ( $key ) ? "&key={$key}" : null; - + if (!(self::$_links)) { self::$_links = array( CRM_Core_Action::VIEW => array( @@ -200,7 +200,7 @@ static function &links( $key = null ) 'url' => 'civicrm/grant/payment', 'qs' => 'reset=1&id=%%id%%&action=view&context=%%cxt%%&selectedChild=grant'.$extraParams, 'title' => ts('View Grant'), - ), + ), CRM_Core_Action::STOP => array( 'name' => ts('Stop'), 'url' => 'civicrm/grant/payment', @@ -220,22 +220,22 @@ static function &links( $key = null ) 'title' => ts('Edit Grant'), ) ); - + self::$_links = self::$_links ; - + } - - + + return self::$_links; } //end of function - + /** * getter for array of the parameters required for creating pager. * - * @param + * @param * @access public */ - function getPagerParams($action, &$params) + function getPagerParams($action, &$params) { $params['status'] = ts('Grant') . ' %%StatusMessage%%'; $params['csvString'] = null; @@ -252,21 +252,21 @@ function getPagerParams($action, &$params) /** * Returns total number of rows for the query. * - * @param - * @return int Total number of rows + * @param + * @return int Total number of rows * @access public */ function getTotalCount($action) - { + { return $this->_query->searchQuery( 0, 0, null, - true, false, - false, false, - false, + true, false, + false, false, + false, $this->_grantClause ); - + } - + /** * returns all the rows in the given offset and rowCount * * @param enum $action the action being performed @@ -277,20 +277,20 @@ function getTotalCount($action) * * @return int the total number of rows for this action */ - function &getRows($action, $offset, $rowCount, $sort, $output = null) - { + function &getRows($action, $offset, $rowCount, $sort, $output = null) + { $result = $this->_query->searchQuery( $offset, $rowCount, $sort, - false, false, - false, false, - false, + false, false, + false, false, + false, $this->_grantClause ); - - - + + + // process the result of the query $rows = array( ); - + //CRM-4418 check for view, edit, delete $permissions = array( CRM_Core_Permission::VIEW ); if ( CRM_Core_Permission::check( 'edit grants' ) ) { @@ -299,12 +299,12 @@ function &getRows($action, $offset, $rowCount, $sort, $output = null) if ( CRM_Core_Permission::check( 'delete in CiviGrant' ) ) { $permissions[] = CRM_Core_Permission::DELETE; } - $mask = CRM_Core_Action::mask( $permissions ); - - + $mask = CRM_Core_Action::mask( $permissions ); + + while ( $result->fetch()) { $row = array(); - + // the columns we are interested in foreach (self::$_properties as $property) { if ( isset( $result->$property ) ) { @@ -320,15 +320,15 @@ function &getRows($action, $offset, $rowCount, $sort, $output = null) // if ($this->_context == 'search') { // $row['checkbox'] = CRM_Core_Form::CB_PREFIX . $result->id; // } - $this->id = $result->id; + $this->id = $result->id; $link = self::links( $this->_key); if ( $result->payment_status_id == 2 || $result->payment_status_id == 4 ) { - unset($link[CRM_Core_Action::STOP]); + unset($link[CRM_Core_Action::STOP]); unset($link[CRM_Core_Action::REPRINT]); unset($link[CRM_Core_Action::WITHDRAW]); } - - $row['action'] = CRM_Core_Action::formLink( $link, + + $row['action'] = CRM_Core_Action::formLink( $link, $mask, array( 'id' => $result->id, 'cxt' => $this->_context ) ); @@ -337,32 +337,32 @@ function &getRows($action, $offset, $rowCount, $sort, $output = null) } return $rows; } - - + + /** * @return array $qill which contains an array of strings * @access public */ - + // the current internationalisation is bad, but should more or less work // for most of "European" languages public function getQILL( ) - { + { return $this->_query->qill( ); } - - /** - * returns the column headers as an array of tuples: - * (name, sortName (key to the sort array)) - * - * @param string $action the action being performed - * @param enum $output what should the result set include (web/email/csv) - * - * @return array the column headers that need to be displayed - * @access public - */ - public function &getColumnHeaders( $action = null, $output = null ) - { + + /** + * returns the column headers as an array of tuples: + * (name, sortName (key to the sort array)) + * + * @param string $action the action being performed + * @param enum $output what should the result set include (web/email/csv) + * + * @return array the column headers that need to be displayed + * @access public + */ + public function &getColumnHeaders( $action = null, $output = null ) + { if ( ! isset( self::$_columnHeaders ) ) { self::$_columnHeaders = array( array('name' => ts('Status'), @@ -386,12 +386,12 @@ public function &getColumnHeaders( $action = null, $output = null ) ), array( 'name' => ts('Payee name'), - 'sort' => 'payable_to_name', + 'sort' => 'payable_to_name', 'direction' => CRM_Utils_Sort::DONTCARE, ), array( 'name' => ts('Amount'), - 'sort' => 'amount', + 'sort' => 'amount', 'direction' => CRM_Utils_Sort::DONTCARE, ), array('desc' => ts('Actions') ), @@ -399,20 +399,20 @@ public function &getColumnHeaders( $action = null, $output = null ) } return self::$_columnHeaders; } - + function &getQuery( ) { return $this->_query; } - /** - * name of export file. - * - * @param string $output type of output - * @return string name of the file - */ - function getExportFileName( $output = 'csv') { - return ts('CiviCRM Grant Search'); - } + /** + * name of export file. + * + * @param string $output type of output + * @return string name of the file + */ + function getExportFileName( $output = 'csv') { + return ts('CiviCRM Grant Search'); + } }//end of class diff --git a/CRM/Group/Page/AJAX.php b/CRM/Group/Page/AJAX.php index 8a861835b48f..938e98cfd079 100644 --- a/CRM/Group/Page/AJAX.php +++ b/CRM/Group/Page/AJAX.php @@ -41,13 +41,13 @@ static function getGroupList() { if ( isset($params['parent_id']) ) { // requesting child groups for a given parent - $params['page'] = 1; + $params['page'] = 1; $params['rp'] = 25; $groups = CRM_Contact_BAO_Group::getGroupListSelector($params); echo json_encode($groups); - CRM_Utils_System::civiExit(); - } else { + CRM_Utils_System::civiExit(); + } else { $sortMapper = array( 0 => 'groups.title', 1 => 'groups.id', 2 => 'createdBy.sort_name', 3 => '', 4 => 'groups.group_type', 5 => 'groups.visibility', @@ -70,7 +70,7 @@ static function getGroupList() { $groups = CRM_Contact_BAO_Group::getGroupListSelector($params); // if no groups found with parent-child hierarchy and logged in user say can view child groups only (an ACL case), - // go ahead with flat hierarchy, CRM-12225 + // go ahead with flat hierarchy, CRM-12225 if (empty($groups)) { $groupsAccessible = CRM_Core_PseudoConstant::group(); $parentsOnly = CRM_Utils_Array::value('parentsOnly', $params); diff --git a/CRM/Import/Field.php b/CRM/Import/Field.php index 55efa1e57ba3..c434cb8d8cfd 100644 --- a/CRM/Import/Field.php +++ b/CRM/Import/Field.php @@ -123,7 +123,7 @@ class CRM_Import_Field { * does this field have a related Contact info of Phone Type * @var string */ - public $_relatedContactPhoneType; + public $_relatedContactPhoneType; function __construct($name, $title, $type = CRM_Utils_Type::T_INT, $columnPattern = '//', $dataPattern = '//', $hasLocationType = NULL, $phoneType = NULL, $related = NULL, $relatedContactType = NULL, $relatedContactDetails = NULL, $relatedContactLocType = NULL, $relatedContactPhoneType = NULL) { $this->_name = $name; diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 09439e757e35..fccd05e66179 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -228,7 +228,7 @@ abstract class CRM_Import_Parser { * * @var int */ - public $_dedupeRuleGroupID = NULL; + public $_dedupeRuleGroupID = NULL; function __construct() { $this->_maxLinesToProcess = 0; diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php index a839989518ef..9ea2c484c826 100644 --- a/CRM/Logging/ReportDetail.php +++ b/CRM/Logging/ReportDetail.php @@ -60,15 +60,15 @@ function __construct() { parent::__construct(); CRM_Utils_System::resetBreadCrumb(); - $breadcrumb = + $breadcrumb = array( - array('title' => ts('Home'), + array('title' => ts('Home'), 'url' => CRM_Utils_System::url()), - array('title' => ts('CiviCRM'), + array('title' => ts('CiviCRM'), 'url' => CRM_Utils_System::url('civicrm', 'reset=1')), - array('title' => ts('View Contact'), + array('title' => ts('View Contact'), 'url' => CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->cid}")), - array('title' => ts('Search Results'), + array('title' => ts('Search Results'), 'url' => CRM_Utils_System::url('civicrm/contact/search', "force=1")), ); CRM_Utils_System::appendBreadCrumb($breadcrumb); diff --git a/CRM/Mailing/Event/BAO/Opened.php b/CRM/Mailing/Event/BAO/Opened.php index 0f434ed5b64d..611b061863f4 100644 --- a/CRM/Mailing/Event/BAO/Opened.php +++ b/CRM/Mailing/Event/BAO/Opened.php @@ -169,11 +169,11 @@ public static function &getRows($mailing_id, $job_id = NULL, if (!empty($job_id)) { $query .= " AND $job.id = " . CRM_Utils_Type::escape($job_id, 'Integer'); } - + if (!empty($contact_id)) { $query .= " AND $contact.id = " . CRM_Utils_Type::escape($contact_id, 'Integer'); } - + if ($is_distinct) { $query .= " GROUP BY $queue.id "; } diff --git a/CRM/Mailing/Event/BAO/Queue.php b/CRM/Mailing/Event/BAO/Queue.php index 14f220ce727e..df009a5270f6 100644 --- a/CRM/Mailing/Event/BAO/Queue.php +++ b/CRM/Mailing/Event/BAO/Queue.php @@ -114,10 +114,10 @@ public static function &verify($job_id, $queue_id, $hash) { public static function getEmailAddress($queue_id) { $email = CRM_Core_BAO_Email::getTableName(); $eq = self::getTableName(); - $query = " SELECT $email.email as email - FROM $email - INNER JOIN $eq - ON $eq.email_id = $email.id + $query = " SELECT $email.email as email + FROM $email + INNER JOIN $eq + ON $eq.email_id = $email.id WHERE $eq.id = " . CRM_Utils_Type::rule($queue_id, 'Integer'); $q = new CRM_Mailing_Event_BAO_Queue(); diff --git a/CRM/Mailing/Event/BAO/Reply.php b/CRM/Mailing/Event/BAO/Reply.php index eeeda636c307..32a1bf3ef13d 100644 --- a/CRM/Mailing/Event/BAO/Reply.php +++ b/CRM/Mailing/Event/BAO/Reply.php @@ -72,8 +72,8 @@ public static function &reply($job_id, $queue_id, $hash, $replyto = NULL) { $mailings = CRM_Mailing_BAO_Mailing::getTableName(); $jobs = CRM_Mailing_BAO_Job::getTableName(); $mailing->query( - "SELECT * FROM $mailings - INNER JOIN $jobs + "SELECT * FROM $mailings + INNER JOIN $jobs ON $jobs.mailing_id = $mailings.id WHERE $jobs.id = {$q->job_id}" ); diff --git a/CRM/Mailing/Event/BAO/Resubscribe.php b/CRM/Mailing/Event/BAO/Resubscribe.php index edc77cb7f50e..8794a5ebe62d 100644 --- a/CRM/Mailing/Event/BAO/Resubscribe.php +++ b/CRM/Mailing/Event/BAO/Resubscribe.php @@ -76,8 +76,8 @@ public static function &resub_to_mailing($job_id, $queue_id, $hash) { $gc = CRM_Contact_BAO_GroupContact::getTableName(); //We Need the mailing Id for the hook... - $do->query("SELECT $job.mailing_id as mailing_id - FROM $job + $do->query("SELECT $job.mailing_id as mailing_id + FROM $job WHERE $job.id = " . CRM_Utils_Type::escape($job_id, 'Integer')); $do->fetch(); $mailing_id = $do->mailing_id; @@ -95,7 +95,7 @@ public static function &resub_to_mailing($job_id, $queue_id, $hash) { AND $group.is_hidden = 0" ); - /* Make a list of groups and a list of prior mailings that received + /* Make a list of groups and a list of prior mailings that received * this mailing */ @@ -209,9 +209,9 @@ public static function send_resub_response($queue_id, $groups, $is_domain = FALS list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail(); $dao = new CRM_Mailing_BAO_Mailing(); - $dao->query(" SELECT * FROM $mailingTable + $dao->query(" SELECT * FROM $mailingTable INNER JOIN $jobTable ON - $jobTable.mailing_id = $mailingTable.id + $jobTable.mailing_id = $mailingTable.id WHERE $jobTable.id = $job"); $dao->fetch(); diff --git a/CRM/Mailing/Form/Subscribe.php b/CRM/Mailing/Form/Subscribe.php index 32bf43e4ef89..041ecac28541 100644 --- a/CRM/Mailing/Form/Subscribe.php +++ b/CRM/Mailing/Form/Subscribe.php @@ -56,7 +56,7 @@ function preProcess() { $query = " SELECT title, description FROM civicrm_group - WHERE id={$this->_groupID} + WHERE id={$this->_groupID} AND visibility != 'User and User Admin Only' AND $groupTypeCondition"; diff --git a/CRM/Mailing/Form/Upload.php b/CRM/Mailing/Form/Upload.php index 76c23410a04d..1fd093c26c18 100644 --- a/CRM/Mailing/Form/Upload.php +++ b/CRM/Mailing/Form/Upload.php @@ -38,7 +38,7 @@ */ class CRM_Mailing_Form_Upload extends CRM_Core_Form { public $_mailingID; - + function preProcess() { $this->_mailingID = $this->get('mailing_id'); if (CRM_Core_Permission::check('administer CiviCRM')) { diff --git a/CRM/Member/BAO/MembershipType.php b/CRM/Member/BAO/MembershipType.php index bb988ccbeb7f..d9b1e13f0b56 100644 --- a/CRM/Member/BAO/MembershipType.php +++ b/CRM/Member/BAO/MembershipType.php @@ -391,7 +391,7 @@ public static function getDatesForMembershipType($membershipTypeId, $joinDate = if ($dateParts[2] >= $membershipTypeDetails['fixed_period_rollover_day']){ $fixed_period_rollover = True; } - + // Start date is always first day of actualStartDate month if (!$startDate) { $actualStartDate = $startDate = $year . '-' . $month . '-01'; @@ -685,7 +685,7 @@ public static function createMembershipPriceField($params, $ids, $previousID, $m $fieldParams['weight'] = $fieldParams['option_weight'][1] = 1; $fieldParams['option_label'][1] = $params['name']; $fieldParams['option_description'][1] = CRM_Utils_Array::value('description', $params); - + $fieldParams['membership_type_id'][1] = $membershipTypeId; $fieldParams['option_amount'][1] = empty($params['minimum_fee']) ? 0 : $params['minimum_fee']; $fieldParams['financial_type_id'] = CRM_Utils_Array::value('financial_type_id', $params); @@ -695,7 +695,7 @@ public static function createMembershipPriceField($params, $ids, $previousID, $m $fieldParams['option_id'] = CRM_Utils_Array::value('option_id', $optionsIds); } $priceField = CRM_Price_BAO_Field::create($fieldParams); - } + } else { $fieldID = $results['id']; $fieldValueParams = array( @@ -708,7 +708,7 @@ public static function createMembershipPriceField($params, $ids, $previousID, $m $results['label'] = $results['name'] = $params['name']; $results['amount'] = empty($params['minimum_fee']) ? 0 : $params['minimum_fee']; $optionsIds['id'] = $results['id']; - } + } else { $results = array( 'price_field_id' => $fieldID, @@ -735,9 +735,9 @@ public static function createMembershipPriceField($params, $ids, $previousID, $m /** This function updates all price field value for quick config * price set which has membership type * - * @param integer membership type id + * @param integer membership type id * - * @param integer financial type id + * @param integer financial type id */ static function updateAllPriceFieldValue($membershipTypeId, $params) { if (CRM_Utils_Array::value('minimum_fee', $params)){ @@ -755,7 +755,7 @@ static function updateAllPriceFieldValue($membershipTypeId, $params) { ); $queryParams = array(1 => array($membershipTypeId, 'Integer')); - foreach ($updateValues as $key => $value) { + foreach ($updateValues as $key => $value) { if (array_key_exists($value[1], $params)) { $updateFields[] = "cpfv." . $value[0] . " = %$key"; if ($value[1] == 'minimum_fee') { @@ -769,11 +769,11 @@ static function updateAllPriceFieldValue($membershipTypeId, $params) { } $query = "UPDATE `civicrm_price_field_value` cpfv -INNER JOIN civicrm_price_field cpf on cpf.id = cpfv.price_field_id +INNER JOIN civicrm_price_field cpf on cpf.id = cpfv.price_field_id INNER JOIN civicrm_price_set cps on cps.id = cpf.price_set_id -SET " . implode(' , ', $updateFields) . " WHERE cpfv.membership_type_id = %1 +SET " . implode(' , ', $updateFields) . " WHERE cpfv.membership_type_id = %1 AND cps.is_quick_config = 1 AND cps.name != 'default_membership_type_amount'"; CRM_Core_DAO::executeQuery($query, $queryParams); - } + } } diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index d01c0bfdf24a..5c99e447713c 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -51,7 +51,7 @@ class CRM_Member_Form extends CRM_Core_Form { * * @var string */ - protected $_BAOName; + protected $_BAOName; function preProcess() { $this->_id = $this->get('id'); diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 51700a4d4949..b9fada68d281 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -385,7 +385,7 @@ public function buildQuickForm() { $autoRenew = array(); if (!empty($membershipType)) { $sql = ' -SELECT id, +SELECT id, auto_renew, duration_unit, duration_interval @@ -427,7 +427,7 @@ public function buildQuickForm() { $this->addDate('renewal_date', ts('Date Renewal Entered'), FALSE, array('formatType' => 'activityDate')); - $this->add('select', 'financial_type_id', ts('Financial Type'), + $this->add('select', 'financial_type_id', ts('Financial Type'), array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::financialType() ); if (CRM_Core_Permission::access('CiviContribute') && !$this->_mode) { @@ -590,7 +590,7 @@ public function postProcess() { $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($formValues['payment_processor_id'], $this->_mode ); - + $fields = array(); // set email for primary location. @@ -742,7 +742,7 @@ public function postProcess() { if (CRM_Utils_Array::value('record_contribution', $formValues) || $this->_mode) { // set the source $formValues['contribution_source'] = "{$memType} Membership: Offline membership renewal (by {$userName})"; - + //create line items $lineItem = array(); $priceSetId = null; @@ -750,8 +750,8 @@ public function postProcess() { CRM_Price_BAO_Set::processAmount($this->_priceSet['fields'], $this->_params, $lineItem[$priceSetId] ); - //CRM-11529 for quick config backoffice transactions - //when financial_type_id is passed in form, update the + //CRM-11529 for quick config backoffice transactions + //when financial_type_id is passed in form, update the //lineitems with the financial type selected in form if ($submittedFinancialType = CRM_Utils_Array::value('financial_type_id', $formValues)) { foreach ($lineItem[$priceSetId] as &$li) { @@ -772,7 +772,7 @@ public function postProcess() { } } $formValues['contact_id'] = $this->_contactID; - + CRM_Member_BAO_Membership::recordMembershipContribution( $formValues, CRM_Core_DAO::$_nullArray, $renewMembership->id ); diff --git a/CRM/Member/Form/MembershipView.php b/CRM/Member/Form/MembershipView.php index 5685b5c036d6..64aa72d219a6 100644 --- a/CRM/Member/Form/MembershipView.php +++ b/CRM/Member/Form/MembershipView.php @@ -190,11 +190,11 @@ public function preProcess() { $relTypeIds = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ",", $membershipType['relationship_type_id']); $sql = " SELECT relationship_type_id, - CASE + CASE WHEN contact_id_a = {$values['owner_contact_id']} AND contact_id_b = {$values['contact_id']} THEN 'b_a' WHEN contact_id_b = {$values['owner_contact_id']} AND contact_id_a = {$values['contact_id']} THEN 'a_b' END AS 'relType' - FROM civicrm_relationship + FROM civicrm_relationship WHERE relationship_type_id IN ($relTypeIds)"; $dao = CRM_Core_DAO::executeQuery($sql); $values['relationship'] = NULL; @@ -290,7 +290,7 @@ public function preProcess() { $displayName = CRM_Contact_BAO_Contact::displayName($values['contact_id']); $this->assign('displayName', $displayName); - + // Check if this is default domain contact CRM-10482 if (CRM_Contact_BAO_Contact::checkDomainContact($values['contact_id'])) { $displayName .= ' (' . ts('default organization') . ')'; @@ -298,7 +298,7 @@ public function preProcess() { // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container CRM_Utils_System::setTitle(ts('View Membership for') . ' ' . $displayName); - + // add viewed membership to recent items list $recentTitle = $displayName . ' - ' . ts('Membership Type:') . ' ' . $values['membership_type']; $url = CRM_Utils_System::url('civicrm/contact/view/membership', diff --git a/CRM/Member/Form/Search.php b/CRM/Member/Form/Search.php index 1adba6ca1935..8af376759fd9 100644 --- a/CRM/Member/Form/Search.php +++ b/CRM/Member/Form/Search.php @@ -135,7 +135,7 @@ class CRM_Member_Form_Search extends CRM_Core_Form { * * @return void * @access public - */ + */ function preProcess() { $this->set('searchFormName', 'Search'); @@ -150,9 +150,9 @@ function preProcess() { $this->defaults = array(); - /* - * we allow the controller to set force/reset externally, useful when we are being - * driven by the wizard framework + /* + * we allow the controller to set force/reset externally, useful when we are being + * driven by the wizard framework */ $this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject); @@ -226,9 +226,9 @@ function buildQuickForm() { CRM_Member_BAO_Query::buildSearchForm($this); - /* - * add form checkboxes for each row. This is needed out here to conform to QF protocol - * of all elements being declared in builQuickForm + /* + * add form checkboxes for each row. This is needed out here to conform to QF protocol + * of all elements being declared in builQuickForm */ $rows = $this->get('rows'); diff --git a/CRM/Member/Form/Task/Batch.php b/CRM/Member/Form/Task/Batch.php index f0b8fd2926e6..419b478c4f5e 100644 --- a/CRM/Member/Form/Task/Batch.php +++ b/CRM/Member/Form/Task/Batch.php @@ -62,7 +62,7 @@ class CRM_Member_Form_Task_Batch extends CRM_Member_Form_Task { * * @return void * @access public - */ + */ function preProcess() { /* * initialize the task and row fields diff --git a/CRM/Member/Form/Task/Delete.php b/CRM/Member/Form/Task/Delete.php index 19483c0918d3..12152e697058 100644 --- a/CRM/Member/Form/Task/Delete.php +++ b/CRM/Member/Form/Task/Delete.php @@ -53,7 +53,7 @@ class CRM_Member_Form_Task_Delete extends CRM_Member_Form_Task { * * @return void * @access public - */ + */ function preProcess() { //check for delete if (!CRM_Core_Permission::checkActionPermission('CiviMember', CRM_Core_Action::DELETE)) { diff --git a/CRM/Member/Form/Task/Email.php b/CRM/Member/Form/Task/Email.php index 456018fec9e0..587522af595f 100644 --- a/CRM/Member/Form/Task/Email.php +++ b/CRM/Member/Form/Task/Email.php @@ -67,7 +67,7 @@ class CRM_Member_Form_Task_Email extends CRM_Member_Form_Task { * * @return void * @access public - */ + */ function preProcess() { CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); parent::preProcess(); diff --git a/CRM/Member/Form/Task/SearchTaskHookSample.php b/CRM/Member/Form/Task/SearchTaskHookSample.php index 64c0c9bb55e5..f3c07ef271ed 100644 --- a/CRM/Member/Form/Task/SearchTaskHookSample.php +++ b/CRM/Member/Form/Task/SearchTaskHookSample.php @@ -53,10 +53,10 @@ function preProcess() { $query = " SELECT mem.start_date as start_date, mem.end_date as end_date, - mem.source as source, - ct.display_name as display_name + mem.source as source, + ct.display_name as display_name FROM civicrm_membership mem -INNER JOIN civicrm_contact ct ON ( mem.contact_id = ct.id ) +INNER JOIN civicrm_contact ct ON ( mem.contact_id = ct.id ) WHERE mem.id IN ( $memberIDs )"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); diff --git a/CRM/Member/Import/Parser.php b/CRM/Member/Import/Parser.php index e22d19dcfa62..95b454ec8cbf 100644 --- a/CRM/Member/Import/Parser.php +++ b/CRM/Member/Import/Parser.php @@ -447,7 +447,7 @@ function setActiveFields($fieldKeys) { $this->_activeFields[$i]->_hasLocationType = $elements[$i]; } } - + function setActiveFieldPhoneTypes( $elements ) { for ($i = 0; $i < count( $elements ); $i++) { $this->_activeFields[$i]->_phoneType = $elements[$i]; diff --git a/CRM/Member/Page/AJAX.php b/CRM/Member/Page/AJAX.php index 0abdc15ec12e..e93814df79c8 100644 --- a/CRM/Member/Page/AJAX.php +++ b/CRM/Member/Page/AJAX.php @@ -52,7 +52,7 @@ function getMemberTypeDefaults($config) { } $memType = CRM_Utils_Type::escape($_POST['mtype'], 'Integer'); - $query = "SELECT name, minimum_fee AS total_amount, financial_type_id, auto_renew + $query = "SELECT name, minimum_fee AS total_amount, financial_type_id, auto_renew FROM civicrm_membership_type WHERE id = %1"; diff --git a/CRM/Queue/Runner.php b/CRM/Queue/Runner.php index d73f91f58b4b..7500de6fe7f3 100644 --- a/CRM/Queue/Runner.php +++ b/CRM/Queue/Runner.php @@ -141,7 +141,7 @@ public function runAll() { // setRaiseException should't be necessary here, but there's a bug // somewhere which causes this setting to be lost. Observed while // upgrading 4.0=>4.2. This preference really shouldn't be a global - // setting -- it should be more of a contextual/stack-based setting. + // setting -- it should be more of a contextual/stack-based setting. // This should be appropriate because queue-runners are not used with // basic web pages -- they're used with CLI/REST/AJAX. $errorScope = CRM_Core_TemporaryErrorScope::useException(); diff --git a/CRM/SMS/Page/Callback.php b/CRM/SMS/Page/Callback.php index f2e7793ede01..bedafd97b572 100644 --- a/CRM/SMS/Page/Callback.php +++ b/CRM/SMS/Page/Callback.php @@ -33,12 +33,12 @@ * */ -class CRM_SMS_Page_Callback +class CRM_SMS_Page_Callback { - + function run(){ $provider = CRM_SMS_Provider::singleton($_REQUEST); - + if (array_key_exists('status',$_REQUEST)){ $provider->callback(); } else { diff --git a/CRM/UF/Page/AJAX.php b/CRM/UF/Page/AJAX.php index 9b57f345b57e..3666cd6c56e3 100644 --- a/CRM/UF/Page/AJAX.php +++ b/CRM/UF/Page/AJAX.php @@ -41,13 +41,13 @@ class CRM_UF_Page_AJAX { /** * Function the check whether the field belongs * to multi-record custom set - */ + */ function checkIsMultiRecord() { $customId = $_GET['customId']; - + $isMultiple = CRM_Core_BAO_CustomField::isMultiRecordField($customId); $isMultiple = array('is_multi' => $isMultiple); echo json_encode($isMultiple); CRM_Utils_System::civiExit(); - } + } } \ No newline at end of file diff --git a/agpl-3.0.txt b/agpl-3.0.txt index 939a6f41f7cb..1489b7244859 100644 --- a/agpl-3.0.txt +++ b/agpl-3.0.txt @@ -65,7 +65,7 @@ License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - + "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. diff --git a/css/Audit/style.css b/css/Audit/style.css index ab9a2316d2ba..934d0e3b0df2 100644 --- a/css/Audit/style.css +++ b/css/Audit/style.css @@ -1,141 +1,141 @@ -/* Note there will also be a bunch of classes specific to the site for each activity they've configured. The class name is "civicase-audit-" plus the name they've given the activity with any non-alphanumeric characters removed. */ - -#civicase-audit { -} - -#civicase-audit table { - border: 0px; -} - -#civicase-audit td { - margin: 0px; -} - -#civicase-audit td.leftpane { -} - -#civicase-audit table.report{ - width: 100%; - margin-top: -4px; -} - -#civicase-audit tr.selected td a:link, tr.selected td a:visited, tr.selected td a:active { - color: #027AC6; - background-color: #FFFF99; - font-weight: bold; -} - -#civicase-audit .indicator{ - width: 30px; - text-align: center; -} - -#civicase-audit .separator{ - width: 10px; -} - -#civicase-audit td.rightpane { - background-color: #CCE3F1; - border: #333333 solid 1px; - padding: 2%; - width: 60%; -} - -.rightpaneheader { -} - -.rightpanebody { -} - -#civicase-audit label { - font-weight: bold; -} - -.activity { -} - -.auditmenu { - padding-bottom: 20px; -} - -.editlink { - background: #EEEEEE; - border: #333333 solid 1px; - padding: 2px 3px 2px 3px; - font-size: xx-small; - text-transform: uppercase; - width: 30px; -} - -.editlink a { - text-decoration: none; - color: #0000CC; - font-weight: bold; -} - -.editlink a:hover { - color: #CC0000; -} - -.activity a { - text-decoration: none; -} - -.activity a:link, .activity a:visited { -} - -.activityheader { - display: none; - padding-bottom: 20px; - font-size: smaller; -} - -.activityheader span { - display: list-item; - list-style-type: none; - margin-left: 20px; -} - -.auditmenu span { - display: inline; - margin-left: 0px; -} - -.activitybody { - background: #FFFFFF; - padding: 2px; - display: none; -} - -.activitybody span { - display: list-item; - list-style-type: none; - margin-left: 20px; -} - -/* The right pane starts off hidden except for the first activity. */ -#civicase-audit-header-1 { - display: block; -} - -#civicase-audit-body-1 { - display: block; -} - -.String { -} - -.Date { -} - -.File { -} - -.Int { -} - -.Memo { -} - -.Boolean { -} +/* Note there will also be a bunch of classes specific to the site for each activity they've configured. The class name is "civicase-audit-" plus the name they've given the activity with any non-alphanumeric characters removed. */ + +#civicase-audit { +} + +#civicase-audit table { + border: 0px; +} + +#civicase-audit td { + margin: 0px; +} + +#civicase-audit td.leftpane { +} + +#civicase-audit table.report{ + width: 100%; + margin-top: -4px; +} + +#civicase-audit tr.selected td a:link, tr.selected td a:visited, tr.selected td a:active { + color: #027AC6; + background-color: #FFFF99; + font-weight: bold; +} + +#civicase-audit .indicator{ + width: 30px; + text-align: center; +} + +#civicase-audit .separator{ + width: 10px; +} + +#civicase-audit td.rightpane { + background-color: #CCE3F1; + border: #333333 solid 1px; + padding: 2%; + width: 60%; +} + +.rightpaneheader { +} + +.rightpanebody { +} + +#civicase-audit label { + font-weight: bold; +} + +.activity { +} + +.auditmenu { + padding-bottom: 20px; +} + +.editlink { + background: #EEEEEE; + border: #333333 solid 1px; + padding: 2px 3px 2px 3px; + font-size: xx-small; + text-transform: uppercase; + width: 30px; +} + +.editlink a { + text-decoration: none; + color: #0000CC; + font-weight: bold; +} + +.editlink a:hover { + color: #CC0000; +} + +.activity a { + text-decoration: none; +} + +.activity a:link, .activity a:visited { +} + +.activityheader { + display: none; + padding-bottom: 20px; + font-size: smaller; +} + +.activityheader span { + display: list-item; + list-style-type: none; + margin-left: 20px; +} + +.auditmenu span { + display: inline; + margin-left: 0px; +} + +.activitybody { + background: #FFFFFF; + padding: 2px; + display: none; +} + +.activitybody span { + display: list-item; + list-style-type: none; + margin-left: 20px; +} + +/* The right pane starts off hidden except for the first activity. */ +#civicase-audit-header-1 { + display: block; +} + +#civicase-audit-body-1 { + display: block; +} + +.String { +} + +.Date { +} + +.File { +} + +.Int { +} + +.Memo { +} + +.Boolean { +} diff --git a/css/civicrm-new.css b/css/civicrm-new.css index 23d7c7a9b0aa..0ec17a7dff2d 100644 --- a/css/civicrm-new.css +++ b/css/civicrm-new.css @@ -26,7 +26,7 @@ } textarea.huge { - width: 75%; + width: 75%; height: 12em; font-weight: bold; } diff --git a/css/print.css b/css/print.css index 3998319a90b1..f1d4451f83aa 100644 --- a/css/print.css +++ b/css/print.css @@ -14,10 +14,10 @@ table.form-layout td, table.form-layout th { .form-item .element-right{ display: none; } -#crm-container { +#crm-container { overflow: visible !important; font-family : DejaVu Sans, serif; - margin : 0px 10px 0px 10px; + margin : 0px 10px 0px 10px; } /* CSS for Print and PDF of Reports */ @@ -62,7 +62,7 @@ table.form-layout td, table.form-layout th { } #crm-container table.report-layout tr { - font-size : 0.9em; + font-size : 0.9em; } #crm-container table.report-layout tr.group-row { @@ -87,18 +87,18 @@ table.form-layout td, table.form-layout th { } #crm-container table.report-layout th.report-contents { - background-color : #F5F5F5; + background-color : #F5F5F5; } #crm-container table.report-layout th.statistics { width : 5%; white-space : nowrap; - text-align : left; + text-align : left; } #crm-container table.report-layout th.statistics, #crm-container table.report-layout th.label { width : 20%; - text-align : left; + text-align : left; } #crm-container h1 { diff --git a/gpl.txt b/gpl.txt index 2b940a412e1e..7f61d371ba23 100644 --- a/gpl.txt +++ b/gpl.txt @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA @@ -14,7 +14,7 @@ and standards expect shells not to print such messages. This exception applies to any program that serves as a shell and that is based primarily on Bash as opposed to other GNU software. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -64,7 +64,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -263,7 +263,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -285,9 +285,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it diff --git a/install/template.html b/install/template.html index 771e57f74f65..1dac9dbc31be 100644 --- a/install/template.html +++ b/install/template.html @@ -30,14 +30,14 @@

CiviCRM Installer

There are some issues that we recommend you look at before installing, however, you are still able to install the software. Please see below for details.

hasErrors()) { ?> -

You're ready to install!    +

You're ready to install!   

- +

Drupal Database Settings

Other Settings

-

+