Page MenuHomePhabricator

Use file.inc or file.php, not file.inc.php
Closed, ResolvedPublic

Description

These references and the files they refer to should be just .inc:

maintenance/updateArticleCount.php:13:require_once( 'updateArticleCount.inc.php' );
maintenance/importImages.php:14:require_once( 'importImages.inc.php' );
maintenance/reassignEdits.php:14:require_once( 'reassignEdits.inc.php' );
maintenance/deleteOrphanedRevisions.php:15:require_once( 'deleteOrphanedRevisions.inc.php' );
docs/php-memcached/Documentation:166:require("MemCachedClient.inc.php");

In fact some smaller ones could be merged with their .php counterpart.


Version: 1.16.x
Severity: enhancement

Details

Reference
bz18698

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:32 PM
bzimport set Reference to bz18698.
bzimport added a subscriber: Unknown Object (MLST).

karun.84 wrote:

Patch that corrects .inc.php references to be .inc

Hello,
I have created a patch that corrects the references in the files mentioned on the bug to be .inc rather than .inc.php

How do we go about getting the .inc.php files renamed to .inc in SVN? What criteria should we use to determine if .inc files should be included in the .php file? As the bug mentions some of them are small and could be included.

Attached:

karun.84 wrote:

Comment on attachment 6099
Patch that corrects .inc.php references to be .inc

The following files need renaming as a part of the patch
maintenance/updateArticle.inc.php to maintenance/updateArticle.inc

maintenance/importImages.inc.php to maintenance/importImages.inc

maintenance/reassignEdits.inc.php to maintenance/reassignEdits.inc

maintenance/deleteOrphanedRevisions.inc.php to maintenance/deleteOrphanedRevisions.inc

karun.84 wrote:

As per the mailing list discussion on Wikitech-l with the subject "Procedure for renaming files as a part of patches" on the 16th of May 2009, I have updated the patch to include the files to be renamed.

I would rather see all the .php files (except the entry points) renamed to .inc. Is there some reason you think it should be the other way around?

http://marc.info/?l=wikitech-l&m=121346275503945&w=2
http://marc.info/?l=wikitech-l&m=121357278830503&w=2

Applied on r50942.

The patch has been applied except the "docs/php-memcached/Documentation" part.
The MemCachedClient.inc.php file has been deleted on r4945 and this file was
totally outdated in respect to the memcached-client.php file that are currently using.