diff --git a/srv/index.php b/srv/index.php
index 90caf9f..8f04419 100644
--- a/srv/index.php
+++ b/srv/index.php
@@ -125,6 +125,23 @@ function bbcode_to_html($text, $settings)
'/>>(.*)\r\n/'
);
+/*
+>> 123
+and
+
+'$1 in /s/$2'
+
+the regex could probably be tweaked to have an actual end (a dot or something), although compromising usability r smthin
+
+so:
+'/^>> ([0-9]+) in (?:/)?s/(.+)$/gm' (also, space is a literal character, don't backslash it)
+
+it checks for '>>' being the start of the string, then captures whatever number is there ('+' captures if there is one or more)
+'(?:/)?' just makes the initial '/' optional, i am not sure if it gets added to the capture groups but it really shouldn't
+'(.+)' at the (somewhat) end just takes anything, although it should be limited to the sub char. limit (by '{1,}' (change the '1' with the max))
+the '$' makes sure it finishes with that, and the '/gm' is regex flags for "global multiline"
+
+*/
$replace = array (
'$2',
'$2',
@@ -826,13 +843,14 @@ function check_org_id_exists($db, $sub, $org_id)
FROM threads
WHERE sub = '$sub'
AND shadow = 'no'
- AND post_id = '$org_id'");
+ AND org_id = '$org_id'");
$result = $statement->execute();
$counter = 0;
while ($row = $result->fetchArray(SQLITE3_NUM)) {
$counter++;
+ break;
}
if ( ($counter < 1) ) {
diff --git a/srv/mob/index.php b/srv/mob/index.php
index 769ab15..639d552 100644
--- a/srv/mob/index.php
+++ b/srv/mob/index.php
@@ -429,13 +429,14 @@ function check_org_id_exists($db, $sub, $org_id)
FROM threads
WHERE sub = '$sub'
AND shadow = 'no'
- AND post_id = '$org_id'");
+ AND org_id = '$org_id'");
$result = $statement->execute();
$counter = 0;
while ($row = $result->fetchArray(SQLITE3_NUM)) {
$counter++;
+ break;
}
if ( ($counter < 1) ) {