Merge pull request #4866 from totten/master-phpcs
authorTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 23:32:20 +0000 (15:32 -0800)
committerTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 23:32:20 +0000 (15:32 -0800)
INFRA-132 - Cleanup misc patterns not handled by phpcbf

14 files changed:
CRM/Upgrade/Incremental/sql/4.6.alpha1.mysql.tpl
CRM/Upgrade/Incremental/sql/4.6.alpha2.mysql.tpl [new file with mode: 0644]
distmaker/distmaker.conf.dist
distmaker/distmaker.sh
distmaker/dists/common.sh
distmaker/dists/drupal6_php5.sh
distmaker/dists/drupal_php5.sh
distmaker/dists/drupal_sk_php5.sh
distmaker/dists/joomla_php5.sh
distmaker/dists/wordpress_php5.sh
sql/civicrm_generated.mysql
templates/CRM/Admin/Form/Setting/Smtp.tpl
xml/templates/civicrm_state_province.tpl
xml/version.xml

index a02419c48940863b97785f219b34704bcd05b604..f7b6b40cb91d15677b5cbe9f6a48bdf493c6922a 100755 (executable)
@@ -62,9 +62,9 @@ SELECT @option_group_id_udOpt_wt  := MAX(weight) FROM civicrm_option_value WHERE
 SELECT @option_group_id_udOpt_val := MAX(CAST( `value` AS UNSIGNED )) FROM civicrm_option_value WHERE option_group_id = @option_group_id_udOpt;
 
 INSERT INTO
-   `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
+   `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
 VALUES
