PDA

View Full Version : Question about GPC vars


Antivirus
11-26-2008, 02:28 PM
I've noticed that vbulletin has the ability to recognize certain sincle character arguments in GPC when cleaning vars such as c=calendarid, e=eventid, f=forumid, etc... thus allowing a $_REQUEST to look like this:
https://vborg.vbsupport.ru/newthread.php?do=newthread&f=15

as opposed to this:
https://vborg.vbsupport.ru/newthread.php?do=newthread&forumid=15

I've looked all over for the "key" to this, but can't find it. Somewhere there has to be a array of keys=>values for f=>forumid, c=>calendarid, etc...

Does anyone know where this is located?

Lynne
11-26-2008, 03:01 PM
/includes/class_core.php

How do some of you guys get by without a text editor that does a search for a word in a folder? I couldn't possible code if I couldn't search the vb folder for certain functions or pieces of code.

Guest190829
11-26-2008, 03:05 PM
It's located in includes/class_core.php within the actual input cleaner class, var $shortvars if I remember correctly.

Antivirus
11-26-2008, 03:11 PM
ah yes, i see it now, thanks!

posting here for quick reference for others:

/**
* Translation table for short name to long name
*
* @var array
*/
var $shortvars = array(
'f' => 'forumid',
't' => 'threadid',
'p' => 'postid',
'u' => 'userid',
'a' => 'announcementid',
'c' => 'calendarid',
'e' => 'eventid',
'q' => 'query',
'pp' => 'perpage',
'page' => 'pagenumber',
'sort' => 'sortfield',
'order' => 'sortorder',
);