- Timestamp:
- 11/10/10 13:33:23 (18 months ago)
- Location:
- branches/1.4
- Files:
-
- 4 modified
-
Hotaru.php (modified) (1 diff)
-
install/index.php (modified) (6 diffs)
-
install/install_functions.php (modified) (1 diff)
-
install/install_language.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4/Hotaru.php
r2211 r2227 1491 1491 { 1492 1492 $maintenance = new Maintenance(); 1493 $maintenance->deleteFiles($dir);1493 return $maintenance->deleteFiles($dir); 1494 1494 } 1495 1495 -
branches/1.4/install/index.php
r2222 r2227 102 102 } else { 103 103 $db = init_database(); 104 database_creation( ); // Creates the database tables104 database_creation($h); // Creates the database tables 105 105 } 106 106 break; … … 470 470 * Step 2 of installation - Creates database tables 471 471 */ 472 function database_creation( )472 function database_creation($h) 473 473 { 474 474 global $lang; … … 594 594 595 595 // Step content 596 echo "<div class='install_content'>" . $lang['install_step3_instructions'] . ":<br /> \n";596 echo "<div class='install_content'>" . $lang['install_step3_instructions'] . ":<br /><br />\n"; 597 597 598 598 $error = 0; … … 749 749 750 750 $phpinfo = $cage->post->getAlpha('phpinfo'); // delete install folder. 751 $delete = $cage->post->getAlpha('delete'); // delete install folder.752 753 $folder_deleted = 0;754 755 if ($delete) {756 // try to delete the folder757 //$folder_deleted = delTree('install');758 $folder_deleted = 2;759 // if was deleted then redirect to baseurl760 if ($folder_deleted == 1) header("Location: /index.php" );761 }762 763 if (!$delete && !$phpinfo) {764 //send feedback report765 $systeminfo = new SystemInfo();766 $systeminfo->hotaru_feedback($h);767 }768 751 769 752 echo html_header(); … … 773 756 774 757 // Step content 775 776 if ($folder_deleted == 0) echo "<div class='install_content'>" . $lang['install_step4_installation_complete'] . "</div>\n"; 758 echo "<div class='install_content'>" . $lang['install_step4_installation_complete'] . "</div>\n"; 777 759 echo "<div class='install_content'>" . $lang['install_step4_installation_delete'] . "</div>\n"; 778 760 … … 811 793 echo "<input class='update button' type='submit' value='" . $lang['install_step4_form_check_php'] . "' />"; 812 794 echo "</div></form>\n"; 813 }814 815 if ($folder_deleted == 0) {816 // Confirm delete and continue install817 echo "<div class='install_content'>" . $lang['install_step4_installation_delete_folder'] . "</div>\n";818 echo "<form name='install_admin_reg_form' action='index.php?step=4' method='post'>\n";819 echo "<input type='hidden' name='delete' value='folder' />";820 echo "<input type='hidden' name='step' value='4' />";821 822 echo "<input class='update button' type='submit' value='" . $lang['install_step4_form_delete_folder'] . "' />";823 echo "</div></form>\n";824 } else {825 echo "<br/><img src='../content/admin_themes/admin_default/images/delete.png' style='float:left; margin-left:12px;'>";826 echo "<div class='install_content'><span style='color: red;'>" . $lang['install_step1_warning'] . "</span>: " . $lang['install_step4_installation_delete_failed'] . "</div>\n";827 795 } 828 796 -
branches/1.4/install/install_functions.php
r1840 r2227 135 135 */ 136 136 function delTree($dir) { 137 $files = glob( $dir . '*', GLOB_MARK );138 foreach( $files as $file ){139 if( is_dir( $file ) )140 delTree( $file );141 else142 unlink( $file );143 }144 137 145 if (is_dir($dir)) return rmdir( $dir ); 138 $files = glob( $dir . '*', GLOB_MARK ); 139 140 foreach( $files as $file ){ 141 if( is_dir( $file ) ) 142 delTree( $file ); 143 else 144 @unlink( $file ); 145 } 146 147 if (is_dir($dir)) return @rmdir( $dir ); 146 148 } -
branches/1.4/install/install_language.php
r2220 r2227 139 139 $lang["install_step4"] = "Step 4/4: Completion"; 140 140 $lang["install_step4_installation_complete"] = "Installation has been successfully completed."; 141 $lang["install_step4_installation_delete"] = "You <b>must</b> delete the install folder or someone else could run the install script and wipe everything!"; 142 $lang["install_step4_installation_delete_folder"] = "Shall we try and delete the 'install' folder for you?"; 143 $lang["install_step4_form_delete_folder"] = "Delete Folder"; 144 $lang["install_step4_installation_delete_failed"] = "We were not able to delete the install folder. Please delete it manually."; 141 $lang["install_step4_installation_delete"] = "<span style='color: red;'><b>WARNING:</b> You <b>must</b> delete the install folder or someone else could run the install script and wipe everything!</span>"; 142 145 143 $lang["install_step4_form_check_php"] = "Check PHP Setup"; 146 144 $lang["install_step4_form_check_php_warning"] = "Note: Your server is missing the PHP module: ";