#75 Forum Categories broken

Current_Release
closed
Code/Logic (49)
5
2012-09-15
2004-04-27
tbolick
No

It appears that some code in the Create Forum
Categories is broken. It does not correctly create the
category files.

The following line:

if (grep(/^$access$/, keys %usr) == 1) { print FH

"$name\n$access\n"; }

keeps the file from having the data written to it.

I think that regardless of the outcome of the if
statement, at least the $name should be written to the
file. So perhaps an else statement would be the best
fix, but for the moment, changing the above line to read:

print FH "$name\n$access\n";

seems to work.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    OK. Sorted most of this out appart from the articles problem.

    The 'fix' to my forums problem took two steps.

    Change

    if (grep(/^$access$/, keys %usr) == 1) { print

    FH "$name\n$access\n"; }

    to
    print FH "$name\n$access\n";

    admin.pl as stated elsewhere.

    and chmod httpd.siteXX -R db/

    but my articles problem remains! Will investigate further to
    see if there might be a similar mod to the print FH one

    Cheers

    Emyr em@preseli.com

     
  • Nobody/Anonymous

    Logged In: NO

    Hi,
    I fix with another solution,
    in place of :
    if (grep(/^$access$/, keys %usr) == 1) {
    print FH "$name\n$access\n";
    }

    I set :
    if (grep(/^$access$/, values %usr) == 1) {
    print FH "$name\n[$access]\n";
    }

    I gets the values of the hash tables not the keys.

    Hopes that it will serve :-)

    Bye

     
  • Michael Romanov

    Michael Romanov - 2005-03-22

    Logged In: YES
    user_id=1244003

    I had this problem, too.

    On creating a new forum category, YaWPS 0.7 created a file
    *.cat for it but didn't write to it category name and access info
    is it should do. In result, category information didn't appear
    correctly.

    I fixed the problem by changing line 791 of admin.cgi from:

    if (grep(/^$access$/, keys %usr) == 1) { print
    FH "$name\n$access\n"; }

    to:

    if (grep(/^$access$/, values (%usr)) == 1) { print
    FH "$name\n$access\n"; }

     
  • Adrian Heissler

    Adrian Heissler - 2005-07-19

    Logged In: YES
    user_id=294842

    fixed in admin.cgi,v 1.2.2.3

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks