1
Venezia
xDirectory Module bugfix for Modify Listing
  • 2003/11/10 2:05

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


xDirectory module not updating modified fields correctly.

1. From user side:

Reason: missing variable assignments from posted values.

Solution:
File: modlink.php
lines 64-68 replace with:

$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$logourl = $myts->makeTboxData4Save($HTTP_POST_VARS["logourl"]);
$cid = intval($HTTP_POST_VARS["cid"]);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$address = $myts->makeTboxData4Save($HTTP_POST_VARS["address"]);
$address2 = $myts->makeTboxData4Save($HTTP_POST_VARS["address2"]);
$city = $myts->makeTboxData4Save($HTTP_POST_VARS["city"]);
$state = $myts->makeTboxData4Save($HTTP_POST_VARS["state"]);
$zip = $myts->makeTboxData4Save($HTTP_POST_VARS["zip"]);
$country = $myts->makeTboxData4Save($HTTP_POST_VARS["country"]);
$phone = $myts->makeTboxData4Save($HTTP_POST_VARS["phone"]);
$fax = $myts->makeTboxData4Save($HTTP_POST_VARS["fax"]);
$email = $myts->makeTboxData4Save($HTTP_POST_VARS["email"]);
$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["description"]);




2. From admin side:

Reason: Too many parameters in sprintf within SQL statement - db is trying to find a record id = time().

Solution:
File: /admin/index.php
Function: changeModReq()

Approx line 742 ~ Change the main update statement to the following (omit status param from sprintf param list):

$sql= sprintf("UPDATE %s SET cid = %u, title = '%s', address = '%s', address2 = '%s', city = '%s', state = '%s', zip = '%s', country = '%s', phone = '%s', fax = '%s', email = '%s', url = '%s', logourl = '%s', status = 2, date = %u WHERE lid = %u", $xoopsDB->prefix("xdir_links"), $cid, $title, $address, $address2, $city, $state, $zip, $country, $phone, $fax, $email, $url, $logourl, time(), $lid);

Note: the description field is handled in seperate statement, which appears ok.

2
Anonymous
Re: xDirectory Module bugfix for Modify Listing
  • 2003/11/10 8:45

  • Anonymous

  • Posts: 0

  • Since:


I don't know if this bug was mentioned before in a posting. Some parts of the approve form are missing.

In admin/index.php there is the function "listNewLinks()"

Quote:
echo "<textarea name=description cols=\"60\" rows=\"5\">$description</text>\n";


The closing tag for textarea must be textarea and not text.

3
Venezia
Re: xDirectory Module bugfix for Modify Listing
  • 2003/11/10 9:28

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Also in same file: closing textarea tag needs fixed in the function modLink().

4
crookedbranc
Re: xDirectory Module bugfix for Modify Listing

You guys saved my day -thanks!

Login

Who's Online

260 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 260


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits