Révision 64156087
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/panels/panels_mini/panels_mini.install | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
/** |
4 | 8 |
* Implementation of hook_schema(). |
5 | 9 |
*/ |
... | ... | |
105 | 109 |
foreach ($result as $panel_mini) { |
106 | 110 |
// Delete all associated displays. |
107 | 111 |
if (!function_exists('panels_delete_display')) { |
108 |
require_once drupal_get_path('module', 'panels') .'/panels.module'; |
|
112 |
require_once drupal_get_path('module', 'panels') . '/panels.module';
|
|
109 | 113 |
} |
110 | 114 |
if ($panels_exists) { |
111 | 115 |
panels_delete_display($panel_mini->did); |
... | ... | |
127 | 131 |
* Implements hook_update_dependencies(). |
128 | 132 |
*/ |
129 | 133 |
function panels_mini_update_dependencies() { |
130 |
// Update 7301 requires panels storage support |
|
134 |
// Update 7301 requires panels storage support.
|
|
131 | 135 |
$dependencies['panels_mini'][7301] = array( |
132 | 136 |
'panels' => 7305, |
133 | 137 |
); |
... | ... | |
140 | 144 |
*/ |
141 | 145 |
function panels_mini_update_7301() { |
142 | 146 |
if (!isset($sandbox['progress'])) { |
143 |
// Initialize batch update information.
|
|
144 |
$sandbox['progress'] = (float)0;
|
|
145 |
$sandbox['current_did'] = -1;
|
|
146 |
$sandbox['max'] = db_query("SELECT COUNT(pd.did)
|
|
147 |
// Initialize batch update information. |
|
148 |
$sandbox['progress'] = (float) 0;
|
|
149 |
$sandbox['current_did'] = -1; |
|
150 |
$sandbox['max'] = db_query("SELECT COUNT(pd.did) |
|
147 | 151 |
FROM {panels_display} pd |
148 | 152 |
JOIN {panels_mini} pm ON pm.did = pd.did |
149 | 153 |
WHERE pd.storage_type = ''")->fetchField(); |
150 |
}
|
|
154 |
} |
|
151 | 155 |
|
152 | 156 |
// Set a limit of how many rows to process per batch. |
153 | 157 |
$limit = 1000; |
154 | 158 |
|
155 |
// Run the query |
|
159 |
// Run the query.
|
|
156 | 160 |
$result = db_query_range("SELECT pd.did, pm.name |
157 | 161 |
FROM {panels_display} pd |
158 | 162 |
JOIN {panels_mini} pm ON pm.did = pd.did |
Formats disponibles : Unified diff
Weekly update of contrib modules