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.69 by tani, Tue Feb 22 02:39:30 2005 UTC revision 1.70 by tani, Wed Feb 23 06:39:28 2005 UTC
# Line 2  Line 2 
2   *   *
3   * $Revision$   * $Revision$
4   * $Log$   * $Log$
5     * Revision 1.70  2005/02/23 06:39:28  tani
6     * isGuestEnabled: 設定を読み込むテーブルを変更.
7     *
8   * Revision 1.69  2005/02/22 02:39:30  tani   * Revision 1.69  2005/02/22 02:39:30  tani
9   * public_item_target_user_all関数を追加.   * public_item_target_user_all関数を追加.
10   * SQL中のpublic_item_target_user_allの比較式をpublic_item_target_user_all関数に置換.   * SQL中のpublic_item_target_user_allの比較式をpublic_item_target_user_all関数に置換.
# Line 706  static result_t getXoopsModuleConfigValu Line 709  static result_t getXoopsModuleConfigValu
709    */    */
710  static bool isGuestEnabled(){  static bool isGuestEnabled(){
711      char *value = 0;      char *value = 0;
712      result_t result = getXoopsModuleConfigValue( "xnpaccount", "public_item_target_user", &value );      result_t result = getConfigValue( XNP_CONFIG_PUBLIC_ITEM_TARGET_USER_KEY, &value );
713      if ( result != RES_OK )      if ( result != RES_OK )
714          return false;          return false;
715      if ( value == 0 )      if ( value == 0 )
716          return false;          return false;
717      bool enabled = ( strcmp( value, "all" ) == 0 );      bool enabled = ( strcmp( value, XNP_CONFIG_PUBLIC_ITEM_TARGET_USER_ALL ) == 0 );
718      freeString( value );      freeString( value );
719      return enabled;      return enabled;
720  }  }
# Line 3508  result_t getItems( sessionid_t sid, cons Line 3511  result_t getItems( sessionid_t sid, cons
3511   */   */
3512  unsigned int getItemCount( sessionid_t sid )  unsigned int getItemCount( sessionid_t sid )
3513  {  {
3514      if( hdbc == NULL ) return RES_DB_NOT_INITIALIZED;      if( hdbc == NULL ) return 0;
3515      if( !isValidSessionID( sid ) ) return RES_NO_SUCH_SESSION;      if( !isValidSessionID( sid ) ) return 0;
3516            
3517      result_t ret = RES_ERROR;      result_t ret = RES_ERROR;
3518      string sql;      string sql;
# Line 3596  result_t dumpItemID(sessionid_t sid, cri Line 3599  result_t dumpItemID(sessionid_t sid, cri
3599      sql+=    ") ";      sql+=    ") ";
3600      sql+= " AND ti.item_type_id != " + unsignedIntToString( item::ITID_INDEX ); //      sql+= " AND ti.item_type_id != " + unsignedIntToString( item::ITID_INDEX ); //
3601      sql+= criteria2str( c );      sql+= criteria2str( c );
3602        syslog_printf( "\nsql at %d=%s", __LINE__, sql.c_str() );
3603    
3604      dst = new itemid_t[ dst_max ];      dst = new itemid_t[ dst_max ];
3605      *iids = dst;      *iids = dst;

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

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