Skip to content

Instantly share code, notes, and snippets.

@erop
Forked from jwhitcraft/upgradesafe.php
Created March 28, 2012 19:59
Show Gist options
  • Select an option

  • Save erop/2229997 to your computer and use it in GitHub Desktop.

Select an option

Save erop/2229997 to your computer and use it in GitHub Desktop.

Revisions

  1. Jon Whitcraft revised this gist Mar 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion upgradesafe.php
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ class CustomContactsViewDetail extends ContactsViewDetail {
    /**
    * @see SugarView::display()
    *
    * We are overridding the display method to manipulate the portal information.
    * We are overriding the display method to manipulate the portal information.
    * If portal is not enabled then don't show the portal fields.
    */
    public function display()
  2. Jon Whitcraft created this gist Mar 3, 2012.
    23 changes: 23 additions & 0 deletions upgradesafe.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    <?php

    // this file is upgrade safe
    // location: custom/modules/Contacts/views/view.detail.php

    require_once('modules/Contacts/views/view.detail.php');

    class CustomContactsViewDetail extends ContactsViewDetail {
    /**
    * @see SugarView::display()
    *
    * We are overridding the display method to manipulate the portal information.
    * If portal is not enabled then don't show the portal fields.
    */
    public function display()
    {
    // my custom code here

    // call up the ContactsViewDetail Code to run the display after we have called
    // all of our custom code.
    parent::display();
    }
    }