Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Wedge/wedge
Browse files Browse the repository at this point in the history
  • Loading branch information
Nao committed Aug 25, 2014
2 parents 8ff88a5 + e33bf38 commit 07821ed
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/app/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/* This file, unpredictable as this might be, handles basic administration.
void Admin()
- initialises all the basic context required for the admin center.
- initializes all the basic context required for the admin center.
- passes execution onto the relevant admin section.
- if the passed section is not found it shows the admin home page.
Expand Down
2 changes: 0 additions & 2 deletions core/app/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,7 @@ function loadCustomFields($memID, $area = 'summary')
$input_html .= '</fieldset>';
}
elseif ($row['field_type'] == 'text')
{
$input_html = '<input name="customfield[' . $row['col_name'] . ']" ' . ($row['field_length'] != 0 ? 'maxlength="' . $row['field_length'] . '"' : '') . ' size="' . ($row['field_length'] == 0 || $row['field_length'] >= 50 ? 50 : ($row['field_length'] > 30 ? 30 : ($row['field_length'] > 10 ? 20 : 10))) . '" value="' . $value . '"' . ($area == 'register' && $row['show_reg'] > 1 ? ' required' : '') . '>';
}
else
{
@list ($rows, $cols) = @explode(',', $row['default_value']);
Expand Down
4 changes: 2 additions & 2 deletions core/app/Subs-BoardIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function getBoardIndex($boardIndexOptions)
FROM {db_prefix}boards AS b' . ($boardIndexOptions['include_categories'] ? '
LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)' : '') . '
LEFT JOIN {db_prefix}messages AS m ON (m.id_msg = b.id_last_msg)
LEFT JOIN {db_prefix}topics AS t ON (m.id_topic = m.id_msg) AND {query_see_topic}
LEFT JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic) AND {query_see_topic}
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . ($boardIndexOptions['include_categories'] ? '
LEFT JOIN {db_prefix}collapsed_categories AS cc ON (cc.id_cat = c.id_cat AND cc.id_member = {int:current_member})' : '') . '
LEFT JOIN {db_prefix}moderators AS mods ON (mods.id_board = b.id_board)
Expand Down Expand Up @@ -392,7 +392,7 @@ function getBoardIndex($boardIndexOptions)
'link' => '<a href="<URL>?action=moderate;area=groups;sa=requests">' . $txt['group_requests'] . '</a>',
'language' => '',
);
// Lastly, we need to set the last post. I realise it's not actually 'off limits' but that's the mechanism to reuse here.
// Lastly, we need to set the last post. I realize it's not actually 'off limits' but that's the mechanism to reuse here.
$requests = cache_quick_get('groupreq_boardindex-' . $user_group_key, 'ModerationCenter', 'cache_getBoardIndexGroupReq', array());
if (!empty($requests['id_request']))
{
Expand Down
10 changes: 7 additions & 3 deletions core/app/Subs-Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ function add_js_file($files = array(), $is_direct_url = false, $is_out_of_flow =
$id = '';
$latest_date = 0;

$full_path = array();
foreach ($files as $fid => $file)
{
if (!file_exists($add = ROOT_DIR . '/core/javascript/' . $file)) // !! Temp?
if (file_exists($add = ROOT_DIR . '/core/javascript/' . $file)) // !! Temp?
$files[$fid] = ROOT_DIR . '/core/javascript/' . $file;
elseif (!file_exists($add = $file))
{
unset($files[$fid]);
continue;
Expand Down Expand Up @@ -129,7 +132,7 @@ function add_js_file($files = array(), $is_direct_url = false, $is_out_of_flow =
$final_name = $is_jquery ? $context['jquery_version'] : $id . $lang_name . $latest_date;
if (!file_exists(CACHE_DIR . '/js/' . $final_name . $ext))
{
wedge_cache_js($id, $lang_name, $latest_date, $ext, $files, $can_gzip);
wedge_cache_js($id, $lang_name, $latest_date, $ext, $files, $can_gzip, true);
if ($is_jquery)
@rename(CACHE_DIR . '/js/' . $id . $lang_name . $latest_date . $ext, CACHE_DIR . '/js/' . $final_name . $ext);
}
Expand Down Expand Up @@ -1510,6 +1513,7 @@ function wedge_get_skin_options($options_only = false)
}
$context['template_folders'][] = TEMPLATES_DIR;
$context['css_folders'] = array_reverse($css_folders);
$folder = reset($css_folders);

// From root to deepest.
foreach (array_reverse($context['skin_folders']) as $fold)
Expand Down Expand Up @@ -1616,7 +1620,7 @@ function wedge_get_skin_options($options_only = false)
$includes = array_map('trim', explode(' ', $match['include']));
$has_here = strpos($match['include'], '$here') !== false;
foreach ($includes as $val)
add_js_file($has_here ? str_replace('$here', str_replace($root_dir . '/', '', $folder), $val) : $val);
add_js_file($has_here ? str_replace('$here', SKINS_DIR . '/' . $folder, $val) : $val);
}
if (!empty($match['value']))
add_js(rtrim($match['value'], "\t"));
Expand Down
8 changes: 4 additions & 4 deletions core/html/Profile.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function template_summary()
$shown = false;
foreach ($context['custom_fields'] as $field)
{
if ($field['placement'] != 0 || empty($field['output_html']) || !profile_can_see('custom_' . $field))
if ($field['placement'] != 0 || empty($field['output_html']) || !profile_can_see('custom_' . $field['colname']))
continue;

if (!$shown)
Expand All @@ -213,7 +213,7 @@ function template_summary()
}

echo '
<dt>', profile_privacy_icon('custom_' . $field, $field['name'] . $txt[':']), '</dt>
<dt>', profile_privacy_icon('custom_' . $field['colname'], $field['name'] . $txt[':']), '</dt>
<dd>', $field['output_html'], '</dd>';
}

Expand Down Expand Up @@ -335,7 +335,7 @@ function template_summary()
$shown = false;
foreach ($context['custom_fields'] as $field)
{
if ($field['placement'] != 2 || empty($field['output_html']) || !profile_can_see('custom_' . $field))
if ($field['placement'] != 2 || empty($field['output_html']) || !profile_can_see('custom_' . $field['colname']))
continue;

if (!$shown)
Expand All @@ -347,7 +347,7 @@ function template_summary()
}

echo '
<li>', profile_privacy_icon('custom_' . $field, $field['output_html'] . $txt[':']), '</li>';
<li>', profile_privacy_icon('custom_' . $field['colname'], $field['output_html'] . $txt[':']), '</li>';
}
if ($shown)
echo '
Expand Down

0 comments on commit 07821ed

Please sign in to comment.