當前位置: 首頁>>代碼示例>>PHP>>正文


PHP update_batch函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。