[Spidertree-cvs] spidertree/classes SAlbum.php,1.3,1.4 SImage.php,1.1,1.2
Status: Pre-Alpha
Brought to you by:
spiderr
|
From: <sp...@us...> - 2004-02-07 21:29:02
|
Update of /cvsroot/spidertree/spidertree/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11249/classes Modified Files: SAlbum.php SImage.php Log Message: more upload stuff, slowly getting there Index: SAlbum.php =================================================================== RCS file: /cvsroot/spidertree/spidertree/classes/SAlbum.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SAlbum.php 7 Feb 2004 21:05:35 -0000 1.3 +++ SAlbum.php 7 Feb 2004 21:25:52 -0000 1.4 @@ -178,6 +178,14 @@ } // }}} + // {{{ processUpload + /** + * accepts a HTTP_POST_FILES var, saves the images, and adds them to this album + * + * @param $pPostFiles a $HTTP_POST_FILES varible with 'UPLOAD' as the hash to use + * @return TRUE if successful, FALSE if not. mErrors will hold error strings + * @access public + **/ function processUpload( &$pPostFiles, $iDestPath ) { $files = &$pPostFiles['UPLOAD']; foreach( array_keys( $files['size'] ) as $i ) { @@ -186,6 +194,7 @@ } } } + // }}} } Index: SImage.php =================================================================== RCS file: /cvsroot/spidertree/spidertree/classes/SImage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SImage.php 7 Feb 2004 21:05:35 -0000 1.1 +++ SImage.php 7 Feb 2004 21:25:52 -0000 1.2 @@ -156,7 +156,7 @@ //pvd( $pParams ); //print "sql $sql"; $rs = $this->mDB->Execute($sql, array( $pParams['title'], $pParams['path'], $this->mUID, $pParams['IMID'] ) ); - +pvd( $pParams ); $this->mDB->CompleteTrans(); } return( count( $this->mErrors ) == 0 ); @@ -178,15 +178,6 @@ } // }}} - function processUpload( &$pPostFiles, $iDestPath ) { - $files = &$pPostFiles['UPLOAD']; - foreach( array_keys( $files['size'] ) as $i ) { - if( $files['size'][$i] > 0 ) { - move_uploaded_file( $files['tmp_name'][$i], $iDestPath.$files['name'][$i] ); - } - } - } - } |