当前位置: 首页>>代码示例>>PHP>>正文


PHP vB_DataManager::post_save_each方法代码示例

本文整理汇总了PHP中vB_DataManager::post_save_each方法的典型用法代码示例。如果您正苦于以下问题:PHP vB_DataManager::post_save_each方法的具体用法?PHP vB_DataManager::post_save_each怎么用?PHP vB_DataManager::post_save_each使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vB_DataManager的用法示例。


在下文中一共展示了vB_DataManager::post_save_each方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: eval

 function post_save_each($doquery = true)
 {
     ($hook = vBulletinHook::fetch_hook('userpicdata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:5,代码来源:class_dm_userpic.php

示例2: intval

 /**
  * Code to run after saving
  *
  * @param	boolean	Do the query?
  *
  * @return	boolean	Whether this code executed correctly
  *
  */
 function post_save_each($doquery = true)
 {
     $pictureid = intval($this->fetch_field('pictureid'));
     if (!$this->condition and !empty($this->info['albums'])) {
         $dateline = !$this->info['dateline'] ? TIMENOW : $this->info['dateline'];
         $albuminsert = array();
         $albumids = array();
         foreach ($this->info['albums'] as $album) {
             $albumids[] = intval($album['albumid']);
             $albuminsert[] = "(" . intval($album['albumid']) . ", {$pictureid}, {$dateline})";
         }
         $this->registry->db->query_write("\n\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "albumpicture\n\t\t\t\t\t(albumid, pictureid, dateline)\n\t\t\t\tVALUES " . implode(', ', $albuminsert));
         if ($this->info['auto_count_update']) {
             $this->registry->db->query_write("\n\t\t\t\t\tUPDATE " . TABLE_PREFIX . "album SET\n\t\t\t\t\t\t" . ($this->fetch_field('state') == 'visible' ? "visible = visible + 1, lastpicturedate = IF({$dateline} > lastpicturedate, {$dateline}, lastpicturedate)" : "moderation = moderation + 1") . "\n\t\t\t\t\tWHERE albumid IN (" . implode(',', $albumids) . ")\n\t\t\t\t");
         }
     }
     ($hook = vBulletinHook::fetch_hook('picturedata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:27,代码来源:class_dm_picture.php

示例3:

 /**
  * Additional data to update after a save call (such as denormalized values in other tables).
  * In batch updates, is executed for each record updated.
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     if ($contenttypeid = intval($this->fetch_field('contenttypeid'))) {
         require_once DIR . '/packages/vbattach/attach.php';
         if (!($attach =& vB_Attachment_Dm_Library::fetch_library($this->registry, $contenttypeid))) {
             return false;
         }
         $attach->post_save_each($this);
     }
     return parent::post_save_each($doquery);
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:17,代码来源:class_dm_attachment.php

示例4: IF

 /**
  * Additional data to update after a save call (such as denormalized values in other tables).
  * In batch updates, is executed for each record updated.
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     if (!empty($this->info['update_existing'])) {
         // we're updating an existing attachment that has already been counted
         // in the thread/post.attach fields. We need to decrement those fields
         // because they will be incremented on save.
         $this->registry->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "post SET\n\t\t\t\t\tattach = IF(attach > 0, attach - 1, 0)\n\t\t\t\tWHERE postid = " . intval($this->info['update_existing']));
         $this->registry->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "post AS post, " . TABLE_PREFIX . "thread AS thread SET\n\t\t\t\t\tthread.attach = IF(thread.attach > 0, thread.attach - 1, 0)\n\t\t\t\tWHERE thread.threadid = post.threadid\n\t\t\t\t\tAND post.postid = " . intval($this->info['update_existing']));
     }
     ($hook = vBulletinHook::fetch_hook('attachdata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:class_dm_attachment.php

示例5: intval

 /**
  * Additional data to update after a save call (such as denormalized values in other tables).
  * In batch updates, is executed for each record updated.
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     // attachment counts
     if ($this->fetch_field('visible') and empty($this->existing['visible'])) {
         // new attachment or making one invisible
         $this->registry->db->query_write("\r\n\t\t\t\tUPDATE " . TABLE_PREFIX . "pt_issue SET\r\n\t\t\t\t\tattachcount = attachcount + 1\r\n\t\t\t\tWHERE issueid = " . intval($this->fetch_field('issueid')));
     } else {
         if (!$this->fetch_field('visible') and !empty($this->existing['visible'])) {
             // hiding visible attachment
             $this->registry->db->query_write("\r\n\t\t\t\tUPDATE " . TABLE_PREFIX . "pt_issue SET\r\n\t\t\t\t\tattachcount = IF(attachcount > 0, attachcount - 1, 0)\r\n\t\t\t\tWHERE issueid = " . intval($this->fetch_field('issueid')));
         }
     }
     if (!$this->condition and $this->fetch_field('visible')) {
         // insert issue change
         $change =& datamanager_init('Pt_IssueChange', $this->registry, ERRTYPE_STANDARD);
         $change->set_info('roll_post_time_limit', 0);
         // disable folding for attachment uploads
         $change->set('issueid', $this->fetch_field('issueid'));
         $change->set('userid', $this->registry->userinfo['userid']);
         $change->set('field', 'attachment_uploaded');
         $change->set('newvalue', $this->fetch_field('filename'));
         $change->set('oldvalue', '');
         $change->save();
     }
     ($hook = vBulletinHook::fetch_hook('ptattachdata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:33,代码来源:class_dm_attachment_pt.php

示例6:

 function post_save_each($doquery = true)
 {
     return parent::post_save_each($doquery);
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:4,代码来源:userpic.php


注:本文中的vB_DataManager::post_save_each方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。