-   (@option_group_id_udOpt, {localize}'{ts escape="sql"}Invoices / Credit Notes{/ts}'{/localize}, @option_group_id_udOpt_val+1, 'Invoices / Credit Notes', NULL, 0, NULL, @option_group_id_udOpt_wt+1, NULL, 0, 0, 1, NULL, NULL);
+   (@option_group_id_udOpt, {localize}'{ts escape="sql"}Invoices / Credit Notes{/ts}'{/localize}, @option_group_id_udOpt_val+1, 'Invoices / Credit Notes', NULL, 0, NULL, @option_group_id_udOpt_wt+1, 0, 0, 1, NULL, NULL);
 
 -- Add new column creditnote_id in contribution table
 ALTER TABLE `civicrm_contribution` ADD `creditnote_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'unique credit note id, system generated or passed in';
diff --git a/CRM/Upgrade/Incremental/sql/4.6.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.alpha2.mysql.tpl
new file mode 100644 (file)
index 0000000..b39393b
--- /dev/null
@@ -0,0 +1 @@
+{* file to handle db changes in 4.6.alpha2 during upgrade *}
index 738812ae14dbc8254e8cd727d20e34284c2dd2d9..f631f20bfdf999f0df86150ec8cf6ea9a39a8abc 100644 (file)
@@ -4,10 +4,13 @@ DM_GENFILESDIR= <Set this to directory where generated files should reside>
 DM_TMPDIR= <Set this to temporary directory>
 DM_TARGETDIR= <Set this to directory where tarballs should land>
 
-DM_NPM= <Set this to your npm binary>
-DM_PHP= <Set this to your php binary>
-DM_RSYNC= <set this to your rsync binary>
-DM_ZIP= <set this to your zip binary>
+## Optional
+# DM_PHP= <Set this to your php binary> [default: php]
+# DM_RSYNC= <set this to your rsync binary> [default: rsync]
+# DM_ZIP= <set this to your zip binary> [default: zip]
+# DM_NPM= <Set this to your npm binary> [default: npm]
+# DM_NODE= <Set this to your node binary> [default: node]
+# DM_COMPOSER= <Set this to your composer binary> [default: composer]
 
 DM_VERSION= <Set this to whatever the version number should be>
 
index b3967adc451ffc881521837864ec304bd81adbca..179c54aacd731e30ddccff9ce6c87b842fd383dc 100755 (executable)
@@ -156,9 +156,6 @@ case $1 in
 
 esac
 
-## Install npm packages
-dm_npm_install "$DM_SOURCEDIR"
-
 ## Make sure we have the right branch or tag
 dm_git_checkout "$DM_SOURCEDIR" "$DM_REF_CORE"
 dm_git_checkout "$DM_SOURCEDIR/packages" "$DM_REF_PACKAGES"
@@ -168,11 +165,12 @@ dm_git_checkout "$DM_SOURCEDIR/drupal" "$DM_REF_DRUPAL"
 
 ## Get latest dependencies
 dm_generate_vendor "$DM_SOURCEDIR"
+dm_generate_bower "$DM_SOURCEDIR"
 
 # Before anything - regenerate DAOs
 
 cd $DM_SOURCEDIR/xml
-$DM_PHP GenCode.php schema/Schema.xml $DM_VERSION
+${DM_PHP:-php} GenCode.php schema/Schema.xml $DM_VERSION
 
 cd $ORIGPWD
 
index b6bfc6c1865dd27201456692b45899bb37e266a0..8b7211654f2e12761fbabaeef8feacac456e4b4c 100644 (file)
@@ -19,7 +19,7 @@ function dm_install_dir() {
   if [ ! -d "$to" ]; then
     mkdir -p "$to"
   fi
-  $DM_RSYNC -avC --exclude=.git --exclude=.svn "$from/./"  "$to/./"
+  ${DM_RSYNC:-rsync} -avC --exclude=.git --exclude=.svn "$from/./"  "$to/./"
 }
 
 ## Copy listed files
@@ -45,17 +45,32 @@ function dm_remove_files() {
   done
 }
 
+## Copy all bower dependencies
+function dm_install_bower() {
+  local repo="$1"
+  local to="$2"
+
+  local excludes_rsync=""
+  for exclude in .git .svn {T,t}est{,s} {D,d}oc{,s} {E,e}xample{,s} ; do
+    excludes_rsync="--exclude=${exclude} ${excludes_rsync}"
+  done
+
+  [ ! -d "$to" ] && mkdir "$to"
+  ${DM_RSYNC:-rsync} -avC $excludes_rsync "$repo/./" "$to/./"
+}
+
 ## Copy all core files
 ## usage: dm_install_core <core_repo_path> <to_path>
 function dm_install_core() {
   local repo="$1"
   local to="$2"
 
-  for dir in css i js PEAR templates bin CRM api extern Reports install settings Civi partials node_modules bower_components ; do
+  for dir in css i js PEAR templates bin CRM api extern Reports install settings Civi partials ; do
     [ -d "$repo/$dir" ] && dm_install_dir "$repo/$dir" "$to/$dir"
   done
 
   dm_install_files "$repo" "$to" {agpl-3.0,agpl-3.0.exception,gpl,README,CONTRIBUTORS}.txt
+  dm_install_files "$repo" "$to" composer.json composer.lock bower.json package.json
 
   mkdir -p "$to/sql"
   pushd "$repo" >> /dev/null
@@ -91,7 +106,7 @@ function dm_install_packages() {
   ##   packages/Files packages/PHP packages/Text
 
   [ ! -d "$to" ] && mkdir "$to"
-  $DM_RSYNC -avC $excludes_rsync --include=core "$repo/./" "$to/./"
+  ${DM_RSYNC:-rsync} -avC $excludes_rsync --include=core "$repo/./" "$to/./"
 }
 
 ## Copy Drupal-integration module
@@ -146,13 +161,8 @@ function dm_install_vendor() {
     excludes_rsync="--exclude=${exclude} ${excludes_rsync}"
   done
 
-  ## Note: These small folders have items that previously were not published,
-  ## but there's no real cost to including them, and excluding them seems
-  ## likely to cause confusion as the codebase evolves:
-  ##   packages/Files packages/PHP packages/Text
-
   [ ! -d "$to" ] && mkdir "$to"
-  $DM_RSYNC -avC $excludes_rsync --include=core "$repo/./" "$to/./"
+  ${DM_RSYNC:-rsync} -avC $excludes_rsync "$repo/./" "$to/./"
 }
 
 ##  usage: dm_install_wordpress <wp_repo_path> <to_path>
@@ -163,7 +173,7 @@ function dm_install_wordpress() {
   if [ ! -d "$to" ]; then
     mkdir -p "$to"
   fi
-  $DM_RSYNC -avC \
+  ${DM_RSYNC:-rsync} -avC \
     --exclude=.git \
     --exclude=.svn \
     --exclude=civicrm.config.php.wordpress \
@@ -173,12 +183,23 @@ function dm_install_wordpress() {
   ## Need --exclude=civicrm for self-building on WP site
 }
 
+
+## Generate the "bower_components" folder.
+## usage: dm_generate_bower <repo_path>
+function dm_generate_bower() {
+  local repo="$1"
+  pushd "$repo"
+    ${DM_NPM:-npm} install
+    ${DM_NODE:-node} node_modules/bower/bin/bower install
+  popd
+}
+
 ## Generate the composer "vendor" folder
 ## usage: dm_generate_vendor <repo_path>
 function dm_generate_vendor() {
   local repo="$1"
   pushd "$repo"
-    composer install
+    ${DM_COMPOSER:-composer} install
   popd
 }
 
@@ -206,11 +227,3 @@ function dm_git_checkout() {
     git checkout "$2"
   popd
 }
-
-## Install npm packages
-## usage: dm_npm_install <path>
-function dm_npm_install() {
-  pushd "$1"
-    $DM_NPM install
-  popd
-}
index c6083d846d1cb4ce956b9166e72b6b8c9591d94e..1a7c7c579013336099f87b6d238184580388121f 100755 (executable)
@@ -21,6 +21,7 @@ dm_generate_version "$TRG/civicrm-version.php" Drupal6
 dm_install_core "$SRC" "$TRG"
 dm_install_packages "$SRC/packages" "$TRG/packages"
 dm_install_vendor "$SRC/vendor" "$TRG/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/bower_components"
 dm_install_drupal "$SRC/drupal" "$TRG/drupal"
 
 # gen tarball
index dd421936eac31dfaf89681712b5107b533294aa6..a090e31fd70b593d358728fb5c70f378f111a35f 100755 (executable)
@@ -21,6 +21,7 @@ dm_generate_version "$TRG/civicrm-version.php" Drupal
 dm_install_core "$SRC" "$TRG"
 dm_install_packages "$SRC/packages" "$TRG/packages"
 dm_install_vendor "$SRC/vendor" "$TRG/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/bower_components"
 dm_install_drupal "$SRC/drupal" "$TRG/drupal"
 
 # gen tarball
index c35d07b7e8dddacce5adf1ebe66f1d7bf4501f13..6c55a71335682620fd2e9903dd876b86ef89b1e0 100755 (executable)
@@ -21,6 +21,7 @@ dm_generate_version "$TRG/civicrm-version.php" Drupal
 dm_install_core "$SRC" "$TRG"
 dm_install_packages "$SRC/packages" "$TRG/packages"
 dm_install_vendor "$SRC/vendor" "$TRG/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/bower_components"
 dm_install_drupal "$SRC/drupal" "$TRG/drupal"
 
 # delete packages that distributions on Drupal.org repalce if present
index 08ab281fdc9cf2b038340c762cb2cdd554e694a8..edbe8f6e6628372ed48795df5a4973ff32f2ffe6 100755 (executable)
@@ -21,6 +21,7 @@ dm_generate_version "$TRG/civicrm-version.php" Joomla
 dm_install_core "$SRC" "$TRG"
 dm_install_packages "$SRC/packages" "$TRG/packages"
 dm_install_vendor "$SRC/vendor" "$TRG/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/bower_components"
 
 ## WTF: It's so good we'll install it twice!
 ## (The first is probably extraneous, but there could be bugs dependent on it.)
@@ -35,14 +36,14 @@ cd $DM_TMPDIR;
 
 # generate alt version of package
 cp -r -p civicrm com_civicrm/admin/civicrm
-$DM_PHP $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt
-$DM_ZIP -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm
+${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt
+${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm
 rm -rf com_civicrm/admin/civicrm
 
 # generate zip version of civicrm.xml
-$DM_PHP $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION zip
-$DM_ZIP -q -r -9 com_civicrm/admin/civicrm.zip civicrm
-$DM_ZIP -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla.zip com_civicrm -x 'com_civicrm/admin/civicrm'
+${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION zip
+${DM_ZIP:-zip} -q -r -9 com_civicrm/admin/civicrm.zip civicrm
+${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla.zip com_civicrm -x 'com_civicrm/admin/civicrm'
 
 # clean up
 rm -rf com_civicrm
index 1982e6a4f3d039b69b6de4291cd258d09ecdb2d8..e115fc35fcd866e61c6c763f37c5e8e9c67973c7 100644 (file)
@@ -21,11 +21,12 @@ dm_generate_version "$TRG/civicrm/civicrm/civicrm-version.php" Wordpress
 dm_install_core "$SRC" "$TRG/civicrm/civicrm"
 dm_install_packages "$SRC/packages" "$TRG/civicrm/civicrm/packages"
 dm_install_vendor "$SRC/vendor" "$TRG/civicrm/civicrm/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/civicrm/civicrm/bower_components"
 dm_install_wordpress "$SRC/WordPress" "$TRG/civicrm"
 
 # gen tarball
 cd $TRG
-$DM_ZIP -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-wordpress.zip *
+${DM_ZIP:-zip} -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-wordpress.zip *
 
 # clean up
 rm -rf $TRG
index e296a0f1d5300d7f5ae975337206e629556a957b..f101e5514a06b0abcb2c7b091ee3ed0198013189 100644 (file)
@@ -391,7 +391,7 @@ UNLOCK TABLES;
 
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
-INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'4.6.alpha1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'4.6.alpha2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
index 7b6402bb5288b2ba8459223586796a98956862b6..474311e789a43bda9e89ab9b00bdeea580f93379 100644 (file)
                     <tr class="crm-smtp-form-block-smtpServer">
                        <td class="label">{$form.smtpServer.label}</td>
                        <td>{$form.smtpServer.html}<br  />
-                            <span class="description">{ts}Enter the SMTP server (machine) name. EXAMPLE: smtp.example.com{/ts}</span>
+                            <span class="description">{ts}Enter the SMTP server (machine) name, such as "smtp.example.com".  If the server uses SSL, add "ssl://" to the beginning of the server name, such as "ssl://smtp.example.com".{/ts}</span>
                        </td>
                     </tr>
                     <tr class="crm-smtp-form-block-smtpPort">
                        <td class="label">{$form.smtpPort.label}</td>
                        <td>{$form.smtpPort.html}<br />
-                           <span class="description">{ts}The standard SMTP port is 25. You should only change that value if your SMTP server is running on a non-standard port.{/ts}</span>
+                           <span class="description">{ts}The most common SMTP port possibilities are 25, 465, and 587.  Check with your mail provider for the appropriate one.{/ts}</span>
                        </td>
                     </tr>
                     <tr class="crm-smtp-form-block-smtpAuth">
index 39beca3c08644ea85f85d904aa3354d1c290a6ad..50e38b59784aa90fb5413b1e11f6cd813a27573f 100644 (file)
@@ -1538,17 +1538,17 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
 (3053, 1099, "TB", "Tatabánya"),
 (3054, 1099, "ZE", "Zalaegerszeg"),
 (3055, 1102, "BA", "Bali"),
-(3056, 1102, "BB", "Kepulauan Bangka Belitung"), -- changed from "Bangka Belitung"
+(3056, 1102, "BB", "Kepulauan Bangka Belitung"),
 (3057, 1102, "BT", "Banten"),
 (3058, 1102, "BE", "Bengkulu"),
 (3059, 1102, "GO", "Gorontalo"),
-(3060, 1102, "PB", "Papua Barat"), -- changed from "IJ" and "Irian Jaya"
+(3060, 1102, "PB", "Papua Barat"),
 (3061, 1102, "JA", "Jambi"),
 (3062, 1102, "JB", "Jawa Barat"),
 (3063, 1102, "JT", "Jawa Tengah"),
 (3064, 1102, "JI", "Jawa Timur"),
 (3065, 1102, "KB", "Kalimantan Barat"),
-(3066, 1102, "KI", "Kalimantan Timur"), -- updated abbreviation
+(3066, 1102, "KI", "Kalimantan Timur"),
 (3067, 1102, "KS", "Kalimantan Selatan"),
 (3068, 1102, "KR", "Kepulauan Riau"),
 (3069, 1102, "LA", "Lampung"),
@@ -1565,9 +1565,9 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
 (3080, 1102, "SB", "Sumatra Barat"),
 (3081, 1102, "SS", "Sumatra Selatan"),
 (3082, 1102, "SU", "Sumatera Utara"),
-(3083, 1102, "JK", "DKI Jakarta"), -- changed from "Jakarta Raya" 
+(3083, 1102, "JK", "DKI Jakarta"),
 (3084, 1102, "AC", "Aceh"),
-(3085, 1102, "YO", "DI Yogyakarta"), -- changed from "Yogyakarta"
+(3085, 1102, "YO", "DI Yogyakarta"),
 (3086, 1105, "C", "Cork"),
 (3087, 1105, "CE", "Clare"),
 (3088, 1105, "CN", "Cavan"),
@@ -3670,9 +3670,9 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
 (5215, 1165, "_O", "Khan Yunis"),
 (5216, 1165, "_P", "Rafah"),
 
-(5217, 1020, "BRU", "Brussels"), -- missing Belgian province (CRM-3609)
+(5217, 1020, "BRU", "Brussels"),
 
-(5218, 1140, "DIF", "Distrito Federal"), -- missing Mexican province (CRM-4534)
+(5218, 1140, "DIF", "Distrito Federal"),
 (5219, 1208, "TXG", "Taichung City"),
 (5220, 1208, "KHH", "Kaohsiung City"),
 (5221, 1208, "TPE", "Taipei City"),
@@ -3914,6 +3914,6 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
 (NULL, 1169, "AMA", "Amazonas"),
 
 -- Add missing Indonesian provinces (Kalimantan Tengah, Sulawesi Barat, Kalimantan Utara) and revised outdated names in code above
-(NULL, 1102, "KT", "Kalimantan Tengah"), -- added, updated abbreviation
-(NULL, 1102, "SR", "Sulawesi Barat"), -- added, updated abbreviation
-(NULL, 1102, "KU", "Kalimantan Utara"); -- added
\ No newline at end of file
+(NULL, 1102, "KT", "Kalimantan Tengah"),
+(NULL, 1102, "SR", "Sulawesi Barat"),
+(NULL, 1102, "KU", "Kalimantan Utara");
\ No newline at end of file
index 7135d5bacb19cb3fc70d185a14c25f6ddcf464c7..f79c84c590470dcf1e984642b8d11e9e48a0c7aa 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>4.6.alpha1</version_no>
+  <version_no>4.6.alpha2</version_no>
 </version>