From 3ae2abb43290369e9e32bcff744e1cecf5958818 Mon Sep 17 00:00:00 2001 From: jeanpierre Date: Sun, 6 Jan 2019 12:42:38 +0100 Subject: [PATCH 1/4] code typo --- .../upload/include_forum/upload.func.forum.php | 9 +++------ .../upload/include_forum/upload_forum2.php | 18 ++++++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/revolution_16/modules/upload/include_forum/upload.func.forum.php b/revolution_16/modules/upload/include_forum/upload.func.forum.php index 8810d9540..f429f17e9 100644 --- a/revolution_16/modules/upload/include_forum/upload.func.forum.php +++ b/revolution_16/modules/upload/include_forum/upload.func.forum.php @@ -36,12 +36,10 @@ function load_mimetypes () { function getAttachments ($apli, $post_id, $att_id=0, $Mmod=0 ) { global $upload_table; $query = "SELECT att_id, att_name, att_type, att_size, att_path, inline, compteur, visible FROM $upload_table WHERE apli='$apli' && post_id='$post_id'"; - if ($att_id>0) { + if ($att_id>0) $query .= " AND att_id=$att_id"; - } - if (!$Mmod) { + if (!$Mmod) $query .= " AND visible=1"; - } $query .= " ORDER BY att_type,att_name"; $result = sql_query($query); $i=0; @@ -93,9 +91,8 @@ function insertAttachment ($apli, $IdPost, $IdTopic, $IdForum, $name, $path, $in $stamp = time(); $sql = "INSERT INTO $upload_table VALUES ('', '$IdPost', '$IdTopic','$IdForum', '$stamp', '$name', '$type', '$size', '$path', '1', '$apli', '0', '$visible_forum')"; $ret = sql_query($sql); - if (!$ret) { + if (!$ret) return -1; - } return sql_last_id (); } /************************************************************************/ diff --git a/revolution_16/modules/upload/include_forum/upload_forum2.php b/revolution_16/modules/upload/include_forum/upload_forum2.php index 20d2057b7..dafe0c78f 100644 --- a/revolution_16/modules/upload/include_forum/upload_forum2.php +++ b/revolution_16/modules/upload/include_forum/upload_forum2.php @@ -54,19 +54,19 @@ if (array_key_exists(11,$cookie)) $skin=$cookie[11]; } echo ' - '; + '; if($skin!='') { echo ' - - '; + + '; } else echo ' - '; + '; echo ' - ';//hardcoded lol + ';//hardcoded lol echo import_css($theme, $language, $site_font, '',''); echo ' - + '; // Moderator @@ -104,12 +104,10 @@ function forum_upload() { list($sum)=sql_fetch_row(sql_query("SELECT SUM(att_size ) FROM $upload_table WHERE apli = '$apli' && post_id = '$IdPost'")); // gestion du quota de place d'un post - if (($MAX_FILE_SIZE_TOTAL - $sum)<$MAX_FILE_SIZE) { + if (($MAX_FILE_SIZE_TOTAL - $sum)<$MAX_FILE_SIZE) $MAX_FILE_SIZE = $MAX_FILE_SIZE_TOTAL - $sum; - } include "modules/upload/include/fileupload.php"; -// $thanks_msg=''; -settype($thanks_msg,'string'); + settype($thanks_msg,'string'); // Récupération des valeurs de PCFILE global $HTTP_POST_FILES, $_FILES; From c4d6717648410b8392f89359be079668f143e7db Mon Sep 17 00:00:00 2001 From: jeanpierre Date: Sun, 6 Jan 2019 12:43:10 +0100 Subject: [PATCH 2/4] theme classes --- revolution_16/themes/Rev2016/footer.php | 4 ++-- revolution_16/themes/Rev2016/header.php | 4 ++-- revolution_16/themes/npds-boost_sk/footer.php | 8 ++++---- revolution_16/themes/npds-boost_sk/header.php | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/revolution_16/themes/Rev2016/footer.php b/revolution_16/themes/Rev2016/footer.php index 970606159..93fa41bd6 100644 --- a/revolution_16/themes/Rev2016/footer.php +++ b/revolution_16/themes/Rev2016/footer.php @@ -21,7 +21,7 @@ case '2': echo ' -
'; +
'; leftblocks(); rightblocks(); echo ' @@ -31,7 +31,7 @@ default : echo '
-
'; +
'; leftblocks(); rightblocks(); echo ' diff --git a/revolution_16/themes/Rev2016/header.php b/revolution_16/themes/Rev2016/header.php index db66fa77c..215091e31 100644 --- a/revolution_16/themes/Rev2016/header.php +++ b/revolution_16/themes/Rev2016/header.php @@ -70,11 +70,11 @@ break; case '2': echo ' -
'; +
'; break; default: echo ' -
'; +
'; break; } ?> \ No newline at end of file diff --git a/revolution_16/themes/npds-boost_sk/footer.php b/revolution_16/themes/npds-boost_sk/footer.php index d7ef5cd45..a5956c13d 100644 --- a/revolution_16/themes/npds-boost_sk/footer.php +++ b/revolution_16/themes/npds-boost_sk/footer.php @@ -31,7 +31,7 @@
'; colsyst('#col_RB'); echo ' -
'."\n"; +
'."\n"; rightblocks(); echo '
@@ -43,13 +43,13 @@
'; colsyst('#col_LB'); echo' -
'."\n"; +
'."\n"; leftblocks(); echo '
'; colsyst('#col_RB'); echo' -
'."\n"; +
'."\n"; rightblocks(); echo '
@@ -61,7 +61,7 @@
'; colsyst('#col_LB'); echo' -
'."\n"; +
'."\n"; leftblocks(); echo '
diff --git a/revolution_16/themes/npds-boost_sk/header.php b/revolution_16/themes/npds-boost_sk/header.php index c93fc43ae..dfc96bfc8 100644 --- a/revolution_16/themes/npds-boost_sk/header.php +++ b/revolution_16/themes/npds-boost_sk/header.php @@ -97,7 +97,7 @@ function colsyst($coltarget) { case '1': colsyst('#col_LB'); echo ' -
'; +
'; leftblocks(); echo '
@@ -110,13 +110,13 @@ function colsyst($coltarget) { case '3': colsyst('#col_LB'); echo ' -
'; +
'; leftblocks(); echo '
'; colsyst('#col_RB'); echo' -
'; +
'; rightblocks(); echo '
@@ -129,7 +129,7 @@ function colsyst($coltarget) { case '5': colsyst('#col_RB'); echo ' -
'; +
'; rightblocks(); echo '
@@ -138,7 +138,7 @@ function colsyst($coltarget) { default: colsyst('#col_LB'); echo ' -
'; +
'; leftblocks(); echo '
From 1038f8c35243a010b0b4b5ac039d023e141158a3 Mon Sep 17 00:00:00 2001 From: jeanpierre Date: Sun, 6 Jan 2019 12:45:32 +0100 Subject: [PATCH 3/4] mep + interface +code --- .../modules/upload/include/minigf.php | 98 +++++++++---------- 1 file changed, 45 insertions(+), 53 deletions(-) diff --git a/revolution_16/modules/upload/include/minigf.php b/revolution_16/modules/upload/include/minigf.php index a4435077b..a314a4a71 100644 --- a/revolution_16/modules/upload/include/minigf.php +++ b/revolution_16/modules/upload/include/minigf.php @@ -92,20 +92,13 @@ function uploadFile(f) { f.pcfile.focus(); } } -/* -function confirmSendFile(f) { - if (window.confirm("")) { - uploadFile(f); - } -} - */ function confirmSendFile(f) { bootbox.confirm("", function(result) { if (result === true) { uploadFile(f); - } + } }); } @@ -128,14 +121,14 @@ function(result) { settype($att_table,'string'); settype($thanks_msg,'string'); echo ' -
- - - - - - - '; + + + + + + + + '; $tsz=0; $att=getAttachments ($apli,$IdPost,0 ,$Mmod); @@ -145,22 +138,21 @@ function(result) { if (is_array($att)) { $att_count=count($att); $display_att=true; - if ($Mmod) { + if ($Mmod) $vizut=''.upload_translate("Visibilité").''; - } $att_table=' - - - - - - - - - '.$vizut.' - - - '; +
'.upload_translate("Fichier").''.upload_translate("Type").''.upload_translate("Taille").''.upload_translate("Affichage intégré").'
+ + + + + + + + '.$vizut.' + + + '; $Fichier = new FileManagement; // essai class PHP7 $visu=''; for ($i=0; $i<$att_count; $i++) { @@ -172,50 +164,48 @@ function(result) { // This mime-type can't be displayed inline echo ''; $inline_box='--'; - } else { + } else $inline_box=getListBox("inline_att[$id]", $inline_list, $att[$i]["inline"]); - } if ($Mmod) { $visu=''; $visible_list.=$id.','; } $att_table.=' - - - - - - - '.$visu.' - '; + + + + + + + '.$visu.' + '; } // $total_sz = $Fichier->Pretty_Size($tsz); $total_sz = $Fichier->file_size_format($tsz,1); $visu_button=''; echo ''; $att_inline_button=''; - if ($Mmod) { + if ($Mmod) $visu_button=''; - } $att_table.=' - -
'.upload_translate("Fichier").''.upload_translate("Type").''.upload_translate("Taille").''.upload_translate("Affichage intégré").'
'.getCheckBox ("visible_att[]", $id, ($att[$i]["visible"]==1)?$id:-1, "").'
'.getCheckBox("del_att[]", $id, 0, '').''.$att[$i]['att_name'].''.$att[$i]['att_type'].''.$sz.''.$inline_box.'
'.getCheckBox("del_att[]", $id, 0, '').''.$att[$i]['att_name'].''.$att[$i]['att_type'].''.$sz.''.$inline_box.'
-
- -
'.upload_translate("Total :").' '.$total_sz.'
-
'.$att_inline_button.'
-
'.$visu_button.'
-
'; + + +
+ +
'.upload_translate("Total :").' '.$total_sz.'
+
'.$att_inline_button.'
+
'.$visu_button.'
+
'; } $att_upload_table='

'.upload_translate("Extensions autorisées").' : '.$bn_allowed_extensions.'

- +
- +
@@ -224,9 +214,11 @@ function(result) {
'; - $att_form='
+
+ +
'.$thanks_msg; $att_form.=$att_upload_table.$att_table; echo $att_form.' From f67bfd2b742de0cd8cedab3fec797440fc62558a Mon Sep 17 00:00:00 2001 From: jeanpierre Date: Sun, 6 Jan 2019 16:22:07 +0100 Subject: [PATCH 4/4] notice when shortuser --- revolution_16/mainfile.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/revolution_16/mainfile.php b/revolution_16/mainfile.php index 41dd55515..20d54cae8 100644 --- a/revolution_16/mainfile.php +++ b/revolution_16/mainfile.php @@ -2829,8 +2829,9 @@ function fab_espace_groupe($gr, $t_gr, $i_gr) { $useroutils .= ''.translate("Visit this Website").''; if ($mns) $useroutils .= ''.translate("Visit the Mini Web Site !").''; - if ($posterdata_extend[$ch_lat] !='') - $useroutils .= ''.translate("Location").''; + if (!$short_user) + if ($posterdata_extend[$ch_lat] !='') + $useroutils .= ''.translate("Location").''; $conn= ''; if (!$user_avatar) @@ -2852,7 +2853,10 @@ function fab_espace_groupe($gr, $t_gr, $i_gr) { $li_mb.= '
  • - '.$conn.''.$useroutils.'
    \'>avatar'.$uname.' + '.$conn.''.$useroutils.'
  • \'>avatar'.$uname.'
    '; $count++;