From 1e67383de06ad4de6d678b7c7a0d709e76c782a0 Mon Sep 17 00:00:00 2001 From: Xavier Dutoit Date: Fri, 1 Mar 2013 10:26:42 +0100 Subject: [PATCH 1/2] switch from svn to git --- README.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 168c56d1e3d7..9c529c464119 100644 --- a/README.txt +++ b/README.txt @@ -61,5 +61,12 @@ Developers are highly encouraged to join the CiviCRM forums and post questions and ideas on the Developer Discussion board: http://forum.civicrm.org/index.php/board,20.0.html -You can check out the CiviCRM source from -http://svn.civicrm.org/ +You can check out the CiviCRM source from https://github.com/civicrm/civicrm-core + +Quick install Drupal7 located in {your drupal root}: +$cd /tmp +$wget https://github.com/civicrm/civicrm-core/raw/master/bin/gitify +$gitify Drupal git://github.com/civicrm {your drupal root}/sites/all/modules/civicrm --l10n + +longer version: +http://wiki.civicrm.org/confluence/display/CRMDOC42/GitHub+for+CiviCRM From f198bd7888ee4d456d88ebac3ba931ed49ee3bff Mon Sep 17 00:00:00 2001 From: Xavier Dutoit Date: Fri, 1 Mar 2013 12:51:56 +0100 Subject: [PATCH 2/2] CRM-11926 add a better error handling for db errors in the api --- api/api.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/api.php b/api/api.php index c61a95585781..16b3e3039139 100644 --- a/api/api.php +++ b/api/api.php @@ -107,8 +107,12 @@ function civicrm_api($entity, $action, $params, $extra = NULL) { if (CRM_Utils_Array::value('format.is_success', $apiRequest['params']) == 1) { return 0; } + $error = $e->getCause(); + if ($error instanceof DB_Error) { + $data["error_code"] = DB::errorMessage($error->getCode()); + $data["sql"] = $error->getDebugInfo(); + } if (CRM_Utils_Array::value('debug', $apiRequest['params'])) { - $error = $e->getCause(); $data['debug_info'] = $error->getUserInfo(); $data['trace'] = $e->getTraceAsString(); }