Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Redundant bracket in mnu_user.class.inc
Redundant bracket in mnu_user.class.inc [message #5902] Wed, 28 September 2016 22:50 Go to next message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
File mnu_user.class.inc contains the following function:
function _cm_pre_getData ($where, $where_array, $fieldarray=null)
    // perform custom processing before database record(s) are retrieved.
    // (WHERE is supplied in two formats - string and array)
    // $fieldarray may contain full details of the current record in the parent
    // class, not just its primary key.
    {
        if (empty($this->sql_from)) {
            // construct default SELECT and FROM clauses using parent relations
            $this->sql_groupby = null;
            $this->sql_having  = null;
            $this->sql_union   = null;
            $this->sql_from    = $this->_sqlForeignJoin($this->sql_select, $this->sql_from, $this->parent_relations);
            // retrieve one or more roles from MNU_USER_ROLE
            $this->sql_select .= ", (SELECT GROUP_CONCAT(role_desc ORDER BY is_primary DESC, mnu_user_role.role_id ASC SEPARATOR ', ') FROM mnu_user_role LEFT JOIN mnu_role ON (mnu_role.role_id=mnu_user_role.role_id) WHERE user_id=mnu_user.user_id) AS role_list)";
            // retrieve primary role from MNU_USER_ROLE
            $this->sql_select .= ", (SELECT role_desc FROM mnu_user_role LEFT JOIN mnu_role ON (mnu_role.role_id=mnu_user_role.role_id) WHERE user_id=mnu_user.user_id AND is_primary='Y' LIMIT 1) AS role_id";
        } // if

        if (!empty($this->sql_search)) {
            $search_array = where2array($this->sql_search, false, false);
            if (!empty($search_array['role_id'])) {
                $role_id = stripOperators($search_array['role_id']);
                $search_array[] = "EXISTS(SELECT 1 FROM mnu_user_role WHERE user_id=mnu_user.user_id AND role_id='$role_id')";
                unset($search_array['role_id']);
            } // if
            $this->sql_search = array2where($search_array);
        } // if

        return $where;

    } // _cm_pre_getData
Notice the line which ends in
 ... AS role_list)";
That closing bracket should not be there.
Re: Redundant bracket in mnu_user.class.inc [message #5906 is a reply to message #5902] Thu, 29 September 2016 05:46 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
That has been fixed in the latest release.

Previous Topic: Documentation deleteRecord
Next Topic: MNU_USER Incorrect Columns Spec and Cannot Re-Import
Goto Forum:
  


Current Time: Thu Mar 28 11:54:32 EDT 2024

Total time taken to generate the page: 0.01017 seconds