habe versucht, zum Thema was zu finden, aber leider nichts entdeckt! Ich wollte gerade das Copyright-Feld in den Upload-Metadaten nutzen, mußte aber feststellen, dass die dort eingegeben Werte verloren gehen. Da ich auch im Forum nicht fündig geworden bin, habe ich ein wenig im Sourcecode und in der Datenbank gesucht. (Ich hoffe, ich hab da nicht nur die falschen Suchworte verwendet..)
Das Problem hat sich dann wie folgt lösen lassen:
Habe in die Tabelle "upl_meta" ein weiteres Feld "copyright" eingefügt (Einstellungen identisch zu internal_notice).
Anschließend mußte ich noch in der Datei "include.upl_edit.php" folgende Zeilen
Code: Alles auswählen
case "copyright":
$copyright = $properties->getValue("upload", $qpath.$_REQUEST["file"], "file", "copyright");
$copyrightEdit = new cHTMLTextarea("copyright", $copyright);
$sCell = $copyrightEdit->render();
break;
Code: Alles auswählen
case "copyright":
if( $db->f('copyright') ) $copyright = Contenido_Security::unFilter($db->f('copyright'));
else $copyright = $properties->getValue("upload", $qpath.$_REQUEST["file"], "file", "copyright");
$copyrightEdit = new cHTMLTextarea("copyright", $copyright);
$sCell = $copyrightEdit->render();
break;
Code: Alles auswählen
if ($db->num_rows() == 0) { // new entry
$iNextId = $db->nextid($cfg['tab']['upl_meta']);
$sSql = "INSERT INTO " . $cfg['tab']['upl_meta'] . " " .
"SET id_uplmeta = $iNextId, idupl = $iIdupl, idlang = $lang, " .
"medianame = '" . Contenido_Security::filter($medianame, $db) . "', " .
"description = '" . Contenido_Security::filter($description, $db) . "', " .
"keywords = '" . Contenido_Security::filter($keywords, $db) . "', " .
"internal_notice = '" . Contenido_Security::filter($medianotes, $db) . "', " .
"copyright = '" . Contenido_Security::filter($copyright, $db) . "', " .
"author = '" . $auth->auth['uid'] . "', " .
"created = NOW(), modified = NOW(), modifiedby = '" . $auth->auth['uid'] . "'";
} else { // update entry
$db->next_record();
$iIduplmeta = $db->f('id_uplmeta');
$sSql = "UPDATE " . $cfg['tab']['upl_meta'] . " " .
"SET " .
"medianame = '" . Contenido_Security::filter($medianame, $db) . "', " .
"description = '" . Contenido_Security::filter($description, $db) . "', " .
"keywords = '" . Contenido_Security::filter($keywords, $db) . "', " .
"internal_notice = '" . Contenido_Security::filter($medianotes, $db) . "', " .
"copyright = '" . Contenido_Security::filter($copyright, $db) . "', " .
"modified = NOW(), modifiedby = '" . $auth->auth['uid'] . "' " .
"WHERE id_uplmeta = " . $iIduplmeta;
}
Viele Grüße
tmj
P.S. Hätte das ganze gerne unter Bugs angelegt, was mir aber verwehrt war...