This commit is contained in:
Murphy 2024-05-28 21:03:16 -04:00
parent d0e3bd0767
commit 268dfc9876
Signed by: freya
GPG key ID: 744AB800E383AE52
7 changed files with 28 additions and 23 deletions

View file

@ -33,14 +33,4 @@ class Format_model extends Model {
return $name;
}
/**
* Formats a date
* @param string $date - the data in RFC3999 format
* @returns the formatted date
*/
public function date($date) {
$date=date_create($date);
return date_format($date, "Y-m-d H:i");
}
}

View file

@ -104,6 +104,16 @@ class Main_model {
return NULL;
}
/**
* Formats a date
* @param string $date - the data in RFC3999 format
* @returns the formatted date
*/
public function date($date) {
$date=date_create($date);
return date_format($date, "Y-m-d D H:m");
}
}
?>

View file

@ -181,7 +181,7 @@
</tr>
<tr>
<td><strong><?=ucfirst(lang('about_general_birth_date'))?></strong></td>
<td><?=$user['birth_date']?></td>
<td><?=$this->main->date($user['birth_date'])?></td>
</tr>
</table>
<h1><?=ucfirst(lang('about_stats'))?></h1>
@ -204,11 +204,11 @@
</tr>
<tr>
<td><strong><?=ucfirst(lang('about_stats_joined'))?></strong></td>
<td><?=$user['created']?></td>
<td><?=$this->main->date($user['created'])?></td>
</tr>
<tr>
<td><strong><?=ucfirst(lang('about_stats_seen'))?></strong></td>
<td><?=$user['seen']?></td>
<td><?=$this->main->date($user['seen'])?></td>
</tr>
</table>
</div>

View file

@ -8,7 +8,7 @@
<div class="ml col sub-card">
<div class="row">
<strong><?=$format_model->name($user)?></strong>
<span class="dim ml"><?=$format_model->date($comment['created'])?></span>
<span class="dim ml"><?=$this->main->date($comment['created'])?></span>
</div>
<?=$comment['content']?>
</div>

View file

@ -5,7 +5,7 @@
<?=pfp($user)?>
<div class="col ml">
<strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong>
<span class="dim"><?=$post['created']?></span>
<span class="dim"><?=$this->main->date($post['created'])?></span>
</div>
</div>
<p>

View file

@ -19,14 +19,19 @@ require($webroot . '/core/loader.php');
require($webroot . '/core/router.php');
session_save_path('/var/lib/php/session');
session_set_cookie_params(
60 * 60 * 24 * 365, // lifetime (seconds),
'/', // path
NULL, // domain,
FALSE, // secure,
FALSE // http only
);
session_start();
setcookie(
session_name(),
session_id(),
array(
'expires' => time() + 60*60*24*7,
'path' => '/',
'domain' => NULL,
'secure' => FALSE,
'httponly' => FALSE,
'samesite' => 'Lax'
)
);
function __init() {
$load = new Loader();

View file

@ -1,6 +1,6 @@
<?php /* Copyright (c) 2024 Freya Murphy */
$lang['version'] = 'Version 2.0.5';
$lang['version'] = 'Version 2.0.6';
$lang['copyright'] = 'Freya Murphy © 2024';
// Navigation Bar Lang