def __init__(self): Database.__init__(self) self.itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' self.USER_NORMAL = 0 self.USER_INACTIVE = 1 self.USER_IGNORE = 2 self.USER_FOUNDER = 3 self.REGISTERED_USERS_GROUP = 7895 self.ADMIN_GROUPS = [7893, 7898] self.MODERATOR_GROUPS = [484] self.DEVELOPER_GROUPS = [7900] self.USERNAME_LENGTH_RANGE = list(range(3, 21)) self.PASSWORD_LENGTH_RANGE = list(range(6, 31)) self.PRIVMSGS_NO_BOX = -3 self.NOTIFY_EMAIL = 0 self.FAKE_USERNAME = '******' self.USER_AGENT = "Entropy/%s (compatible; %s; %s: %s %s %s)" % ( etpConst['entropyversion'], "Entropy", "UGC", os.uname()[0], os.uname()[4], os.uname()[2], ) self.TABLE_PREFIX = 'phpbb_' self.do_update_session_table = True self.set_connection_data(config.phpbb_connection_data) self.connect()
def __init__(self, connection_data, store_path, store_url=None): self.entropy_docs_title_len = 512 self.entropy_docs_description_len = 4000 self.entropy_docs_keyword_len = 100 if store_url is None: store_url = "" self._store_url = store_url self.FLOOD_INTERVAL = 30 self.VOTE_RANGE = [1, 2, 3, 4, 5] self.COMMENTS_SCORE_WEIGHT = 5 self.DOCS_SCORE_WEIGHT = 10 self.VOTES_SCORE_WEIGHT = 2 self.STATS_MAP = { 'installer': "installer", } self.DOC_TYPES = { 'comments': Document.COMMENT_TYPE_ID, 'image': Document.IMAGE_TYPE_ID, 'generic_file': Document.FILE_TYPE_ID, 'youtube_video': Document.VIDEO_TYPE_ID, 'icon': Document.ICON_TYPE_ID, } self.UPLOADED_DOC_TYPES = [ self.DOC_TYPES['image'], self.DOC_TYPES['icon'], self.DOC_TYPES['generic_file'] ] Database.__init__(self) self.set_connection_data(connection_data) #self._initialize_tables() #self._initialize_doctypes() self._setup_store_path(store_path) self._system_name = "Sabayon Linux" self.connect()
def __init__(self, connection_data, store_path, store_url = None): self.entropy_docs_title_len = 512 self.entropy_docs_description_len = 4000 self.entropy_docs_keyword_len = 100 if store_url is None: store_url = "" self._store_url = store_url self.FLOOD_INTERVAL = 30 self.VOTE_RANGE = [1, 2, 3, 4, 5] self.COMMENTS_SCORE_WEIGHT = 5 self.DOCS_SCORE_WEIGHT = 10 self.VOTES_SCORE_WEIGHT = 2 self.STATS_MAP = { 'installer': "installer", } self.DOC_TYPES = { 'comments': Document.COMMENT_TYPE_ID, 'image': Document.IMAGE_TYPE_ID, 'generic_file': Document.FILE_TYPE_ID, 'youtube_video': Document.VIDEO_TYPE_ID, 'icon': Document.ICON_TYPE_ID, } self.UPLOADED_DOC_TYPES = [ self.DOC_TYPES['image'], self.DOC_TYPES['icon'], self.DOC_TYPES['generic_file'] ] Database.__init__(self) self.set_connection_data(connection_data) #self._initialize_tables() #self._initialize_doctypes() self._setup_store_path(store_path) self._system_name = "Sabayon Linux" self.connect()
def __init__(self): Database.__init__(self) self.set_connection_data(config.mirror_connection_data) self.connect() self.dbconn.set_character_set('utf8')