[geeklog-cvs] geeklog-1.3/public_html usersettings.php,1.78,1.79

tony at geeklog.net tony at geeklog.net
Tue Jan 6 23:42:36 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv12826

Modified Files:
	usersettings.php 
Log Message:
now uses $_CONF['path_images'] to store user images.  Also the editor now uses getimage.php if configured to do so.

Index: usersettings.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** usersettings.php	2 Jan 2004 20:58:26 -0000	1.78
--- usersettings.php	7 Jan 2004 04:42:34 -0000	1.79
***************
*** 122,125 ****
--- 122,129 ----
  
      if ($_CONF['allow_user_photo'] == 1) {
+         $stdLoc = true;
+         if (!strstr($_CONF['path_images'], $_CONF['path_html'])) {
+             $stdLoc = false;
+         }
          $photo = '';
          if (!empty ($A['photo'])) {
***************
*** 129,136 ****
                  $alt = '[' . $A['username'] . ']';
              }
!             $photo .= '<br><img src="' . $_CONF['site_url']
                     . '/images/userphotos/' . $A['photo'] . '" alt="' . $alt
                     . '">' . LB . '<br>' . $LANG04[79]
                     . ' <input type="checkbox" name="delete_photo">' . LB;
              $preferences->set_var ('display_photo', $photo);
          }
--- 133,147 ----
                  $alt = '[' . $A['username'] . ']';
              }
!             if ($stdLoc) {
!                 $photo .= '<br><img src="' . $_CONF['site_url']
                     . '/images/userphotos/' . $A['photo'] . '" alt="' . $alt
                     . '">' . LB . '<br>' . $LANG04[79]
                     . ' <input type="checkbox" name="delete_photo">' . LB;
+             } else {
+                 $photo .= '<br><img src="' . $_CONF['site_url']
+                    . '/getimage.php?mode=userphotos&image=' . $A['photo'] . '" alt="' . $alt
+                    . '">' . LB . '<br>' . $LANG04[79]
+                    . ' <input type="checkbox" name="delete_photo">' . LB;
+             }
              $preferences->set_var ('display_photo', $photo);
          }
***************
*** 706,710 ****
              }
              $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/userphotos')) {
                  print 'File Upload Errors:<BR>' . $upload->printErrors();
                  exit;
--- 717,721 ----
              }
              $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_images'] . 'userphotos')) {
                  print 'File Upload Errors:<BR>' . $upload->printErrors();
                  exit;
***************
*** 745,749 ****
                  if (!empty($curphoto) AND isset ($A['delete_photo']) AND
                          $A['delete_photo'] == 'on') {
!                     $filetodelete = $_CONF['path_html'] . 'images/userphotos/' . $curphoto;
                      if (!unlink($filetodelete)) {
                          echo COM_errorLog("Unable to remove file $filetodelete");
--- 756,760 ----
                  if (!empty($curphoto) AND isset ($A['delete_photo']) AND
                          $A['delete_photo'] == 'on') {
!                     $filetodelete = $_CONF['path_images'] . 'userphotos/' . $curphoto;
                      if (!unlink($filetodelete)) {
                          echo COM_errorLog("Unable to remove file $filetodelete");





More information about the geeklog-cvs mailing list