匿名的问题,首页能看到,登录后反而看不到了。
我hack了几个地方。附件扩展名不支持,文本变乱码,我晕。
diff -u -r upload/models/index.php /var/www/anwsion/models/index.php
--- upload/models/index.php 2012-09-21 10:59:04.000000000 +0800
+++ /var/www/anwsion/models/index.php 2012-09-27 21:36:30.452966085 +0800
@@ -218,8 +218,8 @@
{
$where = implode(' OR ', $where_in);
}
-
- if (!$action_list = ACTION_LOG::get_actions_distint_by_where($where, $limit, $add_time, false))
+
+ if (!$action_list = ACTION_LOG::get_actions_distint_by_where($where, $limit, $add_time, true))
{
return false;
}
@@ -332,7 +332,7 @@
}
$question_info = "<span style='display:none'>P2*" . $val . "</span>" . ACTION_LOG::format_action_str($val, $val, $user_info_lists[$val], $question_info, $topic_info);
-
+
//对于回复问题的
if (($question_info > 0) && (in_array($val, array(
ACTION_LOG::ANSWER_QUESTION,
@@ -356,13 +356,12 @@
//处理回复
if (! empty($answer_list))
{
- if ($answer_list)
+ if ( ! empty($answer_list))
{
- unset($action_list);
-
- continue;
+ //unset($action_list);
+ //continue;
}
-
+
$answer_all_ids[] = $answer_list;
$answer_list_content = FORMAT::format_content(strip_ubb($answer_list));
diff -u -r upload/models/topic.php /var/www/anwsion/models/topic.php
--- upload/models/topic.php 2012-09-21 15:33:24.000000000 +0800
+++ /var/www/anwsion/models/topic.php 2012-09-27 18:01:14.446961797 +0800
@@ -1298,14 +1297,12 @@
{
$where[] = "(associate_type = " . ACTION_LOG::CATEGORY_QUESTION . " AND associate_id IN (" . implode($questions_array, ",") . ") AND associate_action IN({$action_question}))";
}
-
// echo implode($where, ' OR ');die;
// 限定动作
if ($where)
{
- $action_list = ACTION_LOG::get_actions_distint_by_where(implode($where, ' OR '), '');
+ $action_list = ACTION_LOG::get_actions_distint_by_where(implode($where, ' OR '), '', null, true);
}
-
foreach ($action_list as $key => $val)
{
switch ($val)
@@ -1331,7 +1328,6 @@
$action_list_answers_vote_user = $this->model('answer')->get_vote_user_by_answer_ids($answer_ids);
$action_list_answers_vote_status = $this->model('answer')->get_answer_vote_status($answer_ids, USER::get_client_uid());
}
-
foreach ($action_list as $key => $val)
{
$action_list = $val;
Only in /var/www/anwsion/system: backup_ysoj
diff -u -r upload/system/class/cls_action_log_class.inc.php /var/www/anwsion/system/class/cls_action_log_class.inc.php
--- upload/system/class/cls_action_log_class.inc.php 2012-09-21 10:59:04.000000000 +0800
+++ /var/www/anwsion/system/class/cls_action_log_class.inc.php 2012-09-27 18:39:02.018966570 +0800
@@ -617,17 +617,24 @@
break;
case ACTION_LOG::ANSWER_QUESTION : // '回复问题',
- if ($topic_info)
- {
- $action_str = " <a href=\"{$topic_url}\" class='default_topic' {$topic_tip}>" . $topic_info . "</a> 话题添加了一个问题回复";
- }
- else if ($user_name)
- {
- $action_str = "<a href=\"{$user_url}\" {$user_tip}>{$user_name}</a> 回复了问题";
- }
- else
- {
- $action_str = "该问题增加了一个回复";
+ if ($question_info == 1)
+ {
+ $action_str = "匿名用户 回复了问题";
+ }
+ else
+ {
+ if ($topic_info)
+ {
+ $action_str = " <a href=\"{$topic_url}\" class='default_topic' {$topic_tip}>" . $topic_info . "</a> 话题添加了一个问题回复";
+ }
+ else if ($user_name)
+ {
+ $action_str = "<a href=\"{$user_url}\" {$user_tip}>{$user_name}</a> 回复了问题";
+ }
+ else
+ {
+ $action_str = "该问题增加了一个回复";
+ }
}
break;
阅读全文
收起全文