Reorganize PHP internals and static assets
Move shared PHP code into private/, move JavaScript files into js/, and block direct access to private/. Remove unused API key and cache artifacts from the working tree.
This commit is contained in:
+7
-7
@@ -13,11 +13,11 @@
|
||||
* - manage global default prompts
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/auth.php';
|
||||
require_once __DIR__ . '/header.php';
|
||||
require_once __DIR__ . '/languagestore.php';
|
||||
require_once __DIR__ . '/promptstore.php';
|
||||
require_once __DIR__ . '/usersettings.php';
|
||||
require_once __DIR__ . '/private/auth.php';
|
||||
require_once __DIR__ . '/private/header.php';
|
||||
require_once __DIR__ . '/private/languagestore.php';
|
||||
require_once __DIR__ . '/private/promptstore.php';
|
||||
require_once __DIR__ . '/private/usersettings.php';
|
||||
|
||||
ini_set('display_errors', '1');
|
||||
ini_set('display_startup_errors', '1');
|
||||
@@ -395,7 +395,7 @@ if ($user->isAdmin()) {
|
||||
}
|
||||
|
||||
$styleVersion = @filemtime(__DIR__ . '/styles.css') ?: time();
|
||||
$promptEditorVersion = @filemtime(__DIR__ . '/prompt-editor.js') ?: time();
|
||||
$promptEditorVersion = @filemtime(__DIR__ . '/js/prompt-editor.js') ?: time();
|
||||
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
?>
|
||||
@@ -714,7 +714,7 @@ render_app_header(array(
|
||||
'new' => t('prompts.new', 'new'),
|
||||
), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>
|
||||
</script>
|
||||
<script src="/prompt-editor.js?v=<?= h($promptEditorVersion) ?>" defer></script>
|
||||
<script src="/js/prompt-editor.js?v=<?= h($promptEditorVersion) ?>" defer></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user