fix(webmentions): call to undefined function getMentionsFromTwt()

This commit is contained in:
eapl.mx 2024-12-14 14:34:54 -06:00
parent 97a97122bb
commit d3ce716e9a
No known key found for this signature in database
2 changed files with 30 additions and 38 deletions

View file

@ -1,4 +1,5 @@
<?php
require_once "libs/twtxt.php";
// Send webmentions (TODO: move to it own file?)
$new_mentions = getMentionsFromTwt($twt);

View file

@ -2,7 +2,6 @@
// TODO: Give a warning if the file is not found
$config = parse_ini_file('private/config.ini');
if ($config['debug_mode']) {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
@ -13,19 +12,13 @@ $txt_file_path = $config['txt_file_path'];
$public_txt_url = $config['public_txt_url'];
$timezone = $config['timezone'];
require_once('libs/session.php');
// if (!has_valid_session()) {
// header('Location: /login.php');
// exit();
// }
require_once 'libs/session.php';
if (!isset($_SESSION['password'])) {
header('Location: ./login');
exit();
}
if (isset($_POST['submit'])) {
$new_post = filter_input(INPUT_POST, 'new_post');
$new_post = trim($new_post);
@ -91,11 +84,10 @@ if (isset($_POST['submit'])) {
//exit;
} else {
require_once("partials/base.php");
require_once "partials/base.php";
$title = "New post - ".$title;
include_once 'partials/header.php';
if (!isset($textareaValue)) {
$textareaValue = '';
}
@ -117,7 +109,6 @@ if (isset($_GET['hash'])) {
include_once 'partials/timeline.php';
}
?>
<article id="new_twt">