コード例 #1
0
 /**
  * 
  * @static
  * @return void
  */
 public static function resaveRelatedBeans()
 {
     $GLOBALS['resavingRelatedBeans'] = true;
     //Resave any bean not currently in the middle of a save operation
     foreach (self::$beansToResave as $module => $beans) {
         foreach ($beans as $bean) {
             if (empty($bean->deleted) && empty($bean->in_save)) {
                 $bean->save();
             }
         }
     }
     $GLOBALS['resavingRelatedBeans'] = false;
     //Reset the list of beans that will need to be resaved
     self::$beansToResave = array();
 }
コード例 #2
0
ファイル: SugarRelationship.php プロジェクト: sunmo/snowlotus
 /**
  *
  * @static
  * @return void
  */
 public static function resaveRelatedBeans()
 {
     $GLOBALS['resavingRelatedBeans'] = true;
     //Resave any bean not currently in the middle of a save operation
     foreach (self::$beansToResave as $module => $beans) {
         foreach ($beans as $bean) {
             if (empty($bean->deleted) && empty($bean->in_save)) {
                 $bean->save();
             } else {
                 // Bug 55942 save the in-save id which will be used to send workflow alert later
                 if (isset($bean->id) && !empty($_SESSION['WORKFLOW_ALERTS'])) {
                     $_SESSION['WORKFLOW_ALERTS']['id'] = $bean->id;
                 }
             }
         }
     }
     $GLOBALS['resavingRelatedBeans'] = false;
     //Reset the list of beans that will need to be resaved
     self::$beansToResave = array();
 }