В content.php компонента com_content есть такая функция:
function saveContent($task) {
global $my, $Itemid;
$mainframe = mosMainFrame::getInstance();
$database = $mainframe->getDBO();
// simple spoof check security
josSpoofCheck();
//права доступа
$access = new contentAccess();
$nullDate = $database->getNullDate();
$row = new mosContent($database);
if (!$row->bind($_POST)) {
echo "<script> alert('" . $row->getError(). "'); window.history.go(-1); </script>\n";
exit();
}
// sanitise id field
$row->id = (int) $row->id;
$isNew = $row->id < 1;
if ($isNew) {
// new record
if (!($access->canEdit || $access->canEditOwn)) {
mosNotAuth();
return;
}
$row->created = date('Y-m-d H:i:s');
$row->created_by = $my->id;
} else {
// existing record
if (!($access->canEdit || ($access->canEditOwn && $row->created_by == $my->id))) {
mosNotAuth();
return;
}
$row->modified = date('Y-m-d H:i:s');
$row->modified_by = $my->id;
}
if (strlen(trim($row->publish_up)) <= 10) {
$row->publish_up .= ' 00:00:00';
}
$row->publish_up = mosFormatDate($row->publish_up, _CURRENT_SERVER_TIME_FORMAT, -$mainframe->getCfg('offset'));
if (trim($row->publish_down) == _NEVER || trim($row->publish_down) == '') {
$row->publish_down = $nullDate;
} else {
if (strlen(trim($row->publish_down)) <= 10) {
$row->publish_down .= ' 00:00:00';
}
$row->publish_down = mosFormatDate($row->publish_down, _CURRENT_SERVER_TIME_FORMAT, -$mainframe->getCfg('offset'));
}
// code cleaner for XHTML transitional compliance
$row->introtext = str_replace('<br>', '<br />', $row->introtext);
$row->fulltext = str_replace('<br>', '<br />', $row->fulltext);
// remove <br /> take being automatically added to empty fulltext
$length = strlen($row->fulltext) < 9;
$search = strstr($row->fulltext, '<br />');
if ($length && $search) {
$row->fulltext = null;
}
$row->title = ampReplace($row->title);
// Publishing state hardening for Authors
//Участок перенесен в функцию редактирования
if (isset($_POST['catid'])) {
$catid0 = explode('*', $_POST['catid']);
$row->catid = $catid0[1];
$row->sectionid = $catid0[0];
}
if (!$row->check()) {
echo "<script> alert('" . $row->getError(). "'); window.history.go(-1); </script>\n";
exit();
}
$row->version++;
// мамботы сохранения
if ($mainframe->getCfg('use_content_save_mambots')) {
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup('content');
$_MAMBOTS->trigger('onSaveContent', array($row));
}
if (!$row->store()) {
echo "<script> alert('" . $row->getError(). "'); window.history.go(-1); </script>\n";
exit();
}
if ($mainframe->getCfg('use_content_save_mambots')) {
$_MAMBOTS->trigger('onAfterSaveContent', array($row));
}
//Подготовка тэгов
$tags = explode(',', $_POST['tags']);
$tag = new contentTags($database);
$tags = $tag->clear_tags($tags);
//Запись тэгов
$row->obj_type = 'com_content';
$tag->update($tags, $row);
//$row->metakey = implode(',', $tags);
// manage frontpage items
require_once ($mainframe->getPath('class', 'com_frontpage'));
$fp = new mosFrontPage($database);
if (intval(mosGetParam($_REQUEST, 'frontpage', 0))) {
// toggles go to first place
if (!$fp->load((int) $row->id)) {
// new entry
$query = "INSERT INTO #__content_frontpage VALUES ( " . (int) $row->id . ", 1 )";
$database->setQuery($query);
if (!$database->query()) {
echo "<script> alert('" . $database->stderr(). "');</script>\n";
exit();
}
$fp->ordering = 1;
}
} else {
// no frontpage mask
if (!$fp->delete((int) $row->id)) {
$msg .= $fp->stderr();
}
$fp->ordering = 0;
}
$fp->updateOrder();
$row->checkin();
$row->updateOrder("catid = " . (int) $row->catid);
$msg = $isNew ? _THANK_SUB : _E_ITEM_SAVED;
if ($my->usertype == 'Publisher' || $row->state == 1) {
$msg = _THANK_SUB_PUB;
}
$page = new stdClass();
$page->access = $access;
$page->task = $task;
if ($isNew) {
_after_create_content($row, $page);
} else {
_after_update_content($row, $page);
}
}
в которой происходит обработка данных полученых из формы добавления статьи, а вот где сохранение этих данных в таблицу базы данных??
кто может мне помочь?