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


PHP History::removeByIssues方法代码示例

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


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

示例1: removeByProjects

 /**
  * Method used to remove all issues associated with a specific list of
  * projects.
  *
  * XXX: this is dangerous, maybe remove such methods?
  *
  * @param   array $ids The list of projects to look for
  * @return  boolean
  */
 public static function removeByProjects($ids)
 {
     $stmt = 'SELECT
                 iss_id
              FROM
                 {{%issue}}
              WHERE
                 iss_prj_id IN (' . DB_Helper::buildList($ids) . ')';
     try {
         $res = DB_Helper::getInstance()->getColumn($stmt, $ids);
     } catch (DbException $e) {
         return false;
     }
     if (count($res) > 0) {
         self::deleteAssociations($res);
         Attachment::removeByIssues($res);
         SCM::removeByIssues($res);
         Impact_Analysis::removeByIssues($res);
         self::deleteUserAssociations($res);
         Note::removeByIssues($res);
         Time_Tracking::removeTimeEntriesByIssues($res);
         Notification::removeByIssues($res);
         Custom_Field::removeByIssues($res);
         Phone_Support::removeByIssues($res);
         History::removeByIssues($res);
         // now really delete the issues
         $items = implode(', ', $res);
         $stmt = "DELETE FROM\n                        {{%issue}}\n                     WHERE\n                        iss_id IN ({$items})";
         DB_Helper::getInstance()->query($stmt);
     }
     return true;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:41,代码来源:class.issue.php

示例2: removeByProjects

 /**
  * Method used to remove all issues associated with a specific list of
  * projects.
  *
  * @access  public
  * @param   array $ids The list of projects to look for
  * @return  boolean
  */
 function removeByProjects($ids)
 {
     $items = @implode(", ", Misc::escapeInteger($ids));
     $stmt = "SELECT\n                    iss_id\n                 FROM\n                    " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue\n                 WHERE\n                    iss_prj_id IN ({$items})";
     $res = $GLOBALS["db_api"]->dbh->getCol($stmt);
     if (PEAR::isError($res)) {
         Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
         return false;
     } else {
         if (count($res) > 0) {
             Issue::deleteAssociations($res);
             Attachment::removeByIssues($res);
             SCM::removeByIssues($res);
             Impact_Analysis::removeByIssues($res);
             Issue::deleteUserAssociations($res);
             Note::removeByIssues($res);
             Time_Tracking::removeByIssues($res);
             Notification::removeByIssues($res);
             Custom_Field::removeByIssues($res);
             Phone_Support::removeByIssues($res);
             History::removeByIssues($res);
             // now really delete the issues
             $items = implode(", ", $res);
             $stmt = "DELETE FROM\n                            " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue\n                         WHERE\n                            iss_id IN ({$items})";
             $GLOBALS["db_api"]->dbh->query($stmt);
         }
         return true;
     }
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:37,代码来源:class.issue.php


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