Ejemplo n.º 1
0
 def setDefaultItems(self, num):
   if defaultItemList.getPublisherUrl() == self.getParam('publisherUrl'):
     return # Do not sets default links for the url that is hosting it
   defaultItems = defaultItemList.getOrderedItems()
   if num < len(defaultItems):
     defaultItems = defaultItems[0: num]
   if len(defaultItems):
     self.common_response.setDefaultItems(defaultItems, response.ItemInfo.SHORT)
Ejemplo n.º 2
0
 def updateItem(self, publisherUrl, itemId=None, item=None, bNew=False, statType=None, spot=0):
   if publisherUrl == 'default':
     if defaultItemList.disallowIncoming():
       return
     publisherUrl = defaultItemList.getPublisherUrl()
   itemList.updateItem(publisherUrl, itemId, item, bNew, statType, int(spot))