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)) {
<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>