Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/commonal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.110 by aga4096, Fri Sep 9 06:26:35 2005 UTC revision 1.111 by aga4096, Mon Sep 26 02:24:34 2005 UTC
# Line 22  Line 22 
22   *   *
23   * $Revision$   * $Revision$
24   * $Log$   * $Log$
25     * Revision 1.111  2005/09/26 02:24:34  aga4096
26     * ・isAdmin()が誤動作するのを修正.
27     *
28   * Revision 1.110  2005/09/09 06:26:35  aga4096   * Revision 1.110  2005/09/09 06:26:35  aga4096
29   * ・xnp_use_syslog()を作成.   * ・xnp_use_syslog()を作成.
30   *   *
# Line 7929  bool isAdmin( userid_t uid ) Line 7932  bool isAdmin( userid_t uid )
7932      SQLHANDLE hstmt = NULL;      SQLHANDLE hstmt = NULL;
7933            
7934      if( ( sqlcode = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt ) ) == SQL_SUCCESS ) {      if( ( sqlcode = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt ) ) == SQL_SUCCESS ) {
7935          string sql = "SELECT count(*)>0 FROM x_groups, x_groups_users_link WHERE x_groups.groupid = x_groups_users_link.groupid and group_type='Admin' and x_groups_users_link.uid=" + unsignedIntToString(uid);          string sql = "SELECT count(*)>0 FROM " + dbprefix + "_groups, " + dbprefix + "_groups_users_link WHERE " + dbprefix + "_groups.groupid = " + dbprefix + "_groups_users_link.groupid and group_type='Admin' and " + dbprefix + "_groups_users_link.uid=" + unsignedIntToString(uid);
7936          if( ( sqlcode = SQLExecDirect( hstmt, (SQLCHAR*)sql.c_str(), sql.length() ) ) == SQL_SUCCESS ){          if( ( sqlcode = SQLExecDirect( hstmt, (SQLCHAR*)sql.c_str(), sql.length() ) ) == SQL_SUCCESS ){
7937              SQLUINTEGER isadmin = 0;              SQLUINTEGER isadmin = 0;
7938              SQLLEN isadminSQLLen = 0;              SQLLEN isadminSQLLen = 0;

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.111

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26