1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00
- more label fixes
- simpler approach to get input cursor text


git-svn-id: file:///svn/phpbb/trunk@7485 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-05-06 15:31:39 +00:00
parent 1e74ea85c5
commit 6205be1e74
42 changed files with 177 additions and 177 deletions

View File

@@ -106,12 +106,26 @@ class acp_modules
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . '
SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . "
WHERE module_id = $module_id";
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$db->sql_query($sql);
add_log('admin', 'LOG_MODULE_' . strtoupper($action));
add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']));
$this->remove_cache_file();
break;

View File

@@ -3355,7 +3355,7 @@ function truncate_string($string, $max_length = 60, $allow_reply = true, $append
*/
function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
global $phpbb_root_path, $phpEx, $user;
global $phpbb_root_path, $phpEx, $user, $auth;
$profile_url = '';
$username_colour = ($username_colour) ? '#' . $username_colour : '';
@@ -3372,8 +3372,17 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// Only show the link if not anonymous
if ($user_id && $user_id != ANONYMOUS)
{
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
$profile_url .= '&u=' . (int) $user_id;
// Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly).
// For all others the link leads to a login page or the profile.
if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
{
$profile_url = '';
}
else
{
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
$profile_url .= '&u=' . (int) $user_id;
}
}
else
{

View File

@@ -1490,18 +1490,18 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
{
if (sizeof($forum_ids) == 1)
{
$sql = 'SELECT SUM(topic_replies + 1) AS forum_posts
$sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
AND t.topic_approved = 1';
}
else
{
$sql = 'SELECT p.forum_id, SUM(topic_replies + 1) AS forum_posts
$sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
AND t.topic_approved = 1
GROUP BY p.forum_id';
GROUP BY t.forum_id';
}
$result = $db->sql_query($sql);

View File

@@ -18,7 +18,7 @@ class mcp_logs
var $u_action;
var $p_master;
function mcp_main(&$p_master)
function mcp_logs(&$p_master)
{
$this->p_master = &$p_master;
}

View File

@@ -598,7 +598,7 @@ function mcp_move_topic($topic_ids)
$db->sql_transaction('begin');
$sql = 'SELECT SUM(topic_replies + 1) as topic_posts
$sql = 'SELECT SUM(t.topic_replies + 1) as topic_posts
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
$result = $db->sql_query($sql);

View File

@@ -18,7 +18,7 @@ class mcp_queue
var $p_master;
var $u_action;
function mcp_main(&$p_master)
function mcp_queue(&$p_master)
{
$this->p_master = &$p_master;
}

View File

@@ -18,7 +18,7 @@ class mcp_reports
var $p_master;
var $u_action;
function mcp_main(&$p_master)
function mcp_reports(&$p_master)
{
$this->p_master = &$p_master;
}