|
99 | 99 | </div> |
100 | 100 | <h1 class="loadingtxt">Finishing up</h1> |
101 | 101 |
|
102 | | - <?php |
103 | | -
|
104 | | - //run before finishing: |
105 | | - if(EnvEditor::keyExists('JOIN_BETA')){ /* Do nothing if key already exists */ |
106 | | - } else { EnvEditor::addKey('JOIN_BETA', 'false');} // Adds key to .env file |
107 | | -
|
108 | | - if(EnvEditor::keyExists('SKIP_UPDATE_BACKUP')){ /* Do nothing if key already exists */ |
109 | | - } else { EnvEditor::addKey('SKIP_UPDATE_BACKUP', 'false');} // Adds key to .env file |
110 | | -
|
111 | | - if(EnvEditor::keyExists('CUSTOM_META_TAGS')){ /* Do nothing if key already exists */ |
112 | | - } else {EnvEditor::addKey('CUSTOM_META_TAGS', 'false');} |
113 | | -
|
114 | | - if (!config()->has('advanced-config.expand_panel_admin_menu_permanently') and !config()->has('advanced-config.redirect_https')) { |
115 | | - |
116 | | - function getStringBetween($string, $start, $end) { |
117 | | - $lastStartIndex = strrpos($string, $start); |
118 | | - $lastEndIndex = strrpos($string, $end); |
119 | | - |
120 | | - $substringStartIndex = $lastStartIndex + strlen($start); |
121 | | - $substringSize = $lastStartIndex - $lastEndIndex - 1; |
122 | | - |
123 | | - return substr($string, $substringStartIndex, $substringSize); |
124 | | - } |
125 | | - |
126 | | - $subject = file_get_contents('config/advanced-config.php'); |
127 | | - $search = ")"; |
128 | | - $replace = "),"; |
129 | | - |
130 | | - file_put_contents('config/advanced-config.php', str_replace('),,', '),', strrev(implode(strrev($replace), explode(strrev($search), strrev($subject), 2))))); |
131 | | - |
132 | | - $replace = "];"; |
133 | | - file_put_contents('config/advanced-config.php', str_replace($replace, file_get_contents('storage/templates/advanced-config-update-1.php'), file_get_contents('config/advanced-config.php'))); |
134 | | - } |
135 | | -
|
136 | | - echo "<meta http-equiv=\"refresh\" content=\"0; " . url()->current() . "?success\" />"; |
137 | | - ?> |
| 102 | + @include('components.finishing') |
138 | 103 | @endif |
139 | 104 |
|
140 | 105 | @if($_SERVER['QUERY_STRING'] === 'success') |
|
0 commit comments