Bugfix for prefix-routed chats + make rearranging frames change message sorting direction
This commit is contained in:
20
chat.php
20
chat.php
@ -1329,11 +1329,25 @@ function send_linkfilter($arg=''){
|
||||
}
|
||||
|
||||
function send_frameset(){
|
||||
global $H, $I, $U, $language;
|
||||
global $H, $I, $U, $db, $language;
|
||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\"><html><head>$H[meta_html]";
|
||||
echo '<title>'.get_setting('chatname').'</title>';
|
||||
print_stylesheet();
|
||||
echo '</head>';
|
||||
if(isset($_REQUEST['sort'])){
|
||||
if($_REQUEST['sort']==1){
|
||||
$U['sortupdown']=1;
|
||||
$U['nocache']=1;
|
||||
}else{
|
||||
$U['sortupdown']=0;
|
||||
}
|
||||
$stmt=$db->prepare('UPDATE ' . PREFIX . 'sessions SET sortupdown=?, nocache=? WHERE nickname=?;');
|
||||
$stmt->execute([$U['sortupdown'], $U['nocache'], $U['nickname']]);
|
||||
if($U['status']>1){
|
||||
$stmt=$db->prepare('UPDATE ' . PREFIX . 'members SET sortupdown=?, nocache=? WHERE nickname=?;');
|
||||
$stmt->execute([$U['sortupdown'], $U['nocache'], $U['nickname']]);
|
||||
}
|
||||
}
|
||||
if($U['sortupdown']){
|
||||
$bottom='#bottom';
|
||||
}else{
|
||||
@ -1793,7 +1807,7 @@ function send_profile($arg=''){
|
||||
}
|
||||
echo "<tr><td><table class=\"left-table\"><tr><th>$I[ignore]</th><td class=\"right\">";
|
||||
echo "<select name=\"ignore\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||
$stmt=$db->prepare('SELECT poster, style FROM ' . PREFIX . 'messages INNER JOIN ' . PREFIX . 'sessions ON (messages.poster=sessions.nickname) WHERE poster!=? AND (status<=? OR status<=3) AND poster NOT IN (SELECT ign FROM ' . PREFIX . 'ignored WHERE ignby=?) GROUP BY poster;');
|
||||
$stmt=$db->prepare('SELECT poster, style FROM ' . PREFIX . 'messages INNER JOIN ' . PREFIX . 'sessions ON (' . PREFIX . 'messages.poster=' . PREFIX . 'sessions.nickname) WHERE poster!=? AND (status<=? OR status<=3) AND poster NOT IN (SELECT ign FROM ' . PREFIX . 'ignored WHERE ignby=?) GROUP BY poster;');
|
||||
$stmt->execute([$U['nickname'], $U['status'], $U['nickname']]);
|
||||
while($nick=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
echo '<option value="'.htmlspecialchars($nick[0])."\" style=\"$nick[1]\">".htmlspecialchars($nick[0]).'</option>';
|
||||
@ -3439,6 +3453,8 @@ function init_chat(){
|
||||
}elseif($_REQUEST['supass']!==$_REQUEST['supassc']){
|
||||
$suwrite=$I['noconfirm'];
|
||||
}else{
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
if(DBDRIVER===0){//MySQL
|
||||
$memengine=' ENGINE=MEMORY';
|
||||
$diskengine=' ENGINE=InnoDB';
|
||||
|
@ -328,7 +328,7 @@ $T=array(
|
||||
'fatalerror' => 'Fataler Fehler',
|
||||
'prevmatch' => 'Ihr regex war folgender',
|
||||
'matchtoolong' => 'Ihr Match war zu lang. Sie können max. 255 Zeichen benutzen. Versuchen Sie diesen aufzuteilen.',
|
||||
'nocache' => 'Neulade-Hack für alte Browser hinzufügen.<br>Aktivieren Sie dies, falls Neuladen nicht funktioniert oder<br>für automatisches scrollen, wenn Narchrichten von oben nach unten sortiert sind.',
|
||||
'nocache' => 'Neulade-Hack für alte Browser hinzufügen.<br>Aktivieren Sie dies, falls Neuladen nicht funktioniert<br>oder für automatisches scrollen.',
|
||||
'disablepm' => 'Private Nachrichten deaktivieren',
|
||||
'disablechat' => 'Chat deaktivieren',
|
||||
'disabletext' => 'Chat deaktiviert Nachricht (html)',
|
||||
@ -355,7 +355,7 @@ $T=array(
|
||||
'enablegreeting' => 'Zeige eine Begrüßungsnachricht an, befor die Nachrichten geladen werden',
|
||||
'unban' => 'Entsperren',
|
||||
'sortupdown' => 'Nachrichten von oben nach unten sortieren',
|
||||
'sortframe' => 'Frames sortieren',
|
||||
'sortframe' => 'Umordnen',
|
||||
'cs' => 'Groß-/Kleinschreibung beachten',
|
||||
'hidechatters' => 'Teilnehmerlist ausblenden',
|
||||
);
|
||||
|
@ -328,7 +328,7 @@ $I=array(
|
||||
'fatalerror' => 'Fatal error',
|
||||
'prevmatch' => 'Your match was as follows',
|
||||
'matchtoolong' => 'Your match was too long. You can use max. 255 characters. Try splitting it up.',
|
||||
'nocache' => 'Add refresh hack for old browsers.<br>Enable, if refreshing doesn\'t work or<br>for autoscrolling when sorting messages top to bottom.',
|
||||
'nocache' => 'Add refresh hack for old browsers.<br>Enable, if refreshing doesn\'t work<br>or for autoscrolling.',
|
||||
'disablepm' => 'Disable private messages',
|
||||
'disablechat' => 'Disable chat',
|
||||
'disabletext' => 'Chat disabled message (html)',
|
||||
@ -355,7 +355,7 @@ $I=array(
|
||||
'enablegreeting' => 'Show a greeting message before showing the messages',
|
||||
'unban' => 'Unban',
|
||||
'sortupdown' => 'Sort messages from top to bottom',
|
||||
'sortframe' => 'Sort frames',
|
||||
'sortframe' => 'Rearrange',
|
||||
'cs' => 'Case sensitive',
|
||||
'hidechatters' => 'Hide list of chatters',
|
||||
);
|
||||
|
Reference in New Issue
Block a user