Zeile 257 | Zeile 257 |
---|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
| $raw_errors = $userhandler->get_errors();
|
|
|
// Set allowed value otherwise select options disappear if(in_array($lang->userdata_invalid_birthday_privacy, $errors))
| // Set to stored value if invalid if(array_key_exists("invalid_birthday_privacy", $raw_errors))
|
{
|
{
|
$mybb->input['birthdayprivacy'] = 'none';
| $mybb->input['birthdayprivacy'] = $mybb->user['birthdayprivacy'];
|
}
$errors = inline_error($errors);
| }
$errors = inline_error($errors);
|
Zeile 1521 | Zeile 1522 |
---|
{ $tids = implode(",", array_keys($subscriptions)); $readforums = array();
|
{ $tids = implode(",", array_keys($subscriptions)); $readforums = array();
|
|
|
// Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
| // Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
|
Zeile 1530 | Zeile 1531 |
---|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
|
|
while($forum = $db->fetch_array($query)) { $readforums[$forum['fid']] = $forum['lastread'];
| while($forum = $db->fetch_array($query)) { $readforums[$forum['fid']] = $forum['lastread'];
|
Zeile 1635 | Zeile 1636 |
---|
if($thread['lastread']) { $lastread = $thread['lastread'];
|
if($thread['lastread']) { $lastread = $thread['lastread'];
|
} else {
| } else {
|
$lastread = 1; } }
| $lastread = 1; } }
|
Zeile 1656 | Zeile 1657 |
---|
}
if($lastread && $lastread < $thread['lastpost'])
|
}
if($lastread && $lastread < $thread['lastpost'])
|
{
| {
|
$folder .= "new"; $folder_label .= $lang->icon_new; $new_class = "subject_new";
| $folder .= "new"; $folder_label .= $lang->icon_new; $new_class = "subject_new";
|
Zeile 1674 | Zeile 1675 |
---|
{ $folder .= "hot"; $folder_label .= $lang->icon_hot;
|
{ $folder .= "hot"; $folder_label .= $lang->icon_hot;
|
}
| }
|
if($thread['closed'] == 1)
|
if($thread['closed'] == 1)
|
{
| {
|
$folder .= "lock"; $folder_label .= $lang->icon_lock;
|
$folder .= "lock"; $folder_label .= $lang->icon_lock;
|
}
$folder .= "folder";
| }
$folder .= "folder";
|
if($thread['visible'] == 0)
|
if($thread['visible'] == 0)
|
{
| {
|
$bgcolor = "trow_shaded";
|
$bgcolor = "trow_shaded";
|
}
| }
|
// Build last post info $lastpostdate = my_date('relative', $thread['lastpost']);
|
// Build last post info $lastpostdate = my_date('relative', $thread['lastpost']);
|
$lastposter = htmlspecialchars_uni($thread['lastposter']);
| if(!$lastposteruid && !$thread['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest); } else { $lastposter = htmlspecialchars_uni($thread['lastposter']); }
|
$lastposteruid = $thread['lastposteruid'];
// Don't link to guest's profiles (they have no profile).
| $lastposteruid = $thread['lastposteruid'];
// Don't link to guest's profiles (they have no profile).
|
Zeile 1751 | Zeile 1759 |
---|
ORDER BY pid, disporder "); $readforums = array();
|
ORDER BY pid, disporder "); $readforums = array();
|
while($forum = $db->fetch_array($query)) {
| while($forum = $db->fetch_array($query)) {
|
$readforums[$forum['fid']] = $forum['lastread']; }
| $readforums[$forum['fid']] = $forum['lastread']; }
|
Zeile 1794 | Zeile 1802 |
---|
$threads = my_number_format($forum['threads']); }
|
$threads = my_number_format($forum['threads']); }
|
if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
| if($forum['lastpost'] == 0)
|
{ eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";"); }
| { eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";"); }
|
Zeile 1808 | Zeile 1816 |
---|
$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']); $lastpost_date = my_date('relative', $forum['lastpost']); $lastposttid = $forum['lastposttid'];
|
$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']); $lastpost_date = my_date('relative', $forum['lastpost']); $lastposttid = $forum['lastposttid'];
|
$lastposter = htmlspecialchars_uni($forum['lastposter']); $lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
| if(!$forum['lastposteruid'] && !$forum['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest); } else { $lastposter = htmlspecialchars_uni($forum['lastposter']); } if($forum['lastposteruid'] == 0) { $lastpost_profilelink = $lastposter; } else { $lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']); }
|
$full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']); if(my_strlen($lastpost_subject) > 25) {
| $full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']); if(my_strlen($lastpost_subject) > 25) {
|
Zeile 1817 | Zeile 1839 |
---|
} $lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost"); eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");
|
} $lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost"); eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");
|
}
| }
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = ""; }
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = ""; }
|
|
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";"); }
if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";"); }
if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
|
}
| }
|
$plugins->run_hooks("usercp_forumsubscriptions_end");
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");
| $plugins->run_hooks("usercp_forumsubscriptions_end");
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");
|
Zeile 2439 | Zeile 2461 |
---|
foreach($users as $key => $username) { if(empty($username))
|
foreach($users as $key => $username) { if(empty($username))
|
{ unset($users[$key]);
| { unset($users[$key]);
|
continue; }
| continue; }
|
Zeile 2514 | Zeile 2536 |
---|
}
if(isset($requests[$user['uid']]))
|
}
if(isset($requests[$user['uid']]))
|
{ if($mybb->get_input('manage') != "ignored") {
| { if($mybb->get_input('manage') != "ignored") {
|
$error_message = $lang->users_already_sent_request;
|
$error_message = $lang->users_already_sent_request;
|
}
| }
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
}
array_pop($users); // To maintain a proper count when we call count($users) continue; }
| }
array_pop($users); // To maintain a proper count when we call count($users) continue; }
|
if(isset($requests_rec[$user['uid']])) { if($mybb->get_input('manage') != "ignored")
| if(isset($requests_rec[$user['uid']])) { if($mybb->get_input('manage') != "ignored")
|
Zeile 2551 | Zeile 2573 |
---|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp'
| 'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp'
|
);
send_pm($pm);
| );
send_pm($pm);
|
Zeile 2583 | Zeile 2605 |
---|
} } }
|
} } }
|
|
|
if($found_users < count($users)) { if($error_message)
| if($found_users < count($users)) { if($error_message)
|
Zeile 2592 | Zeile 2614 |
---|
}
$error_message .= $lang->invalid_user_selected;
|
}
$error_message .= $lang->invalid_user_selected;
|
}
| }
|
if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1)) {
| if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1)) {
|
Zeile 2668 | Zeile 2690 |
---|
{ $new_list = my_substr($new_list, 0, my_strlen($new_list)-2); }
|
{ $new_list = my_substr($new_list, 0, my_strlen($new_list)-2); }
|
|
|
$user['buddylist'] = $db->escape_string($new_list);
|
$user['buddylist'] = $db->escape_string($new_list);
|
|
|
$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
}
| }
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
| if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
|
Zeile 2697 | Zeile 2719 |
---|
if(my_substr($new_list, 0, 1) == ",") { $new_list = my_substr($new_list, 1);
|
if(my_substr($new_list, 0, 1) == ",") { $new_list = my_substr($new_list, 1);
|
}
| }
|
if(my_substr($new_list, -1) == ",") { $new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
| if(my_substr($new_list, -1) == ",") { $new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
|
Zeile 2706 | Zeile 2728 |
---|
// And update $user = array(); if($mybb->get_input('manage') == "ignored")
|
// And update $user = array(); if($mybb->get_input('manage') == "ignored")
|
{
| {
|
$user['ignorelist'] = $db->escape_string($new_list); $mybb->user['ignorelist'] = $user['ignorelist']; } else
|
$user['ignorelist'] = $db->escape_string($new_list); $mybb->user['ignorelist'] = $user['ignorelist']; } else
|
{
| {
|
$user['buddylist'] = $db->escape_string($new_list); $mybb->user['buddylist'] = $user['buddylist']; }
| $user['buddylist'] = $db->escape_string($new_list); $mybb->user['buddylist'] = $user['buddylist']; }
|
Zeile 2730 | Zeile 2752 |
---|
else { $list = "buddy";
|
else { $list = "buddy";
|
}
| }
|
$message_js = ''; if($message)
| $message_js = ''; if($message)
|
Zeile 2744 | Zeile 2766 |
---|
}
if($mybb->get_input('delete', MyBB::INPUT_INT))
|
}
if($mybb->get_input('delete', MyBB::INPUT_INT))
|
{
| {
|
header("Content-type: text/javascript"); echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n"; if($new_list == "")
| header("Content-type: text/javascript"); echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n"; if($new_list == "")
|
Zeile 2867 | Zeile 2889 |
---|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);
|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);
|
$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);
| $request['date'] = my_date('relative', $request['date']);
|
eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";"); }
| eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";"); }
|
Zeile 2901 | Zeile 2923 |
---|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);
|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);
|
$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);
| $request['date'] = my_date('relative', $request['date']);
|
eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";"); }
| eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";"); }
|
Zeile 2923 | Zeile 2945 |
---|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);
|
{ $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);
|
$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);
| $request['date'] = my_date('relative', $request['date']);
|
eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";"); }
| eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";"); }
|
Zeile 3715 | Zeile 3737 |
---|
} else {
|
} else {
|
$expires = my_date('relative', $warning['expires']);
| $expires = nice_time($warning['expires']-TIME_NOW);
|
}
$alt_bg = alt_trow();
| }
$alt_bg = alt_trow();
|
Zeile 3881 | Zeile 3903 |
---|
}
$lastpostdate = my_date('relative', $thread['lastpost']);
|
}
$lastpostdate = my_date('relative', $thread['lastpost']);
|
$lastposter = htmlspecialchars_uni($thread['lastposter']);
| |
$lastposteruid = $thread['lastposteruid'];
|
$lastposteruid = $thread['lastposteruid'];
|
| if(!$lastposteruid && !$thread['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest); } else { $lastposter = htmlspecialchars_uni($thread['lastposter']); }
|
if($lastposteruid == 0) {
| if($lastposteruid == 0) {
|
Zeile 3903 | Zeile 3932 |
---|
} eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";"); }
|
} eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";"); }
|
} }
| } }
|
// User's Latest Threads
| // User's Latest Threads
|
Zeile 3925 | Zeile 3954 |
---|
if(is_moderator() == true) { $visible = '';
|
if(is_moderator() == true) { $visible = '';
|
}
| }
|
$query = $db->query(" SELECT t.*, t.username AS threadusername, u.username
| $query = $db->query(" SELECT t.*, t.username AS threadusername, u.username
|
Zeile 3945 | Zeile 3974 |
---|
if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false) { continue;
|
if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false) { continue;
|
}
| }
|
$forumpermissions = $fpermissions[$thread['fid']]; if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0) {
| $forumpermissions = $fpermissions[$thread['fid']]; if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0) {
|
Zeile 3968 | Zeile 3997 |
---|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
|
|
while($forum = $db->fetch_array($query)) { $readforums[$forum['fid']] = $forum['lastread'];
| while($forum = $db->fetch_array($query)) { $readforums[$forum['fid']] = $forum['lastread'];
|