Small fixes and things
This commit is contained in:
parent
3bf3b486bf
commit
f717080e8a
3 changed files with 9 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -12,3 +12,6 @@ docker-run: data/
|
|||
FORCE:
|
||||
cp -r src/data ./
|
||||
chmod 777 data
|
||||
|
||||
docker-run-dev: data/ src/
|
||||
docker run -v $(current_dir)src/:/var/www/html/ -v $(current_dir)data/:/var/www/html/data/ -p 8080:80 snuffler/snuffler-web:dev
|
|
@ -102,7 +102,7 @@ class DataBase extends SQLite3 {
|
|||
|
||||
function addPersona($userid, $handle, $name, $about=NULL, $colour=NULL) {
|
||||
$id = hexdec(uniqid());
|
||||
$sql = "INSERT INTO personas (id, userid, handle, name, colour) VALUES ('$id', '$userid', '$handle', '$about', '$colour');";
|
||||
$sql = "INSERT INTO personas (id, userid, handle, name, about, colour) VALUES ('$id', '$userid', '$handle', '$name', '$about', '$colour');";
|
||||
$ret = $this->exec($sql);
|
||||
if(!$ret) {
|
||||
die($this->lastErrorMsg());
|
||||
|
@ -125,6 +125,9 @@ class DataBase extends SQLite3 {
|
|||
return false;
|
||||
}
|
||||
$dbhash = $ret[0];
|
||||
if(!$dbhash) {
|
||||
return false;
|
||||
}
|
||||
return password_verify($password, $dbhash);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ $posts = array_reverse($database->getPosts());
|
|||
foreach($posts as $post) {
|
||||
echo '<div class="post">';
|
||||
echo '<div class="postinfo">';
|
||||
echo '<strong>' . $post["user.name"] . '</strong>';
|
||||
echo '<br><small>@' . $post["user.handle"] . '</small>';
|
||||
echo $post["user.name"] . ': <strong>' . $post["persona.name"] . '</strong>';
|
||||
echo '<br><small>@' . $post["user.handle"] . '@' . $post["persona.handle"] . '</small>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<p>' . $post["post.text"] . '</p>';
|
||||
|
|
Loading…
Reference in a new issue