CodeIgniter Forums

Full Version: I updated the upload.php library with a new method
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Hi guys, i'm here to make a contribution to the CI libraries. I updated my upload.php library adding a new method that i needed, and maybe someone could need to.

Well, with this method you send a string as a parameter and it checks if that error was throwed by the do_upload() method. The code added is below:

/**
* Get the error status
*
* @param string
* @return bool
*/
public function get_error_status($msg = '')
{
$status = FALSE;
foreach ($this->error_msg as $val)
{
if($val == $msg){
$status = TRUE;
}
}

return $status;
}


I have made some other changes to another controllers and models but now i don't remember where. If i found them, i will post other contributions for the CI and the community.

El Forum

[eluser]InsiteFX[/eluser]
I hope you extended the library and did not just modify it.

El Forum

[eluser]Unknown[/eluser]
Hi friend, i did so. I extended the library