All the upload handlers use this function, put it somewhere common
git-svn-id: file:///home/shish/svn/shimmie2/trunk@791 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
c1238af7db
commit
dee164edf1
@ -233,6 +233,17 @@ function get_base_href() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function move_upload_to_archive($event) {
|
||||||
|
$hash = $event->hash;
|
||||||
|
$ha = substr($hash, 0, 2);
|
||||||
|
if(!copy($event->tmpname, "images/$ha/$hash")) {
|
||||||
|
$event->veto("Failed to copy file from uploads ({$event->tmpname}) to archive (images/$ha/$hash)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||||
* Debugging functions *
|
* Debugging functions *
|
||||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user