_update_authorize_clear_update_status

function _update_authorize_clear_update_status

_update_authorize_clear_update_status()

Clears cached available update status data.

Since this function is run at such a low bootstrap level, the Update Manager module is not loaded. So, we can't just call _update_cache_clear(). However, the database is bootstrapped, so we can do a query ourselves to clear out what we want to clear.

Note that we do not want to just truncate the table, since that would remove items related to currently pending fetch attempts.

See also

update_authorize_update_batch_finished()

_update_cache_clear()

File

modules/update/update.authorize.inc, line 331
Callbacks and related functions invoked by authorize.php to update projects.

Code

function _update_authorize_clear_update_status() {
  $query = db_delete('cache_update');
  $query->condition(
  db_or()
    ->condition('cid', 'update_project_%', 'LIKE')
    ->condition('cid', 'available_releases::%', 'LIKE')
    );
  $query->execute();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.authorize.inc/function/_update_authorize_clear_update_status/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部