CodeIgniter Forums
I updated the upload.php library with a new method - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: I updated the upload.php library with a new method (/thread-61157.html)



I updated the upload.php library with a new method - El Forum - 10-02-2014

[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.


I updated the upload.php library with a new method - El Forum - 10-03-2014

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



I updated the upload.php library with a new method - El Forum - 10-03-2014

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