Add API to manage status per article
To be able to track changes to articles to update redfam status Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
This commit is contained in:
@@ -336,8 +336,8 @@ article7 ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? );'
|
||||
cursor = type( self ).connection.cursor( mysqldb.DictCursor )
|
||||
|
||||
cursor.execute(
|
||||
'SELECT * FROM `{prefix}_redfams` WHERE `status` = ?;'.format(
|
||||
prefix=type( self ).db_table_prefix), ( status, ) )
|
||||
'SELECT * FROM `{prefix}_redfams` WHERE `status` = LIKE %?%;'.
|
||||
format( prefix=type( self ).db_table_prefix), ( status, ) )
|
||||
|
||||
while True:
|
||||
res = cursor.fetchmany( 1000 )
|
||||
@@ -358,9 +358,10 @@ article7 ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? );'
|
||||
'FROM `{prefix}_redfams` `F` ' +
|
||||
'INNER JOIN `{prefix}_redpages` `P` ' +
|
||||
'ON `F`.`status` = ? ' +
|
||||
'AND `F`.`ending` >= ? '
|
||||
'AND `F`.`ending` >= ? ' +
|
||||
'AND `F`.`redpageid` = `P`.`pageid`;').format(
|
||||
prefix=type( self ).db_table_prefix), ( status, ending ) )
|
||||
prefix=type( self ).db_table_prefix),
|
||||
( status, ending ) )
|
||||
|
||||
while True:
|
||||
res = cursor.fetchmany( 1000 )
|
||||
|
||||
Reference in New Issue
Block a user