<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,21 +4,319 @@
 // Options: 'list' or 'current'
 appconf_set ('show', 'current');
 
+appconf_set ('default_country', 'ca');
+
 appconf_set ('provinces', array (
 	'' =&gt; '- SELECT -',
-	'AB' =&gt; 'Alberta',
-	'BC' =&gt; 'British Columbia',
-	'MB' =&gt; 'Manitoba',
-	'NB' =&gt; 'New Brunswick',
-	'NF' =&gt; 'Newfoundland/Labrador',
-	'NS' =&gt; 'Nova Scotia',
-	'NV' =&gt; 'Nunavut',
-	'NT' =&gt; 'Northwest Territories',
-	'ON' =&gt; 'Ontario',
-	'PE' =&gt; 'Prince Edward Island',
-	'QC' =&gt; 'Quebec',
-	'SK' =&gt; 'Saskatchewan',
-	'YK' =&gt; 'Yukon Territory',
+	'al' =&gt; 'Alabama',
+	'ak' =&gt; 'Alaska',
+	'ab' =&gt; 'Alberta',
+	'az' =&gt; 'Arizona',
+	'ar' =&gt; 'Arkansas',
+	'bc' =&gt; 'British Columbia',
+	'ca' =&gt; 'California',
+	'co' =&gt; 'Colorado',
+	'ct' =&gt; 'Connecticut',
+	'dc' =&gt; 'District of Columbia',
+	'de' =&gt; 'Delaware',
+	'fl' =&gt; 'Florida',
+	'ga' =&gt; 'Georgia',
+	'hi' =&gt; 'Hawaii',
+	'id' =&gt; 'Idaho',
+	'il' =&gt; 'Illinois',
+	'in' =&gt; 'Indiana',
+	'ia' =&gt; 'Iowa',
+	'ks' =&gt; 'Kansas',
+	'ky' =&gt; 'Kentucky',
+	'la' =&gt; 'Louisiana',
+	'me' =&gt; 'Maine',
+	'mb' =&gt; 'Manitoba',
+	'md' =&gt; 'Maryland',
+	'ma' =&gt; 'Massachusetts',
+	'mi' =&gt; 'Michigan',
+	'mn' =&gt; 'Minnesota',
+	'ms' =&gt; 'Mississippi',
+	'mo' =&gt; 'Missouri',
+	'mt' =&gt; 'Montana',
+	'ne' =&gt; 'Nebraska',
+	'nv' =&gt; 'Nevada',
+	'nb' =&gt; 'New Brunswick',
+	'nh' =&gt; 'New Hampshire',
+	'nj' =&gt; 'New Jersey',
+	'nm' =&gt; 'New Mexico',
+	'ny' =&gt; 'New York',
+	'nl' =&gt; 'Newfoundland and Labrador',
+	'nc' =&gt; 'North Carolina',
+	'nd' =&gt; 'North Dakota',
+	'nt' =&gt; 'Northwest Territories',
+	'ns' =&gt; 'Nova Scotia',
+	'nu' =&gt; 'Nunavut',
+	'oh' =&gt; 'Ohio',
+	'ok' =&gt; 'Oklahoma',
+	'on' =&gt; 'Ontario',
+	'or' =&gt; 'Oregon',
+	'pa' =&gt; 'Pennsylvania',
+	'pe' =&gt; 'Prince Edward Island',
+	'qc' =&gt; 'Quebec',
+	'ri' =&gt; 'Rhode Island',
+	'sk' =&gt; 'Saskatchewan',
+	'sc' =&gt; 'South Carolina',
+	'sd' =&gt; 'South Dakota',
+	'tn' =&gt; 'Tennessee',
+	'tx' =&gt; 'Texas',
+	'ut' =&gt; 'Utah',
+	'vt' =&gt; 'Vermont',
+	'va' =&gt; 'Virginia',
+	'wa' =&gt; 'Washington',
+	'wv' =&gt; 'West Virginia',
+	'wi' =&gt; 'Wisconsin',
+	'wy' =&gt; 'Wyoming',
+	'yt' =&gt; 'Yukon',
+	'--' =&gt; 'Other/Not Listed',
+));
+
+appconf_set ('countries', array (
+	'' =&gt; '- SELECT -',
+	'ca' =&gt; 'Canada',
+	'us' =&gt; 'United States',
+	'af' =&gt; 'Afghanistan',
+	'al' =&gt; 'Albania',
+	'dz' =&gt; 'Algeria',
+	'as' =&gt; 'American Samoa',
+	'ad' =&gt; 'Andorra',
+	'ao' =&gt; 'Angola',
+	'ai' =&gt; 'Anguilla',
+	'aq' =&gt; 'Antarctica',
+	'ag' =&gt; 'Antigua and Barbuda',
+	'ar' =&gt; 'Argentina',
+	'am' =&gt; 'Armenia',
+	'aw' =&gt; 'Aruba',
+	'au' =&gt; 'Australia',
+	'at' =&gt; 'Austria',
+	'az' =&gt; 'Azerbaijan',
+	'bs' =&gt; 'Bahamas',
+	'bh' =&gt; 'Bahrain',
+	'bd' =&gt; 'Bangladesh',
+	'bb' =&gt; 'Barbados',
+	'by' =&gt; 'Belarus',
+	'be' =&gt; 'Belgium',
+	'bz' =&gt; 'Belize',
+	'bj' =&gt; 'Benin',
+	'bm' =&gt; 'Bermuda',
+	'bt' =&gt; 'Bhutan',
+	'bo' =&gt; 'Bolivia',
+	'ba' =&gt; 'Bosnia and Herzegovina',
+	'bw' =&gt; 'Botswana',
+	'bv' =&gt; 'Bouvet Island',
+	'br' =&gt; 'Brazil',
+	'io' =&gt; 'British Indian Ocean Territory',
+	'bn' =&gt; 'Brunei Darussalam',
+	'bg' =&gt; 'Bulgaria',
+	'bf' =&gt; 'Burkina Faso',
+	'bi' =&gt; 'Burundi',
+	'kh' =&gt; 'Cambodia',
+	'cm' =&gt; 'Cameroon',
+	'cv' =&gt; 'Cape Verde',
+	'ky' =&gt; 'Cayman Islands',
+	'cf' =&gt; 'Central African Republic',
+	'td' =&gt; 'Chad',
+	'cl' =&gt; 'Chile',
+	'cn' =&gt; 'China',
+	'cx' =&gt; 'Christmas Island',
+	'cc' =&gt; 'Cocos (keeling) Islands',
+	'co' =&gt; 'Colombia',
+	'km' =&gt; 'Comoros',
+	'cg' =&gt; 'Congo',
+	'cd' =&gt; 'Congo, Democratic Republic of the',
+	'ck' =&gt; 'Cook Islands',
+	'cr' =&gt; 'Costa Rica',
+	'ci' =&gt; 'Cote D\'ivoire',
+	'hr' =&gt; 'Croatia',
+	'cu' =&gt; 'Cuba',
+	'cy' =&gt; 'Cyprus',
+	'cz' =&gt; 'Czech Republic',
+	'dk' =&gt; 'Denmark',
+	'dj' =&gt; 'Djibouti',
+	'dm' =&gt; 'Dominica',
+	'do' =&gt; 'Dominican Republic',
+	'ec' =&gt; 'Ecuador',
+	'eg' =&gt; 'Egypt',
+	'sv' =&gt; 'El Salvador',
+	'gq' =&gt; 'Equatorial Guinea',
+	'er' =&gt; 'Eritrea',
+	'ee' =&gt; 'Estonia',
+	'et' =&gt; 'Ethiopia',
+	'fk' =&gt; 'Falkland Islands (malvinas)',
+	'fo' =&gt; 'Faroe Islands',
+	'fj' =&gt; 'Fiji',
+	'fi' =&gt; 'Finland',
+	'fr' =&gt; 'France',
+	'gf' =&gt; 'French Guiana',
+	'pf' =&gt; 'French Polynesia',
+	'tf' =&gt; 'French Southern Territories',
+	'ga' =&gt; 'Gabon',
+	'gm' =&gt; 'Gambia',
+	'ge' =&gt; 'Georgia',
+	'de' =&gt; 'Germany',
+	'gh' =&gt; 'Ghana',
+	'gi' =&gt; 'Gibraltar',
+	'gr' =&gt; 'Greece',
+	'gl' =&gt; 'Greenland',
+	'gd' =&gt; 'Grenada',
+	'gp' =&gt; 'Guadeloupe',
+	'gu' =&gt; 'Guam',
+	'gt' =&gt; 'Guatemala',
+	'gn' =&gt; 'Guinea',
+	'gw' =&gt; 'Guinea-bissau',
+	'gy' =&gt; 'Guyana',
+	'ht' =&gt; 'Haiti',
+	'hm' =&gt; 'Heard Island and Mcdonald Islands',
+	'va' =&gt; 'Holy See (Vatican City State)',
+	'hn' =&gt; 'Honduras',
+	'hk' =&gt; 'Hong Kong',
+	'hu' =&gt; 'Hungary',
+	'is' =&gt; 'Iceland',
+	'in' =&gt; 'India',
+	'id' =&gt; 'Indonesia',
+	'ir' =&gt; 'Iran, Islamic Republic of',
+	'iq' =&gt; 'Iraq',
+	'ie' =&gt; 'Ireland',
+	'il' =&gt; 'Israel',
+	'it' =&gt; 'Italy',
+	'jm' =&gt; 'Jamaica',
+	'jp' =&gt; 'Japan',
+	'jo' =&gt; 'Jordan',
+	'kz' =&gt; 'Kazakhstan',
+	'ke' =&gt; 'Kenya',
+	'ki' =&gt; 'Kiribati',
+	'kp' =&gt; 'Korea, Democratic People\'s Republic of',
+	'kr' =&gt; 'Korea, Republic of',
+	'kw' =&gt; 'Kuwait',
+	'kg' =&gt; 'Kyrgyzstan',
+	'la' =&gt; 'Lao People\'s Democratic Republic',
+	'lv' =&gt; 'Latvia',
+	'lb' =&gt; 'Lebanon',
+	'ls' =&gt; 'Lesotho',
+	'lr' =&gt; 'Liberia',
+	'ly' =&gt; 'Libyan Arab Jamahiriya',
+	'li' =&gt; 'Liechtenstein',
+	'lt' =&gt; 'Lithuania',
+	'lu' =&gt; 'Luxembourg',
+	'mo' =&gt; 'Macao',
+	'mk' =&gt; 'Macedonia, Former Yugoslav Republic of',
+	'mg' =&gt; 'Madagascar',
+	'mw' =&gt; 'Malawi',
+	'my' =&gt; 'Malaysia',
+	'mv' =&gt; 'Maldives',
+	'ml' =&gt; 'Mali',
+	'mt' =&gt; 'Malta',
+	'mh' =&gt; 'Marshall Islands',
+	'mq' =&gt; 'Martinique',
+	'mr' =&gt; 'Mauritania',
+	'mu' =&gt; 'Mauritius',
+	'yt' =&gt; 'Mayotte',
+	'mx' =&gt; 'Mexico',
+	'fm' =&gt; 'Micronesia, Federated States of',
+	'md' =&gt; 'Moldova, Republic of',
+	'mc' =&gt; 'Monaco',
+	'mn' =&gt; 'Mongolia',
+	'ms' =&gt; 'Montserrat',
+	'ma' =&gt; 'Morocco',
+	'mz' =&gt; 'Mozambique',
+	'mm' =&gt; 'Myanmar',
+	'na' =&gt; 'Namibia',
+	'nr' =&gt; 'Nauru',
+	'np' =&gt; 'Nepal',
+	'nl' =&gt; 'Netherlands',
+	'an' =&gt; 'Netherlands Antilles',
+	'nc' =&gt; 'New Caledonia',
+	'nz' =&gt; 'New Zealand',
+	'ni' =&gt; 'Nicaragua',
+	'ne' =&gt; 'Niger',
+	'ng' =&gt; 'Nigeria',
+	'nu' =&gt; 'Niue',
+	'nf' =&gt; 'Norfolk Island',
+	'mp' =&gt; 'Northern Mariana Islands',
+	'no' =&gt; 'Norway',
+	'om' =&gt; 'Oman',
+	'pk' =&gt; 'Pakistan',
+	'pw' =&gt; 'Palau',
+	'ps' =&gt; 'Palestinian Territory, Occupied',
+	'pa' =&gt; 'Panama',
+	'pg' =&gt; 'Papua New Guinea',
+	'py' =&gt; 'Paraguay',
+	'pe' =&gt; 'Peru',
+	'ph' =&gt; 'Philippines',
+	'pn' =&gt; 'Pitcairn',
+	'pl' =&gt; 'Poland',
+	'pt' =&gt; 'Portugal',
+	'pr' =&gt; 'Puerto Rico',
+	'qa' =&gt; 'Qatar',
+	're' =&gt; 'Reunion',
+	'ro' =&gt; 'Romania',
+	'ru' =&gt; 'Russia',
+	'rw' =&gt; 'Rwanda',
+	'sh' =&gt; 'Saint Helena',
+	'kn' =&gt; 'Saint Kitts and Nevis',
+	'lc' =&gt; 'Saint Lucia',
+	'pm' =&gt; 'Saint Pierre and Miquelon',
+	'vc' =&gt; 'Saint Vincent and the Grenadines',
+	'ws' =&gt; 'Samoa',
+	'sm' =&gt; 'San Marino',
+	'st' =&gt; 'Sao Tome and Principe',
+	'sa' =&gt; 'Saudi Arabia',
+	'sn' =&gt; 'Senegal',
+	'cs' =&gt; 'Serbia and Montenegro',
+	'sc' =&gt; 'Seychelles',
+	'sl' =&gt; 'Sierra Leone',
+	'sg' =&gt; 'Singapore',
+	'sk' =&gt; 'Slovakia',
+	'si' =&gt; 'Slovenia',
+	'sb' =&gt; 'Solomon Islands',
+	'so' =&gt; 'Somalia',
+	'za' =&gt; 'South Africa',
+	'gs' =&gt; 'South Georgia &amp; the South Sandwich Islands',
+	'es' =&gt; 'Spain',
+	'lk' =&gt; 'Sri Lanka',
+	'sd' =&gt; 'Sudan',
+	'sr' =&gt; 'Suriname',
+	'sj' =&gt; 'Svalbard and Jan Mayen',
+	'sz' =&gt; 'Swaziland',
+	'se' =&gt; 'Sweden',
+	'ch' =&gt; 'Switzerland',
+	'sy' =&gt; 'Syrian Arab Republic',
+	'tw' =&gt; 'Taiwan',
+	'tj' =&gt; 'Tajikistan',
+	'tz' =&gt; 'Tanzania, United Republic of',
+	'th' =&gt; 'Thailand',
+	'tl' =&gt; 'Timor-leste',
+	'tg' =&gt; 'Togo',
+	'tk' =&gt; 'Tokelau',
+	'to' =&gt; 'Tonga',
+	'tt' =&gt; 'Trinidad and Tobago',
+	'tn' =&gt; 'Tunisia',
+	'tr' =&gt; 'Turkey',
+	'tm' =&gt; 'Turkmenistan',
+	'tc' =&gt; 'Turks and Caicos Islands',
+	'tv' =&gt; 'Tuvalu',
+	'ug' =&gt; 'Uganda',
+	'ua' =&gt; 'Ukraine',
+	'ae' =&gt; 'United Arab Emirates',
+	'gb' =&gt; 'United Kingdom',
+	'um' =&gt; 'United States Minor Outlying Islands',
+	'uy' =&gt; 'Uruguay',
+	'uz' =&gt; 'Uzbekistan',
+	'vu' =&gt; 'Vanuatu',
+	've' =&gt; 'Venezuela',
+	'vn' =&gt; 'Vietnam',
+	'vg' =&gt; 'Virgin Islands, British',
+	'vi' =&gt; 'Virgin Islands, U.S.',
+	'wf' =&gt; 'Wallis and Futuna',
+	'eh' =&gt; 'Western Sahara',
+	'ye' =&gt; 'Yemen',
+	'zm' =&gt; 'Zambia',
+	'zw' =&gt; 'Zimbabwe',
+	'--' =&gt; 'Other/Not Listed',
 ));
 
 loader_import ('petition.Objects');</diff>
      <filename>inc/app/petition/conf/properties.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ class PetitionSignForm extends MailForm {
 	}
 	function onSubmit ($vals) {
 		db_execute (
-			'insert into petition_signature values (null, ?, ?, ?, ?, ?, ?, ?, ?, now())',
+			'insert into petition_signature values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, now())',
 			$vals['id'],
 			$vals['firstname'],
 			$vals['lastname'],
@@ -18,6 +18,7 @@ class PetitionSignForm extends MailForm {
 			$vals['address'],
 			$vals['city'],
 			$vals['province'],
+			$vals['country'],
 			$vals['postal_code']
 		);
 </diff>
      <filename>inc/app/petition/forms/sign/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 method = post
 error_mode = all
+message = * Required fields.
 
 [id]
 
@@ -10,19 +11,19 @@ type = hidden
 [firstname]
 
 type = text
-alt = First Name
+alt = First Name*
 rule 1 = not empty, You must enter your first name.
 
 [lastname]
 
 type = text
-alt = Last Name
+alt = Last Name*
 rule 1 = not empty, You must enter your last name.
 
 [email]
 
 type = text
-alt = Email Address
+alt = Email Address*
 ;rule 1 = not empty, You must enter your email address.
 ;rule 2 = email, Your email address does not appear to be valid.
 ;rule 3 = &quot;unique `petition_signature/email`, You may only sign once. We found your email address already in the signature list.&quot;
@@ -35,20 +36,28 @@ alt = Mailing Address
 [city]
 
 type = text
-alt = City or Town
+alt = City or Town*
 rule 1 = not empty, You must enter your city or town.
 
 [province]
 
 type = select
-alt = Province/Territory
+alt = Province/Territory*
 setValues = &quot;eval: appconf ('provinces')&quot;
 rule 1 = not empty, You must select your province or territory.
 
+[country]
+
+type = select
+alt = Country*
+setValues = &quot;eval: appconf ('countries')&quot;
+setDefault = &quot;eval: appconf ('default_country')&quot;
+rule 1 = not empty, You must select your country.
+
 [postal_code]
 
 type = text
-alt = Postal Code
+alt = Zip/Postal Code
 
 [secure]
 </diff>
      <filename>inc/app/petition/forms/sign/settings.php</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
 {loop obj[list]}
 	&lt;tr class=&quot;{alt/next}&quot;&gt;
 		&lt;td&gt;{loop/num}. {loop/firstname} {loop/lastname}&lt;/td&gt;
-		&lt;td&gt;{loop/city}, {filter petition_filter_province}{loop/province}{end filter}&lt;/td&gt;
+		&lt;td&gt;{loop/city}{if loop.province ne '--' and loop.province ne ''}, {filter petition_filter_province}{loop/province}{end filter}{end if}{if loop.country ne '--' and loop.country ne ''}, {filter petition_filter_country}{loop/country}{end filter}{end if}&lt;/td&gt;
 	&lt;/tr&gt;
 {end loop}
 &lt;/table&gt;</diff>
      <filename>inc/app/petition/html/signatures.spt</filename>
    </modified>
    <modified>
      <diff>@@ -19,8 +19,9 @@ create table petition_signature (
 	email char(72) not null,
 	address char(72) not null,
 	city char(48) not null,
-	province char(48) not null,
-	postal_code char(8) not null,
+	province char(2) not null,
+	country char(2) not null,
+	postal_code char(10) not null,
 	ts datetime not null,
 	index (petition_id, ts)
 );</diff>
      <filename>inc/app/petition/install/install-mysql.sql</filename>
    </modified>
    <modified>
      <diff>@@ -9,4 +9,9 @@ function petition_filter_province ($prov) {
 	return $list[$prov];
 }
 
+function petition_filter_country ($c) {
+	$list = appconf ('countries');
+	return $list[$c];
+}
+
 ?&gt;
\ No newline at end of file</diff>
      <filename>inc/app/petition/lib/Filters.php</filename>
    </modified>
    <modified>
      <diff>@@ -940,8 +940,9 @@ create table petition_signature (
 	email char(72) not null,
 	address char(72) not null,
 	city char(48) not null,
-	province char(48) not null,
-	postal_code char(8) not null,
+	province char(2) not null,
+	country char(2) not null,
+	postal_code char(10) not null,
 	ts datetime not null,
 	index (petition_id, ts)
 );</diff>
      <filename>install/install-mysql.sql</filename>
    </modified>
    <modified>
      <diff>@@ -940,8 +940,9 @@ create table petition_signature (
 	email char(72) not null,
 	address char(72) not null,
 	city char(48) not null,
-	province char(48) not null,
-	postal_code char(8) not null,
+	province char(2) not null,
+	country char(2) not null,
+	postal_code char(10) not null,
 	ts datetime not null,
 	index (petition_id, ts)
 );</diff>
      <filename>install/install-old.sql</filename>
    </modified>
    <modified>
      <diff>@@ -85,3 +85,7 @@ create table myadm_report_results (
 	results mediumtext not null,
 	index (report_id, run)
 );
+
+alter table petition_signature change column province province char(2) not null;
+alter table petition_signature add column country char(2) not null after province;
+alter table petition_signature change column postal_code postal_code char(10) not null;
\ No newline at end of file</diff>
      <filename>upgrade/5.0.1-5.0.2.sql</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2f49ecb8fa2fd2e3d9df37b7bfeddc479c13cdfd</id>
    </parent>
  </parents>
  <author>
    <name>John Luxford</name>
    <email>lux@www.dojolearning.lo</email>
  </author>
  <url>http://github.com/lux/sitellite/commit/5f49fb7b96d73bdaa29d998856ac25d9d4fc5d29</url>
  <id>5f49fb7b96d73bdaa29d998856ac25d9d4fc5d29</id>
  <committed-date>2009-04-09T01:37:08-07:00</committed-date>
  <authored-date>2009-04-09T01:37:08-07:00</authored-date>
  <message>Added countries to petition app.</message>
  <tree>ef0ba2c79af69e3d4fb370eb6c228d60153c03c7</tree>
  <committer>
    <name>John Luxford</name>
    <email>lux@www.dojolearning.lo</email>
  </committer>
</commit>
