Changeset 4786
- Timestamp:
- Jan 28, 2010, 11:07:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/netinstall/trunk/piwigo-netinstall.php
r3422 r4786 472 472 $uz = new fileUnzip($dc_zip); 473 473 $files = $uz->getList(); 474 if ( count($files) == 0)474 if (!is_array($files) or count($files) == 0) 475 475 { 476 476 $msg[] = l10n('Invalid zip file.'); 477 477 } 478 479 foreach ($files as $k => $v) 478 else 480 479 { 481 if ($v['is_dir']) 480 foreach ($files as $k => $v) 481 { 482 if ($v['is_dir']) 483 { 484 continue; 485 } 486 if (preg_match('#^[^/]*/_data#', $k)) 482 487 { 483 488 continue; 484 489 } 485 $t = preg_replace('#^[^/]*/#','./'.$dest.'/',$k); 486 $uz->unzip($k,$t); 490 $t = preg_replace('#^[^/]*/#','./'.$dest.'/',$k); 491 $uz->unzip($k,$t); 492 } 487 493 } 488 494 $uz->close;
Note: See TracChangeset
for help on using the changeset viewer.