mzanier Posted January 25, 2004 Report Share Posted January 25, 2004 Folgender Patch sorgt daf?r, das die Herstellerbilder beim Uload in einen eigenen Ordner unterhalb des images Verzeichnisses abgelegt werden(catalog/images/manufacturers). In der Datei catalog/admin/manufacturers.php die Zeilen if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) { xtc_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'"); } ersetzen durch: $dir_manufacturers=DIR_FS_CATALOG_IMAGES."/manufacturers"; @mkdir($dir_manufacturers); if ($manufacturers_image = new upload('manufacturers_image', $dir_manufacturers)) { xtc_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $dir_manufacturers."/".$manufacturers_image->filename . "' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'"); } sebthom Link to comment Share on other sites More sharing options...
sebthom Posted January 25, 2004 Report Share Posted January 25, 2004 Hi, der Patch enth?lt leider noch nen Bug, sorry. Hier die gefixte Version: In der Datei catalog/admin/manufacturers.php die Zeilen if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) { xtc_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'"); } ersetzen durch: @mkdir(DIR_FS_CATALOG_IMAGES."/manufacturers"); if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES."/manufacturers")) { xtc_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . "manufacturers/".$manufacturers_image->filename . "' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'"); } Link to comment Share on other sites More sharing options...
mzanier Posted January 26, 2004 Author Report Share Posted January 26, 2004 zudem kommt das problem mit mkdir hinzu, eine automatische verzeichniserstellung durch php kann auf einigen servern probleme geben wenn php nicht unter wwwroot l?uft. das hat zur folge, das php ordner erstellt, danach aber keine berechtigung mehr hat in das verzeichnis zu schreiben, da php nicht der owner des verzeichnises ist Link to comment Share on other sites More sharing options...
sebthom Posted January 26, 2004 Report Share Posted January 26, 2004 Ok, dann w?re es also am idealsten, wenn dieser Patch direkt in das n?chste Release einfliesst und in diesem der manufacturers folder bereits existiert. Dann m??te man diesen auch nicht anlegen. Sebastian Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.