Menu

#7 News deleting impossible.

open
nobody
Code (6)
5
2005-03-13
2005-03-13
Anonymous
No

I've found the deletion of a News item in the QMS
impossible while logged in with the main admin account.
(Problem might exist on other accounts if applicable too.)

Discussion

  • Nobody/Anonymous

    Logged In: NO

    In fact it deletes the quote with the same id as the news item
    you wanted to delete. A bad copy/paste.

     
  • Patrick Fish

    Patrick Fish - 2005-03-21

    Logged In: YES
    user_id=242795

    Try replacing the news_delete function in your index.php
    with this workaround I came up with..

    /*
    ####################
    NEWS DELETE
    ?news_delete at the end of a uri: Admin only function, lets
    an admin delete a news post from the database completely.
    ####################
    */
    function news_delete()
    {
    function content()
    {
    // if(login_check(1)){
    $nID = $_GET['id'];
    // if($_GET['vote']){
    include('config.php');
    $sql = "DELETE FROM `" .
    $newstable . "` WHERE `id` = '" . $nID . "'";
    database_connect($sql);
    echo $admin_news_del_confirm;
    // }
    // else {
    // include('config.php');
    // $sql = "SELECT `news` FROM
    `" . $newstable . "` WHERE `id` = '" . $nID . "'";
    // $result =
    database_connect($sql);
    // while($row =
    mysql_fetch_assoc($result)){
    // echo "Are you sure
    you wish to delete news item \"" . substr($row['news'], 0,
    10) . "...\"?<br />";
    // echo "<a
    href=\"?adelete&vote=1&id=" . $nID . "\"
    style=\"text-decoration: none\">[Yes]</a>&nbsp;";
    // echo "<a href=\"./\"
    style=\"text-decoration: none\">[No]</a>";
    // }
    // }
    // }
    }
    template();
    }

     
  • Nobody/Anonymous

    Logged In: NO

    i've got the answer, code problem at the news item delete
    makes it use the adelete function instead of the news_delete
    one just switch the link of [yes] with $news_delete instead
    of $adelete and you're all set.

    david (pwnd.mom[-+at friggen sign]gmail.com)

     
  • abutbul

    abutbul - 2005-04-20

    Logged In: YES
    user_id=1263188

    i've got the answer, code problem at the news item delete
    makes it use the adelete function instead of the news_delete
    one just switch the link of [yes] with $news_delete instead
    of $adelete and you're all set.

    david (pwnd.mom[-+at friggen sign]gmail.com)

     
  • Marek Kubica

    Marek Kubica - 2005-08-19

    Logged In: YES
    user_id=872713

    I've fixed it in my local Rash 1.2.2 (which was tagged as
    1.2.1) but I'd be glad seeing it fixed in upstream in the
    next release.

     

Log in to post a comment.