| 1 |
<?php |
<?php |
| 2 |
// $Id: emvideo.install,v 1.1.2.29 2009/09/30 21:05:09 aaron Exp $ |
// $Id: emvideo.install,v 1.1.2.30 2009/10/21 16:12:36 aaron Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 292 |
function emvideo_update_6007() { |
function emvideo_update_6007() { |
| 293 |
// This update was originally malformed, and did not always work properly. |
// This update was originally malformed, and did not always work properly. |
| 294 |
// It's now redone in 6010. |
// It's now redone in 6010. |
| 295 |
$ret = array(); |
return array(); |
|
return $ret; |
|
| 296 |
} |
} |
| 297 |
|
|
| 298 |
/** |
/** |
| 301 |
function emvideo_update_6008() { |
function emvideo_update_6008() { |
| 302 |
// The previous update, upon which this depended, was originally malformed, |
// The previous update, upon which this depended, was originally malformed, |
| 303 |
// and did not always work properly. It's now redone in 6011. |
// and did not always work properly. It's now redone in 6011. |
| 304 |
$ret = array(); |
return array(); |
|
return $ret; |
|
| 305 |
} |
} |
| 306 |
|
|
| 307 |
/** |
/** |
| 316 |
* Botched update_6007, redo at 6013. |
* Botched update_6007, redo at 6013. |
| 317 |
*/ |
*/ |
| 318 |
function emvideo_update_6010() { |
function emvideo_update_6010() { |
| 319 |
$ret = array(); |
return array(); |
|
return $ret; |
|
| 320 |
} |
} |
| 321 |
|
|
| 322 |
/** |
/** |
| 323 |
* Botched update, redo at 6014. |
* Botched update, redo at 6016. |
| 324 |
*/ |
*/ |
| 325 |
function emvideo_update_6011() { |
function emvideo_update_6011() { |
| 326 |
$ret = array(); |
return array(); |
|
return $ret; |
|
| 327 |
} |
} |
| 328 |
|
|
| 329 |
/** |
/** |
| 376 |
} |
} |
| 377 |
|
|
| 378 |
/** |
/** |
| 379 |
* Add a duration column to existing fields. |
* Botched update, redo at 6016. |
| 380 |
*/ |
*/ |
| 381 |
function emvideo_update_6014() { |
function emvideo_update_6014() { |
| 382 |
|
return array(); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
/** |
| 386 |
|
* New formatters and theme functions. |
| 387 |
|
*/ |
| 388 |
|
function emvideo_update_6015() { |
| 389 |
|
return _emvideo_update_add_new_formatters(); |
| 390 |
|
} |
| 391 |
|
|
| 392 |
|
/** |
| 393 |
|
* Add a duration column to existing fields. |
| 394 |
|
*/ |
| 395 |
|
function emvideo_update_6016() { |
| 396 |
$ret = array(); |
$ret = array(); |
| 397 |
|
|
| 398 |
// Build a list of fields that need data updating. |
// Build a list of fields that need data updating. |
| 428 |
} |
} |
| 429 |
|
|
| 430 |
/** |
/** |
|
* New formatters and theme functions. |
|
|
*/ |
|
|
function emvideo_update_6015() { |
|
|
return _emvideo_update_add_new_formatters(); |
|
|
} |
|
|
|
|
|
/** |
|
| 431 |
* Batch function to grab the duration for each video field. |
* Batch function to grab the duration for each video field. |
| 432 |
*/ |
*/ |
| 433 |
function _emvideo_update_get_duration($field, &$context) { |
function _emvideo_update_get_duration($field, &$context) { |
| 448 |
|
|
| 449 |
// Work our way through the field values 50 rows at a time. |
// Work our way through the field values 50 rows at a time. |
| 450 |
$limit = 50; |
$limit = 50; |
| 451 |
$result = db_query_range("SELECT * FROM {{$context['sandbox']['table']}} WHERE vid > %d AND {$context['sandbox']['col_duration']} = 0 ORDER BY nid ASC", $context['sandbox']['current_node'], 0, $limit); |
$result = db_query_range("SELECT * FROM {{$context['sandbox']['table']}} WHERE vid > %d AND {$context['sandbox']['col_duration']} = 0 ORDER BY vid ASC", $context['sandbox']['current_node'], 0, $limit); |
| 452 |
while ($row = db_fetch_array($result)) { |
while ($row = db_fetch_array($result)) { |
| 453 |
// Fetch the duration from the provider. |
// Fetch the duration from the provider. |
| 454 |
$item = array( |
$item = array( |