Log in

View Full Version : Whats the difference?


HMBeaty
06-28-2009, 07:24 AM
Just curious to what the difference is between these. When I code, I like to tear mods apart to see how they work and basically create mine off of what I learned from breaking it down. But I saw this and it had me wondering, lol.

THIS is what I use in my modifications:
{
print_no_permission();
}
Then today, I saw this while breaking one down
{
print_no_permission();
exit;
}
What's the difference? Obviously besides the exit;, but does it change anything different? Which is the proper way (First or second one)?

DragonBlade
06-28-2009, 07:37 PM
Honestly, there is no difference. The "exit;" on the second is extraneous, as "exit" is already called inside the "standard_error()" function that is called from "print_no_permission();".

Neither way would execute any differently than the other. :)

HMBeaty
06-30-2009, 08:31 AM
Ok, got another one :D

Should "yesno" options beTYPE_BOOLvsTYPE_NOHTML? Or am I wrong with both?

--------------- Added 1246355425 at 1246355425 ---------------

Just a bit of my code as more of an explanation....
$vbulletin->input->clean_array_gpc('p', array(
'position_applying' => TYPE_NOHTML,
'username' => TYPE_NOHTML,
'additional_usernames' => TYPE_NOHTML,
'first_name' => TYPE_NOHTML,
'last_name' => TYPE_NOHTML,
'birth_month' => TYPE_NUM,
'ever_resigned' => TYPE_BOOL,