phpWebLog

find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (894)
  • Announcements (20)
  • Development (516)
  • Mods & Hacks (28)


  • phpWebLog
  • Latest Release - 0.5.3 (BETA)
  • Latest Stable - 0.5.2
  • ChangeLog
  • TODO / Roadmap
  • BUGS

    CVS WEB

  • New XL fork 0.5.2
  • Unstable branch 0.5.3

  • For development discussions and for general support, join the phpWebLog mailing list

    phpWebLog needs active developers to help fix bugs. If you are interested, send me your SourceForge login information for CVS access.


    Last 5 Comments
  • Chaging the Time Zone in phpWebLog (Beth)
  • IP blocking? (Anonymous)
  • Need help (Razor)
  • Need help (Razor)
  • Chaging the Time Zone in phpWebLog (FranKi)


  • Bug and Fix in "brief" topics
    Posted under General by mochaexpress on Tuesday February 06 2001 @ 02:31AM EST

    in ./include/blocks.inc.php

    look in the section where it's doing the "topics block":

    ---cut--
    # topics block
    if ($CONF["Topics"]>0 && $align==$aln) {
    $VAR["Heading"] = _TOPICS;
    $VAR["Content"] = "";
    $sql = "SELECT * FROM T_Topics";
    if ($CONF["TopicSort"]=="asc") {
    $sql .= " ORDER BY Topic ASC";
    } elseif ($CONF["TopicSort"]=="desc") {
    $sql .= " ORDER BY Topic DESC";
    }
    $topics_result = @mysql_query($sql,$db);
    $topics_nrows = @mysql_num_rows($topics_result);
    if ($CONF["TopicSort"]=="brief") {
    $numtops = $topics_nrows;
    $topics_nrows = 5;
    }
    ---cut---
    the tests for brief will fail if you have less than 5 topics with a db error when it encounters F_Count() later in the for loop. for example, if you have only 4 topics, the for loop will keep going 'til it reaches 5. at which point it will fail at the F_Count() function cause there is no 5th record.

    here is the fix:

    ---cut---
    if ($CONF["TopicSort"]=="brief") {
    $numtops = $topics_nrows;
    if ($topics_nrows > 4) {
    $topics_nrows = 5;
    }
    }
    ---cut---

    this parameter should technically be a user set number. sorry my copy is extremely modified to provide a proper diff. ;-(




    < bug &amp; fix | DBI and User, Group, Permissions >

    jason writes on Tuesday February 06 2001 @ 11:41AM EST: [ reply | parent ]
    Thanks!
    Post a Comment
    Name:
    Email:
    URL:
      Remember my information (uses cookies)
      I would rather be anonymous
    Comment:
    * Your email will not be made public.
    Save As:

    SourceForge
    SourceForge is providing us a mailing list , documentation and a CVS tree.

    SourceForge Logo


    PHP.net
  • Automatic Mirror Select
  • PHP 4.3.2RC4 Released
  • PHP 4.3.2RC3 Released
  • ActiveState Active Awards
  • Country Detection
  • PHP 4.3.2RC2 Released
  • My PHP.net
  • PHP 4.3.2RC1 Released
  • Grant Program
  • Set your own language preference

  • PHPBuilder
  • The Benefits of Using Objects with Databases
  • Interfacing with COM objects under Windows
  • Dynamic XML Conversion Using the SAX Parser
  • Arrays 101
  • Introduction to PHP5
  • Installing PHP-GTK on Linux
  • Installing PHP under BadBlue Web Server
  • Installing PHP under Xitami
  • A Test To See If You Write Sloppy Software
  • Switchbox


  • phpWebLog: A PHP News and Content Management System
    Copyright (C) 2000-2002, Jason Hines / Eye Integrated Communications