# HG changeset patch # User m15o # Date 1685869585 -7200 # Sun Jun 04 11:06:25 2023 +0200 # Node ID 3f3a6b7cf12ed71e3fa32421ce808d8a952b1811 # Parent cfc315dbd637370691492fb94b9aa2e1e2bbfc0d fix flash diff --git a/config.sample.php b/config.sample.php --- a/config.sample.php +++ b/config.sample.php @@ -1,8 +1,8 @@ + +getSession()->getFlash()): ?> +

+ \ No newline at end of file diff --git a/includes/site_header.php b/includes/site_header.php --- a/includes/site_header.php +++ b/includes/site_header.php @@ -20,3 +20,7 @@ +getSession()->getFlash()): ?> +

+ + diff --git a/page_update.php b/page_update.php --- a/page_update.php +++ b/page_update.php @@ -10,8 +10,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $form['content'] = $_POST['content']; - // todo validation - if (!count($errors)) { $App->getPage()->update($User['id'], $p, $form['content']); } diff --git a/password-lost.php b/password-lost.php --- a/password-lost.php +++ b/password-lost.php @@ -4,7 +4,7 @@ $errors = []; -$title = 'piclog - Recover password'; +$title = 'lipu li - Recover password'; function get_body($token) { diff --git a/password-update.php b/password-update.php --- a/password-update.php +++ b/password-update.php @@ -7,7 +7,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $password = $_POST['password']; - $repeat = $_POST['repeat']; + $repeat = $_POST['repeat']; Validate::isPassword($password) or $errors[] = "Password must be 6 or more characters"; @@ -30,8 +30,8 @@
- - + + diff --git a/register.php b/register.php --- a/register.php +++ b/register.php @@ -31,7 +31,6 @@ ], $errors); if ($id !== false) { $App->getSession()->login($id, true); - $App->getSession()->setFlash("Thanks for registering!"); redirect("index.php"); } } diff --git a/settings.php b/settings.php --- a/settings.php +++ b/settings.php @@ -14,7 +14,6 @@ Validate::isName($form['name']) or $errors[] = "Name must be 2-20 letters using [A-z0-9\_]"; Validate::isEmail($form['email']) or $errors[] = "Email format not recognized"; Validate::isAcceptableHTML($form['style']) or $errors [] = "Style has a forbidden HTML tag"; - !empty($form['cover']) or $errors[] = "Tell us a few words about you"; if (!count($errors)) { if ($App->getUser()->update($form, $errors)) {