Welcome to Geeklog, Anonymous Monday, June 17 2024 @ 03:49 pm EDT

Geeklog Forums

Find all postings: filemanagement

Status: offline


Forum User
Full Member
Registered: 06/09/03
Posts: 162
Location:Rotterdam & Bonn
In the profile one can 'find all postings' of the user.
If there is a submitted file pending, filemanagement generates a sql error.

There is no $cid filled in, so the class Xoopstree queries with an invalid sql (cid=).

Solution in singlefile.php:

Change the coding as folows:

Text Formatted Code

$display .= COM_siteHeader('menu');
$display .= COM_startBlock("<b>". $LANG_FILEMGMT['plugin_name'] ."</b>");
$lid = $HTTP_GET_VARS['lid'];

$result=DB_query("SELECT d.lid, d.cid, d.title, d.url, d.homepage, d.version, d.size, d.logourl, d.submitter, d.status, d.date, d.hits, d.rating, d.votes, d.comments, t.description FROM {$_FM_TABLES['filemgmt_filedetail']} d, {$_FM_TABLES['filemgmt_filedesc']} t WHERE d.lid=$lid AND d.lid=t.lid AND status>0");
list($lid, $cid, $title, $url, $homepage, $version, $size, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $description)=DB_fetchARRAY($result);

$myts = new MyTextSanitizer; // MyTextSanitizer object
$mytree = new XoopsTree($_DB_name,$_FM_TABLES['filemgmt_cat'],"cid","pid");

if (empty($cid)) {
   $display .= _MD_ALLPENDING;
} else {
$display .= "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='center'>n";
$display .= "<table width='100%' cellspacing='1' cellpadding='2' border='0' class='filemgmtbg3'><tr><td>n";

And at the end of the file:

Text Formatted Code

echo $retval;
$display .= "</td></tr></table>n";
$display .= "</td></tr></table>n";


$display .= "<br>";
$display .= COM_endBlock();
$display .= COM_siteFooter();
echo $display;

All times are EDT. The time is now 03:49 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content