[geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.79,1.79.2.1

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Fri May 23 07:43:49 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory internal.geeklog.net:/tmp/cvs-serv3615/public_html/admin

Modified Files:
      Tag: geeklog_1_3_7sr1_1
	story.php 
Log Message:
Check for file extension (in addition to the MIME type) when uploading images.


Index: story.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.79
retrieving revision 1.79.2.1
diff -C2 -d -r1.79 -r1.79.2.1
*** story.php	10 Jan 2003 14:21:28 -0000	1.79
--- story.php	23 May 2003 11:43:47 -0000	1.79.2.1
***************
*** 638,641 ****
--- 638,644 ----
      global $_TABLES, $_CONF, $LANG24, $MESSAGE, $HTTP_POST_FILES;
  
+     // Convert array values to numeric permission values
+     list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon);
+ 
      $access = 0;
      if (DB_count ($_TABLES['stories'], 'sid', $sid) > 0) {
***************
*** 680,686 ****
          }
  
-         // Convert array values to numeric permission values
-         list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon);
- 
          if ($featured == '1') {
              // there can only be one non-draft featured story
--- 683,686 ----
***************
*** 755,759 ****
                  $upload->setAutomaticResize(true);
              }
!             $upload->setAllowedMimeTypes(array('image/gif','image/jpeg','image/pjpeg','image/x-png','image/png'));
              if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) {
                  print 'File Upload Errors:<br>' . $upload->printErrors();
--- 755,759 ----
                  $upload->setAutomaticResize(true);
              }
!             $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png'));
              if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) {
                  print 'File Upload Errors:<br>' . $upload->printErrors();





More information about the geeklog-cvs mailing list