Reedy added a comment.

  And in the case of the API... It's due to `$exists` being used in a few 
places as a guard to the output
  
                // Some information will be unavailable if the file does not 
exist. T221812
                $exists = $file->exists();
    
                // Timestamp is shown even if the file is revdelete'd in 
interface
                // so do same here.
                if ( isset( $prop['timestamp'] ) && $exists ) {
                        $vals['timestamp'] = wfTimestamp( TS_ISO_8601, 
$file->getTimestamp() );
                }
  
  And also
  
                if ( ( $user || $userid ) && $exists ) {
                        if ( $file->isDeleted( File::DELETED_USER ) ) {
                                $vals['userhidden'] = true;
                                $anyHidden = true;
                        }
                        if ( $canShowField( File::DELETED_USER ) ) {
                                if ( $user ) {
                                        $vals['user'] = $file->getUser();
                                }
                                if ( $userid ) {
                                        $vals['userid'] = $file->getUser( 'id' 
);
                                }
                                if ( !$file->getUser( 'id' ) ) {
                                        $vals['anon'] = true;
                                }
                        }
                }
  
  I'm not sure 'dimensions' makes sense to be shown if the file doesn't exist. 
But if we're making it consistent with the UI... The date/time and user should 
at least.

TASK DETAIL
  https://phabricator.wikimedia.org/T239213

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Reedy
Cc: pywikibot-bugs-list, Reedy, Aklapper, Fae, AndreasTraut, Zkhalido, 
WDoranWMF, holger.knust, EvanProdromou, Viztor, DannyS712, Wenyi, Jony, 
Amorymeltzer, Tbscho, MayS, Sethakill, Mdupont, JJMC89, dg711, Dvorapa, 
Poyekhali, Agabi10, Altostratus, Taiwania_Justo, Avicennasis, Pchelolo, 
Ixocactus, Wong128hk, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Dalba, Anomie, 
Masti, Alchimista, Steinsplitter, Rxy, Keegan, Legoktm, Tgr
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to