0 Members and 1 Guest are viewing this topic.

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Hi Members,

In the showprofile.php find line 435 and get this:
Code: [Select]
        if ( isset($_SESSION['UserId']) && isset($_GET['id']) && $_SESSION['UserId'] != $_GET["id"] ) {

            $c = $osDB->getOne( 'SELECT count(*) as c  FROM !  WHERE userid = ? AND profileid = ? and ratingid = ? and rating > ?', array( USER_RATING_TABLE, $_SESSION['UserId'], $_REQUEST['id'], $item["id"], '0' ));


            if ( $c == 0 ) {

                $item["has_rated"] = '0';

            }else {

                $item["has_rated"] = '1';

            }

        }

        if ( isset($_SESSION['UserId']) && isset($_GET['id']) && $_SESSION['UserId'] != $_GET["id"] ) {

            $c = $osDB->getOne( 'SELECT count(*) as c  FROM !  WHERE userid = ? AND profileid = ? and ratingid = ? and comment <> ?', array( USER_RATING_TABLE, $_SESSION['UserId'], $_REQUEST['id'], $item["id"], '' ));


            if ( $c == 0 ) {

                $item["has_commented"] = '0';

            }else {

                $item["has_commented"] = '1';

            }

        }


Change to this:
Code: [Select]
        if ( isset($_SESSION['UserId']) || isset($_GET['id']) && $_SESSION['UserId'] != $_GET["id"] ) {

            $c = $osDB->getOne( 'SELECT count(*) as c  FROM !  WHERE userid = ? AND profileid = ? and ratingid = ? and rating > ?', array( USER_RATING_TABLE, $_SESSION['UserId'], $_REQUEST['id'], $item["id"], '0' ));


            if ( $c == 0 ) {

                $item["has_rated"] = '0';

            }else {

                $item["has_rated"] = '1';

            }

        }

        if ( isset($_SESSION['UserId']) || isset($_GET['id']) && $_SESSION['UserId'] != $_GET["id"] ) {

            $c = $osDB->getOne( 'SELECT count(*) as c  FROM !  WHERE userid = ? AND profileid = ? and ratingid = ? and comment <> ?', array( USER_RATING_TABLE, $_SESSION['UserId'], $_REQUEST['id'], $item["id"], '' ));


            if ( $c == 0 ) {

                $item["has_commented"] = '0';

            }else {

                $item["has_commented"] = '1';

            }

        }
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35