File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ public function index()
6868 $ inactive_migrations = $ this ->inactiveMigrations ();
6969
7070 if (!$ this ->isInstalled ()) {
71+ \Cache::forever ('panichd::installation ' , 'install ' );
72+
7173 // Panic Help Desk is not installed yet
7274
7375 $ previous_ticketit = Schema::hasTable ('ticketit_settings ' );
@@ -122,6 +124,10 @@ public function upgrade_menu()
122124 */
123125 public function isInstalled ()
124126 {
127+ // Not installed if we're in installation process
128+ if (\Cache::has ('panichd::installation ' )) return false ;
129+
130+ // Not installed if no PanicHD migrations installed or choosen one is missing
125131 return (count ($ this ->migrations_tables ) == count ($ this ->inactiveMigrations ())
126132 || in_array ('2017_12_25_222719_update_panichd_priorities_add_magnitude ' , $ this ->inactiveMigrations ()) ) ? false : true ;
127133 }
@@ -187,7 +193,9 @@ public function setup(Request $request)
187193 }
188194
189195 $ admin ->save ();
190-
196+
197+ \Cache::forget ('panichd::installation ' );
198+
191199 return redirect ()->route ('panichd.install.index ' )->with ('current_status ' , 'installed ' );
192200 }
193201
You can’t perform that action at this time.
0 commit comments