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.118.2.1 by aga4096, Tue Feb 14 05:13:17 2006 UTC revision 1.118.2.2 by aga4096, Tue Feb 28 04:49:17 2006 UTC
# Line 22  Line 22 
22   *   *
23   * $Revision$   * $Revision$
24   * $Log$   * $Log$
25     * Revision 1.118.2.2  2006/02/28 04:49:17  aga4096
26     * ・NIJC code, guestのon/offを書き換えたときに item_status をリセットする.
27     *
28   * Revision 1.118.2.1  2006/02/14 05:13:17  aga4096   * Revision 1.118.2.1  2006/02/14 05:13:17  aga4096
29   * ・アイテムが private/index_a と public/index_b に登録された状態で、 private/index_aを削除するとおかしくなるのを修正.   * ・アイテムが private/index_a と public/index_b に登録された状態で、 private/index_aを削除するとおかしくなるのを修正.
30   *   *
# Line 6640  result_t setConfigValue( const char* key Line 6643  result_t setConfigValue( const char* key
6643      SQLLEN cbKey = SQL_NTS, cbValue = SQL_NTS;      SQLLEN cbKey = SQL_NTS, cbValue = SQL_NTS;
6644      result_t ret = RES_ERROR;      result_t ret = RES_ERROR;
6645            
6646        // nijc_code か guestのON/OFF を書き換えたときは、item_statusをリセットする.
6647        bool isNijcOrGuest = ( strcmp( key, XNP_CONFIG_REPOSITORY_NIJC_CODE ) == 0 || strcmp( key, XNP_CONFIG_PUBLIC_ITEM_TARGET_USER_KEY ) == 0 );
6648        char *oldValue = 0;
6649        if ( isNijcOrGuest )
6650            getConfigValue( key, &oldValue );
6651        
6652      if( ( sqlcode = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt ) ) == SQL_SUCCESS ) {      if( ( sqlcode = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt ) ) == SQL_SUCCESS ) {
6653          string sql( "UPDATE " + dbprefix + "_xoonips_config SET value=? WHERE name=?");          string sql( "UPDATE " + dbprefix + "_xoonips_config SET value=? WHERE name=?");
6654          syslog_printf( "\nsql at %d=%s", __LINE__, sql.c_str() );          syslog_printf( "\nsql at %d=%s", __LINE__, sql.c_str() );
# Line 6710  result_t setConfigValue( const char* key Line 6719  result_t setConfigValue( const char* key
6719          setLastErrorString( s.c_str( ) );          setLastErrorString( s.c_str( ) );
6720          ret = RES_ERROR;          ret = RES_ERROR;
6721      }      }
6722        
6723        // nijc_code か guestのON/OFF を書き換えたときは、item_statusをリセットする.
6724        if ( ret == RES_OK && isNijcOrGuest && ( oldValue == 0 || strcmp( value, oldValue ) != 0 ) )
6725            refreshItemStatus();
6726        if ( oldValue )
6727            freeString( oldValue );
6728        
6729      return ret;      return ret;
6730  }  }
6731    

Legend:
Removed from v.1.118.2.1  
changed lines
  Added in v.1.118.2.2

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