+ // Include in ORDER BY for uniqueness
+ $this->addWhereRange( 'img_name', $ascendingOrder ? 'newer' : 'older', null, null );
+
+ if ( !is_null( $params['continue'] ) ) {
+ $cont = explode( '|', $params['continue'] );
+ $this->dieContinueUsageIf( count( $cont ) != 2 );
+ $op = ( $ascendingOrder ? '>' : '<' );
+ $continueTimestamp = $db->addQuotes( $db->timestamp( $cont[0] ) );
+ $continueName = $db->addQuotes( $cont[1] );
+ $this->addWhere( "img_timestamp $op $continueTimestamp OR " .
+ "(img_timestamp = $continueTimestamp AND " .
+ "img_name $op= $continueName)"
+ );
+ }