本文整理汇总了PHP中update_batch函数的典型用法代码示例。如果您正苦于以下问题:PHP update_batch函数的具体用法?PHP update_batch怎么用?PHP update_batch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了update_batch函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: drupal_load_updates
include_once DRUPAL_ROOT . '/includes/install.inc';
include_once DRUPAL_ROOT . '/includes/batch.inc';
drupal_load_updates();
update_fix_d7_requirements();
update_fix_compatibility();
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
switch ($op) {
// update.php ops
case 'selection':
if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) {
$output = update_selection_page();
break;
}
case 'Apply pending updates':
if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) {
update_batch();
break;
}
case 'info':
$output = update_info_page();
break;
case 'results':
$output = update_results_page();
break;
// Regular batch ops : defer to batch processing API
// Regular batch ops : defer to batch processing API
default:
update_task_list('run');
$output = _batch_page();
break;
}
开发者ID:veggieryan,项目名称:drupal,代码行数:31,代码来源:update.php
示例2: isset
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
switch ($op) {
// update.php ops.
case 'selection':
if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'update')) {
$output = update_selection_page();
break;
}
case 'Apply pending updates':
if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'update')) {
// Generate absolute URLs for the batch processing (using $base_root),
// since the batch API will pass them to url() which does not handle
// update.php correctly by default.
$batch_url = $base_root . drupal_current_script_url();
$redirect_url = $base_root . drupal_current_script_url(array('op' => 'results'));
update_batch($_POST['start'], $redirect_url, $batch_url);
break;
}
case 'info':
$output = update_info_page();
break;
case 'results':
$output = update_results_page();
break;
// Regular batch ops : defer to batch processing API.
// Regular batch ops : defer to batch processing API.
default:
update_task_list('run');
$output = _batch_page();
break;
}
开发者ID:ludichrislyts,项目名称:fieldWork,代码行数:31,代码来源:update.php
示例3: drupal_load_updates
include_once DRUPAL_ROOT . '/includes/batch.inc';
drupal_load_updates();
update_fix_compatibility();
// Check the update requirements for all modules.
update_check_requirements();
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
switch ($op) {
// update.php ops.
case 'selection':
if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) {
$output = update_selection_page();
break;
}
case 'Apply pending updates':
if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) {
update_batch($_POST['start'], $base_url . '/update.php?op=results', $base_url . '/update.php');
break;
}
case 'info':
$output = update_info_page();
break;
case 'results':
$output = update_results_page();
break;
// Regular batch ops : defer to batch processing API.
// Regular batch ops : defer to batch processing API.
default:
update_task_list('run');
$output = _batch_page();
break;
}
开发者ID:boombatower,项目名称:drupal,代码行数:31,代码来源:update.php
示例4: update_task_list
$token = $request->query->get('token');
if (isset($token) && \Drupal::csrfToken()->validate($token, 'update')) {
$regions['sidebar_first'] = update_task_list('select');
$output = update_selection_page();
break;
}
case 'Apply pending updates':
$token = $request->query->get('token');
if (isset($token) && \Drupal::csrfToken()->validate($token, 'update')) {
$regions['sidebar_first'] = update_task_list('run');
// Generate absolute URLs for the batch processing (using $base_root),
// since the batch API will pass them to url() which does not handle
// update.php correctly by default.
$batch_url = $base_root . drupal_current_script_url();
$redirect_url = $base_root . drupal_current_script_url(array('op' => 'results'));
$output = update_batch($request->request->get('start'), $redirect_url, $batch_url);
break;
}
case 'info':
$regions['sidebar_first'] = update_task_list('info');
$output = update_info_page();
break;
case 'results':
$regions['sidebar_first'] = update_task_list();
$output = update_results_page();
break;
// Regular batch ops : defer to batch processing API.
// Regular batch ops : defer to batch processing API.
default:
$regions['sidebar_first'] = update_task_list('run');
$output = _batch_page($request);
开发者ID:anatalsceo,项目名称:en-classe,代码行数:31,代码来源:update.php
注:本文中的update_batch函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论