- Timestamp:
- 02/15/06 23:26:52 (19 years ago)
- Location:
- pykota/trunk/pykota
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r2696 r2697 40 40 self.parent = parent 41 41 self.ident = None 42 self.Description = None 42 43 self.isDirty = False 43 44 self.Exists = False … … 54 55 StorageObject.__init__(self, parent) 55 56 self.Name = name 56 self.Description = None57 57 self.LimitBy = None 58 58 self.AccountBalance = None … … 123 123 self.AccountBalance = None 124 124 self.LifeTimePaid = None 125 self.Description = None126 125 127 126 def setLimitBy(self, limitby) : … … 159 158 self.PricePerPage = None 160 159 self.PricePerJob = None 161 self.Description = None162 160 self.MaxJobSize = None 163 161 self.PassThrough = None … … 462 460 StorageObject.__init__(self, parent) 463 461 self.BillingCode = name 464 self.Description = None465 462 self.PageCounter = None 466 463 self.Balance = None -
pykota/trunk/pykota/storages/ldapstorage.py
r2686 r2697 871 871 if user.Email : 872 872 newfields.update({self.info["usermail"]: user.Email}) 873 if user.Description is not None : 874 newfields.update({"description": self.userCharsetToDatabase(user.Description)}) 873 875 mustadd = 1 874 876 if self.info["newuser"].lower() != 'below' : … … 932 934 "pykotaLimitBy" : (group.LimitBy or "quota"), 933 935 } 936 if group.Description is not None : 937 newfields.update({"description": self.userCharsetToDatabase(group.Description)}) 934 938 mustadd = 1 935 939 if self.info["newgroup"].lower() != 'below' : -
pykota/trunk/pykota/storages/sql.py
r2686 r2697 517 517 def addUser(self, user) : 518 518 """Adds a user to the quota storage, returns it.""" 519 self.doModify("INSERT INTO users (username, limitby, balance, lifetimepaid, email, overcharge) VALUES (%s, %s, %s, %s, %s, %s)" % \ 520 (self.doQuote(self.userCharsetToDatabase(user.Name)), self.doQuote(user.LimitBy or 'quota'), self.doQuote(user.AccountBalance or 0.0), self.doQuote(user.LifeTimePaid or 0.0), self.doQuote(user.Email), self.doQuote(user.OverCharge))) 519 self.doModify("INSERT INTO users (username, limitby, balance, lifetimepaid, email, overcharge, description) VALUES (%s, %s, %s, %s, %s, %s, %s)" % \ 520 (self.doQuote(self.userCharsetToDatabase(user.Name)), \ 521 self.doQuote(user.LimitBy or 'quota'), \ 522 self.doQuote(user.AccountBalance or 0.0), \ 523 self.doQuote(user.LifeTimePaid or 0.0), \ 524 self.doQuote(user.Email), \ 525 self.doQuote(user.OverCharge), \ 526 self.doQuote(self.userCharsetToDatabase(user.Description))) 521 527 return self.getUser(user.Name) 522 528 523 529 def addGroup(self, group) : 524 530 """Adds a group to the quota storage, returns it.""" 525 self.doModify("INSERT INTO groups (groupname, limitby) VALUES (%s, %s)" % \ 526 (self.doQuote(self.userCharsetToDatabase(group.Name)), self.doQuote(group.LimitBy or "quota"))) 531 self.doModify("INSERT INTO groups (groupname, limitby, description) VALUES (%s, %s, %s)" % \ 532 (self.doQuote(self.userCharsetToDatabase(group.Name)), \ 533 self.doQuote(group.LimitBy or "quota"), \ 534 self.doQuote(self.userCharsetToDatabase(group.Description))) 527 535 return self.getGroup(group.Name) 528 536