X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Feventz%2Fupload_data_file.inc;h=7c21f3ae8b83bd0e84ceba2dffbb3889e0e5fee6;hb=9506a2cb819d240a403a0a10d9acd28428805e91;hp=ea00274f74a1fcb5f453dbba864a920262d449a2;hpb=33e10d4c5c188b6afdf78b1cb324277a1e61c4db;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/eventz/upload_data_file.inc b/wwwroot/inc/eventz/upload_data_file.inc index ea00274..7c21f3a 100644 --- a/wwwroot/inc/eventz/upload_data_file.inc +++ b/wwwroot/inc/eventz/upload_data_file.inc @@ -1,7 +1,5 @@ ".SYSTEM_ROOT."images/nodes/".substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif"; - } - elseif (stristr($image_name,".gif")) { - $cmd=UTILZ_DIR."/gifsicle --resize ".$width."x_ $image > ".SYSTEM_ROOT."images/nodes/".substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif"; - } - if ($cmd) { - shell_exec($cmd); - } - // XXX WTF - echo $cmd; - } +# Removed for now, need complete rewrite + +# if ($_POST['gallery']) { +# $node_params['template_id']=DEF_GALLERY_TEMPLATE; +# $image=TMP."/".$_FILES['data_file']['name']."/".$file; +# $image_name=$file; +# $width=NODE_IMAGE_WIDTH; +# +# if (stristr($image_name,".jpg") || +# stristr($image_name,".jpeg") ){ +# +# /// XXX UTILZ_DIR is not set. remove? +# $cmd=UTILZ_DIR."/jpegtopnm $image |".UTILZ_DIR."/pnmscale -width=$width | ".UTILZ_DIR."ppmquant 256 |".UTILZ_DIR."ppmtogif >".SYSTEM_ROOT.SYSTEM_IMAGES.'/nodes/'.substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif"; +# } +# elseif (stristr($image_name,".gif")) { +# $cmd=UTILZ_DIR."/gifsicle --resize ".$width."x_ $image > ".SYSTE_ROOT.SYSTEM_IMAGES.'/nodes/'.substr($datanode_id,0,1)."/".substr($datanode_id,1,1)."/".$datanode_id.".gif"; +# } +# if ($cmd) { +# shell_exec($cmd); +# } +# // XXX WTF +# echo $cmd; +# } } } closedir($handle); @@ -92,8 +94,5 @@ function upload_data_file() { symlink(FILE_DIR.$_SESSION['user_id'].'/'.$node['node_id'].".$suffix", SYSTEM_ROOT.'/files/'.$node['node_id']); } - - } - ?>