Files
HotLunches/square/local-dev-bootstrap.php
T
2026-10-19 15:22:52 -07:00

26 lines
1.4 KiB
PHP

<?php
/**
* LOCAL DEV ONLY — stubs for the hotlunches host-app functions so onboard.php
* can run WITHOUT the real ../include/* files.
*
* onboard.php loads this ONLY when the host includes are absent. In production
* the real includes always exist, so this file never loads and onboarding stays
* behind the real SuperUser login gate.
*
* ⚠️ With these stubs the login gate is effectively OPEN (UserLoggedIn() = true).
* Do NOT deploy this file to a public/production server that lacks the host
* app. It is purely for testing the OAuth flow on http://localhost.
*/
if (!function_exists('startLog')) { function startLog($n = '') {} }
if (!function_exists('writeLog')) { function writeLog($m = '') { error_log('[square] ' . $m); } }
if (!function_exists('SessionActive')) { function SessionActive() { return 1; } }
if (!function_exists('UserLoggedIn')) { function UserLoggedIn() { return true; } }
if (!function_exists('checkPermission')) { function checkPermission($types) { return 1; } }
if (!function_exists('getLanguageText')) { function getLanguageText($k) { return $k; } }
if (!function_exists('displayLanguageText')) { function displayLanguageText($k) { echo 'School name'; } }
// Variables onboard.php expects from the host app.
$FormTarget = $FormTarget ?? '/';
$school_record = $school_record ?? ['school_name' => ''];