$db->query("DELETE FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = $attachment[attachmentid]");
- $log->language = 'log_kill_attachment';
$log->arguments = array($attachment['attachmentid']);
$log->allowempty = true;
$log->log();
);
$attachmentid = $db->insert_id();
- $log->language = 'log_new_attachment';
$log->arguments = array($FILE['name'], $attachmentid);
$log->allowempty = true;
$log->log();
array_walk($obsoletes, 'intval');
$db->query("UPDATE " . TABLE_PREFIX . "attachment SET obsolete = 1 WHERE attachmentid IN (" . implode(',', $obsoletes) . ") AND !obsolete AND bugid = $bug[bugid]");
- $log->language = 'log_mark_obsoletes';
$log->arguments = array($attachmentid, $FILE['name'], implode(', ', $obsoletes));
$log->log($log->diff($lang->string('Obsoleted attachments'), '', implode(', ', $obsoletes)));
}
$commentid = $db->insert_id();
- $log->language = 'log_new_attachment_comment';
$log->arguments = array($attachmentid, $commentid);
$log->allowempty = true;
$log->log();
$diff[0] = array_diff_assoc($attachment, $hist[1]);
$diff[1] = array_diff_assoc($hist[1], $attachment);
- $log->language = 'log_update_attachment';
$log->arguments = array($attachment['attachmentid']);
$log->log($log->diff('description', $diff[0]['description'], $diff[1]['description']));
$log->log($log->diff('obsolete', $diff[0]['obsolete'], $diff[1]['obsolete']));
ALTER TABLE `localization` CHANGE `phrasetext` `localtext` MEDIUMTEXT NOT NULL;
-ALTER TABLE `language` ADD `filename` VARCHAR(255) NOT NULL AFTER `direction`;
\ No newline at end of file
+ALTER TABLE `language` ADD `filename` VARCHAR(255) NOT NULL AFTER `direction`;
+
+ALTER TABLE `history` DROP `language`;
+
+ALTER TABLE `history` DROP `arguments`;
\ No newline at end of file
require_once('./includes/class_history.php');
$log = new History();
$log->bugid = $bug['bugid'];
- $log->language = 'log_update_comment';
$log->arguments = array($comment['commentid']);
$log->log();
$log->log($log->diff('hidden', $comment['hidden'], intval($bugsys->in['hidden'])));
if ($hascomment)
{
- $log->language = 'log_new_comment';
$log->arguments = array($commentid);
$log->log();
}
'productid' => 'product',
'componentid' => 'product'
);
-
- $log->language = 'log_update_bug';
-
+
foreach ($diff AS $num => $diffs)
{
foreach ($diffs AS $key => $value)
if ($hascomment)
{
- $log->language = 'log_new_comment';
$log->arguments = array($commentid);
$log->log();
}
class History
{
var $bugid = 0;
- var $language = '';
- var $arguments = array();
var $allowempty = false;
// -------------------------------------------------------------------
global $bugsys;
$this->bugid = intval($this->bugid);
- $this->language = $bugsys->escape($this->language);
- $arguments = $bugsys->escape(serialize($this->arguments));
if ($diffdata == -1)
{
{
$bugsys->db->query("
INSERT INTO " . TABLE_PREFIX . "history
- (bugid, dateline, userid, language, arguments)
+ (bugid, dateline, userid)
VALUES
- (" . $this->bugid . ", " . LOG_TIME . ", " . $bugsys->userinfo['userid'] . ",
- '" . $this->language . "', '" . $arguments . "'
+ (" . $this->bugid . ", " . LOG_TIME . ", " . $bugsys->userinfo['userid'] . "
)"
);
}
{
$bugsys->db->query("
INSERT INTO " . TABLE_PREFIX . "history
- (bugid, dateline, userid, language, arguments, field, original, changed)
+ (bugid, dateline, userid, field, original, changed)
VALUES
(" . $this->bugid . ", " . LOG_TIME . ", " . $bugsys->userinfo['userid'] . ",
- '" . $this->language . "', '" . $arguments . "',
'" . $bugsys->escape($diffdata['field']) . "', '" . $bugsys->escape($diffdata['initial']) . "',
'" . $bugsys->escape($diffdata['final']) . "'
)"
require_once('./includes/class_history.php');
$log = new History();
$log->bugid = $bugsys->in['bugid'];
- $log->language = 'log_new_comment';
$log->arguments = array($commentid);
$log->log();
);
while ($log = $db->fetch_array($logs_fetch))
{
- $log['formatted'] = call_user_func_array(array(lang, 'p'), array_merge(array($log['language']), unserialize($log['arguments'])));
$log['date'] = $datef->format($bugsys->options['dateformat'], $log['dateline']);
$log['user'] = construct_user_display($log);
$rowspan++;
eval('$changes .= "' . $template->fetch('history_bit') . '";');
}
-
- if (!in_array($log['formatted'], $messages))
- {
- $messages[] = $log['formatted'];
- }
}
$log['messages'] = implode("<br />\n", $messages);
$log[user]
</div>
<div class="tmiddle" style="padding: $stylevar[padding]px">
- $log[messages]
-
<if condition="$show['changes']">
<table cellspacing="$stylevar[spacing]" cellpadding="$stylevar[padding]px" border="$stylevar[border]" width="100%" style="margin-top: 5px">
<thead>