Merge branch '4.4' of https://github.com/civicrm/civicrm-core
authorColeman Watts <coleman@civicrm.org>
Sat, 4 Jan 2014 00:05:34 +0000 (16:05 -0800)
committerColeman Watts <coleman@civicrm.org>
Sat, 4 Jan 2014 00:05:34 +0000 (16:05 -0800)
Conflicts:
CRM/Core/BAO/Navigation.php
xml/schema/Mailing/Event/Bounce.xml

26 files changed:
1  2 
CRM/Activity/BAO/Activity.php
CRM/Contact/BAO/Group.php
CRM/Contact/BAO/Query.php
CRM/Core/BAO/ActionSchedule.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/Navigation.php
CRM/Core/DAO.php
CRM/Event/BAO/Event.php
CRM/Export/BAO/Export.php
CRM/Mailing/BAO/Mailing.php
templates/CRM/Contact/Page/View/Summary.tpl
templates/CRM/Contribute/Form/ContributionPage/Amount.tpl
tests/phpunit/api/v3/CaseTest.php
tests/phpunit/api/v3/ContributionSoftTest.php
xml/schema/Activity/Activity.xml
xml/schema/Campaign/CampaignGroup.xml
xml/schema/Campaign/Survey.xml
xml/schema/Contribute/Contribution.xml
xml/schema/Contribute/ContributionPage.xml
xml/schema/Contribute/ContributionRecur.xml
xml/schema/Event/Event.xml
xml/schema/Event/Participant.xml
xml/schema/Mailing/Event/Bounce.xml
xml/schema/Mailing/Mailing.xml
xml/schema/Member/Membership.xml
xml/schema/Pledge/Pledge.xml

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0c7c4c47963793e66c6f87616dbed540d7a0d407,629a0b4d2e413580dfca5434d4428751c5d23e3e..20e5188b4228e984c74b8bd1b1e981a166cd04d1
@@@ -604,36 -623,20 +604,36 @@@ ORDER BY parent_id, weight"
            module_exists('admin_menu') && user_access('access administration menu')
          )
        ) {
-         $prepandString = "<li class=\"menumain crm-link-home\">" . $homeIcon . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('Drupal Menu') . "</a></li></ul></li>";
 -        $prepandString = "<li class=\"menumain crm-link-home\">" . $homeLabel . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('Drupal Menu') . "</a></li></ul>";
++        $prepandString = "<li class=\"menumain crm-link-home\">" . $homeIcon . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('Drupal Menu') . "</a></li></ul>";
        }
        elseif ($config->userSystem->is_wordpress) {
-         $prepandString = "<li class=\"menumain crm-link-home\">" . $homeIcon . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('WordPress Menu') . "</a></li></ul></li>";
 -        $prepandString = "<li class=\"menumain crm-link-home\">" . $homeLabel . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('WordPress Menu') . "</a></li></ul>";
++        $prepandString = "<li class=\"menumain crm-link-home\">" . $homeIcon . "<ul id=\"civicrm-home\"><li><a href=\"{$homeURL}\">" . $homeLabel . "</a></li><li><a href=\"#\" onclick=\"cj.Menu.closeAll( );cj('#civicrm-menu').toggle( );\">" . ts('WordPress Menu') . "</a></li></ul>";
        }
        else {
-         $prepandString = "<li class=\"menumain crm-link-home\"><a href=\"{$homeURL}\" title=\"" . $homeLabel . "\">" . $homeIcon . "</a></li>";
 -        $prepandString = "<li class=\"menumain crm-link-home\"><a href=\"{$homeURL}\" title=\"" . $homeLabel . "\">" . $homeLabel . "</a>";
++        $prepandString = "<li class=\"menumain crm-link-home\"><a href=\"{$homeURL}\" title=\"" . $homeLabel . "\">" . $homeIcon . "</a>";
        }
  
 -      // prepend the navigation with locale info for CRM-5027
 -      $navigation = "<!-- $config->lcMessages -->" . $prepandString . $navigation . $appendSring;
 +      $navigation = $prepandString . $navigation . $appendString;
 +    }
 +    return $navigation;
 +  }
  
 +  /**
 +   * Reset navigation for all contacts or a specified contact
 +   *
 +   * @param integer $contactID - reset only entries belonging to that contact ID
 +   * @return string
 +   */
 +  static function resetNavigation($contactID = NULL) {
 +    $newKey = CRM_Utils_String::createRandom(self::CACHE_KEY_STRLEN, CRM_Utils_String::ALPHANUMERIC);
 +    if (!$contactID) {
 +      $query = "UPDATE civicrm_setting SET value = '$newKey' WHERE name='navigation' AND contact_id IS NOT NULL";
 +      CRM_Core_DAO::executeQuery($query);
 +      CRM_Core_BAO_Cache::deleteGroup('navigation');
 +    }
 +    else {
        // before inserting check if contact id exists in db
 -      // this is to handle wierd case when contact id is in session but not in db
 +      // this is to handle weird case when contact id is in session but not in db
        $contact = new CRM_Contact_DAO_Contact();
        $contact->id = $contactID;
        if ($contact->find(TRUE)) {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index ab8f34e864b52b230cd8711c94a75b78cde05223,8aec77bebd49616647dde2950680340c22a0e866..4f7c55879af59acb7231bd38bbdd1f5aed941840
            <table>civicrm_campaign</table>
            <keyColumn>id</keyColumn>
            <labelColumn>title</labelColumn>
-           <condition>(end_date IS NULL OR end_date > NOW())</condition>
         </pseudoconstant>
         <add>3.4</add>
 +       <html>
 +         <type>CheckBox</type>
 +       </html>
    </field>
    <foreignKey>
         <name>campaign_id</name>
Simple merge
Simple merge
index debdb57d852da92fbc22b172fe594bf8d5d15e1e,bd3c6c62bcda96f483a16bbe5a73c9363df2a549..64d1aff60258e07eeb97dcd4110254690c0808b4
        <table>civicrm_campaign</table>
        <keyColumn>id</keyColumn>
        <labelColumn>title</labelColumn>
-       <condition>(end_date IS NULL OR end_date > NOW())</condition>
      </pseudoconstant>
      <add>3.4</add>
 +    <html>
 +      <type>Select</type>
 +    </html>
    </field>
    <foreignKey>
      <name>campaign_id</name>
index 551af2a010752b73e9fb0c88ae885f43405b613a,ec438663765d15e7a1ee40493892b153689b00f3..e71e2cb041ba8136ab95965cc83cb88a68aaf9a8
        <table>civicrm_campaign</table>
        <keyColumn>id</keyColumn>
        <labelColumn>title</labelColumn>
-       <condition>(end_date IS NULL OR end_date > NOW())</condition>
      </pseudoconstant>
      <add>3.4</add>
 +    <html>
 +       <type>Autocomplete-Select</type>
 +     </html>
    </field>
    <foreignKey>
      <name>campaign_id</name>
Simple merge
index 674f45e1c3b8ff32b887a291cb57fcdc32868e55,1429267c0c75c91c9fa12f032ac828ac6f6520c5..e634ac8b00771a66eba01a6776254e16250b7d77
          <onDelete>CASCADE</onDelete>
      </foreignKey>
      <field>
-         <name>bounce_type_id</name>
-         <type>int unsigned</type>
-         <comment>What type of bounce was it?</comment>
-       <pseudoconstant>
-         <table>civicrm_mailing_bounce_type</table>
-         <keyColumn>id</keyColumn>
-         <labelColumn>name</labelColumn>
-       </pseudoconstant>
- <html>
-   <type>Select</type>
- </html>
+       <name>bounce_type_id</name>
+       <type>int unsigned</type>
+       <comment>What type of bounce was it?</comment>
+       <pseudoconstant>
+         <table>civicrm_mailing_bounce_type</table>
+         <keyColumn>id</keyColumn>
+         <labelColumn>name</labelColumn>
+       </pseudoconstant>
++      <html>
++        <type>Select</type>
++      </html>
      </field>
      <field>
          <name>bounce_reason</name>
index 95c1e62d264d883ace806cecaf210b3216007c59,27ef77cf92cad09ddb2b25941a6c9fc813d49178..720a457ba594ef515582e8ac91bbd4fa52d76bbe
            <table>civicrm_campaign</table>
            <keyColumn>id</keyColumn>
            <labelColumn>title</labelColumn>
-           <condition>(end_date IS NULL OR end_date > NOW())</condition>
         </pseudoconstant>
         <add>3.4</add>
 +       <html>
 +          <type>Select</type>
 +        </html>
    </field>
    <foreignKey>
         <name>campaign_id</name>
index 0b08320cb79134c1cbecd03254502cea2d2bdb59,6e1383faf4bcb7012563979603e2a8b5f1005789..c1c1d52346269ceb2bcecd09bb2cd03bf9673f19
        <table>civicrm_campaign</table>
        <keyColumn>id</keyColumn>
        <labelColumn>title</labelColumn>
-       <condition>(end_date IS NULL OR end_date > NOW())</condition>
      </pseudoconstant>
      <add>3.4</add>
 +    <html>
 +      <type>Select</type>
 +    </html>
    </field>
    <foreignKey>
      <name>campaign_id</name>
index d91eb202df4f22530b9d8c441bd51ecae3000ac0,bc9b4928ba7e56403e483604a707e590f5edcb9f..41ff7f2dd1eddee5c004c117395b7c83d028965e
        <table>civicrm_campaign</table>
        <keyColumn>id</keyColumn>
        <labelColumn>title</labelColumn>
-       <condition>(end_date IS NULL OR end_date > NOW())</condition>
      </pseudoconstant>
      <add>3.4</add>
 +    <html>
 +      <type>Select</type>
 +    </html>
    </field>
    <foreignKey>
      <name>campaign_id</name>