Page MenuHomePhabricator

API should allow edit using pageid
Closed, ResolvedPublic

Description

It can be nice to use the pageid, when editing a existing page with the api. (action=edit)

Please make it possible to edit a page when specifiy the pageid not the page title.

Thanks.


Version: 1.20.x
Severity: enhancement

Details

Reference
bz32492
TitleReferenceAuthorSource BranchDest Branch
Add custom CI script for running toolcloudvps-repos/videocuttool/VideoCutTool!2varun-s22T344920master
Add benchmark tests for the evaluator.repos/abstract-wiki/wikifunctions/function-evaluator!42apineapine-benchmarksmain
output-diff.js: Ensure statements for one actor are on one linerepos/mediawiki/services/ipoid!47tchandersbatch-dependenciesmain
Customize query in GitLab

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:00 AM
bzimport set Reference to bz32492.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 10039
API edit by page ID

This patch should let you edit through the API by providing a page ID instead of a page title.

attachment MWAPIEditByPageID.patch ignored as obsolete

(In reply to comment #2)

I can haz use case?

I've given up asking.

It's useful for long and strange titles...

Created attachment 10040
API edit by page ID

I previously forgot to add to getPossibleErrors.

attachment MWAPIEditByPageID.patch ignored as obsolete

Created attachment 10043
Slightly change in how I did this

Looks like I'm going to have to correct myself again. :/
This patch is almost the same thing as the previous one, but using getRequireOnlyOneParameterErrorMessages instead, and without my unnecessary else statement.

Attached:

Usecase: Computer can better handle numbers than text. The title can get long and can have UTF-8, which makes some programms problems. You can save bandwidth, heap space, need no urlencode for this part. For languages with variants you does not have to handle that and it is easy to check, if the title is the same.

In my opinion there are many usecases for using a pageid rather a namespace-prefixed title.