예제 #1
0
 /**
  * Imports the Infinity database.
  *
  * @return void
  */
 public function importInfinity()
 {
     $file = storage_path("infinity.import");
     $state = $this->getImportState();
     switch ($state) {
         case null:
         case "":
         case "boards":
         case "users":
             file_put_contents($file, "boards");
             $this->importInfinityRolesAndBoards();
         case "assets":
             file_put_contents($file, "assets");
             $this->importInfinityBoardAssets();
         case "config":
             file_put_contents($file, "config");
             $this->importInfinityBoardConfig();
         case "pages":
             file_put_contents($file, "pages");
             $this->importInfinityBoardPages();
         case "tags":
             file_put_contents($file, "tags");
             $this->importInfinityBoardTags();
         case "posts":
             file_put_contents($file, "posts");
             $this->importInfinityBoardPosts();
         case "passwords":
             file_put_contents($file, "passwords");
             $this->importInfinityPasswords();
             break;
         default:
             $this->error("Import state \"{$state}\" invalid.");
     }
     Board::fixPostsTotal();
 }