X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Feventz%2Fconfigure_image.inc;h=4ac3d005988295740353ce59c01bc732b266a25b;hb=e5de83e09e06added00d3d54d068d834e2c74cc6;hp=a4fe18ce39ec27505aa84c9303ac69b18dc9372e;hpb=38d469f590f00881f259a72b7ff4a7648b3022c6;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/eventz/configure_image.inc b/wwwroot/inc/eventz/configure_image.inc index a4fe18c..4ac3d00 100644 --- a/wwwroot/inc/eventz/configure_image.inc +++ b/wwwroot/inc/eventz/configure_image.inc @@ -58,12 +58,12 @@ if ($node['node_permission'] == 'owner') { if (!($_img_t = __cin_get_img_type($_FILES['description_image']))) { - $error = '#01: Invalid file format (JPEG, GIF & PNG are only allowed)'; + $error = '#01: Invalid file format (only JPEG, GIF & PNG are allowed)'; return (false); } - + // XXX hard coded $_WEBROOT_PATH = realpath(dirname(__FILE__).'/../..'); - $_PROCESS_IMG_PATH = $_WEBROOT_PATH.'/process-img'; + $_PROCESS_IMG_PATH = $_WEBROOT_PATH.'/process-img'; $_required_dims = ($node['node_id'] == $_SESSION['user_id'])?50:NODE_IMAGE_WIDTH; $_prepared_fname = sprintf('%s/prepared/%03s_%s.gif.upload', $_PROCESS_IMG_PATH, $_required_dims, $node['node_id']); @@ -79,16 +79,16 @@ return (false); } - if (!move_uploaded_file($_FILES['description_image']['tmp_name'], $_prepared_fname)) { - $error = '#04: Error moving uploaded file!'; - return (false); - } +// if (!move_uploaded_file($_FILES['description_image']['tmp_name'], $_prepared_fname)) { +// $error = '#04: Error moving uploaded file!'; +// return (false); +// } - chmod($_prepared_fname, 0664); - rename($_prepared_fname, substr($_prepared_fname, 0, -7)); +// chmod($_prepared_fname, 0664); +// rename($_prepared_fname, substr($_prepared_fname, 0, -7)); } return (true); } -?> \ No newline at end of file +?>