Changeset 1456
- Timestamp:
- 04/09/06 19:33:16 (7 years ago)
- Files:
-
- freepbx/trunk/install_amp (modified) (2 diffs)
- freepbx/trunk/upgrades/2.1beta1/upgrade.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/install_amp
r1422 r1456 315 315 316 316 if (is_dir(UPGRADE_DIR."/".$version)) { 317 // sql scripts first 317 318 $dir = opendir(UPGRADE_DIR."/".$version); 318 319 while ($file = readdir($dir)) { … … 338 339 } 339 340 } 340 341 } else if (strtolower(substr($file,-4)) == ".php") {342 out("-> Running PHP script ".UPGRADE_DIR."/".$version."/".$file);343 if (!$dryrun) {344 run_included(UPGRADE_DIR."/".$version."/".$file);345 }346 347 } else if (is_executable(UPGRADE_DIR."/".$version."/".$file)) {348 out("-> Executing ".UPGRADE_DIR."/".$version."/".$file);349 if (!$dryrun) {350 exec(UPGRADE_DIR."/".$version."/".$file);351 }352 } else {353 error("-> Don't know what to do with ".UPGRADE_DIR."/".$version."/".$file);354 341 } 355 342 } 356 343 } 344 345 // now non sql scripts 346 $dir = opendir(UPGRADE_DIR."/".$version); 347 while ($file = readdir($dir)) { 348 if (($file[0] != ".") && is_file(UPGRADE_DIR."/".$version."/".$file)) { 349 if (strtolower(substr($file,-4)) == ".sql") { 350 // sql scripts were dealt with first 351 } else if (strtolower(substr($file,-4)) == ".php") { 352 out("-> Running PHP script ".UPGRADE_DIR."/".$version."/".$file); 353 if (!$dryrun) { 354 run_included(UPGRADE_DIR."/".$version."/".$file); 355 } 356 357 } else if (is_executable(UPGRADE_DIR."/".$version."/".$file)) { 358 out("-> Executing ".UPGRADE_DIR."/".$version."/".$file); 359 if (!$dryrun) { 360 exec(UPGRADE_DIR."/".$version."/".$file); 361 } 362 } else { 363 error("-> Don't know what to do with ".UPGRADE_DIR."/".$version."/".$file); 364 } 365 } 366 } 367 357 368 } 358 369 }
