Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9187
Modified Files:
accounts.cpp accounts.h basics.cpp basics.h
Log Message:
E-Mail for accounts.
Index: accounts.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** accounts.cpp 10 Aug 2004 03:15:56 -0000 1.98
--- accounts.cpp 22 Aug 2004 12:37:31 -0000 1.99
***************
*** 47,50 ****
--- 47,51 ----
lastlogin int NOT NULL default '',\
blockuntil int NOT NULL default '',\
+ email varchar(255) NOT NULL default '',\
PRIMARY KEY (login)\
);";
***************
*** 364,370 ****
cAccount* account = it.data();
! QString sql( "REPLACE INTO accounts VALUES( '%1', '%2', %3, '%4', %5, %6 );" );
! sql = sql.arg( account->login_.lower() ).arg( account->password_ ).arg( account->flags_ ).arg( account->aclName_ ).arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 ).arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 );
PersistentBroker::instance()->executeQuery( sql );
--- 365,377 ----
cAccount* account = it.data();
! QString sql( "REPLACE INTO accounts VALUES( '%1', '%2', %3, '%4', %5, %6, '%7' );" );
! sql = sql.arg( account->login_.lower() )
! .arg( account->password_ )
! .arg( account->flags_ )
! .arg( account->aclName_ )
! .arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 )
! .arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 )
! .arg( PersistentBroker::instance()->quoteString(account->email_) );
PersistentBroker::instance()->executeQuery( sql );
***************
*** 412,416 ****
PersistentBroker::instance()->lockTable( "accounts" );
! cDBResult result = PersistentBroker::instance()->query( "SELECT login,password,flags,acl,lastlogin,blockuntil FROM accounts;" );
// Clear Accounts HERE
--- 419,423 ----
PersistentBroker::instance()->lockTable( "accounts" );
! cDBResult result = PersistentBroker::instance()->query( "SELECT login,password,flags,acl,lastlogin,blockuntil,email FROM accounts;" );
// Clear Accounts HERE
***************
*** 432,435 ****
--- 439,444 ----
account->blockUntil.setTime_t( result.getInt( 5 ) );
+ account->email_ = result.getString( 6 );
+
// See if the password can and should be hashed,
// Md5 hashes are 32 characters long.
Index: basics.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** basics.cpp 19 Aug 2004 13:53:03 -0000 1.39
--- basics.cpp 22 Aug 2004 12:37:31 -0000 1.40
***************
*** 188,191 ****
--- 188,193 ----
cBufferedWriter::cBufferedWriter( const QCString& magic, unsigned int version )
{
+ buffersize = 4096;
+
d = new cBufferedWriterPrivate;
d->version = version;
Index: basics.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** basics.h 21 Aug 2004 21:52:17 -0000 1.35
--- basics.h 22 Aug 2004 12:37:31 -0000 1.36
***************
*** 98,102 ****
private:
class cBufferedWriterPrivate *d;
! QT_STATIC_CONST int buffersize = 4096;
public:
--- 98,102 ----
private:
class cBufferedWriterPrivate *d;
! int buffersize;
public:
Index: accounts.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** accounts.h 19 Aug 2004 01:22:51 -0000 1.43
--- accounts.h 22 Aug 2004 12:37:31 -0000 1.44
***************
*** 57,60 ****
--- 57,61 ----
QDateTime lastLogin_;
QDateTime blockUntil;
+ QCString email_;
// Flags for this Account
***************
*** 75,78 ****
--- 76,80 ----
QString login() const;
QString password() const;
+ const QCString &email() const;
unsigned int rank() const;
void remove();
***************
*** 100,103 ****
--- 102,106 ----
QDateTime lastLogin() const;
void setLastLogin( const QDateTime& );
+ void setEmail(const QCString &email );
void setBlockUntil( const QDateTime& d );
void refreshAcl();
***************
*** 213,216 ****
--- 216,227 ----
}
+ inline const QCString &cAccount::email() const {
+ return email_;
+ }
+
+ inline void cAccount::setEmail(const QCString &email ) {
+ email_ = email;
+ }
+
inline void cAccount::setLastLogin( const QDateTime& d )
{
|