aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/diff
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-02-22 15:29:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-02-22 15:29:18 +0000
commit794c5749696c9fa2595ed3a1d7c836a0d984e11c (patch)
tree37aab2f0f965ddcaeb1d26af753095f59a6e025c /phpBB/includes/diff
parent7aced345c5a2871f6eddfe316297b4ff9a0ebb76 (diff)
downloadforums-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar
forums-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar.gz
forums-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar.bz2
forums-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar.xz
forums-794c5749696c9fa2595ed3a1d7c836a0d984e11c.zip
remove global and change $user-> to phpbb::$user->
git-svn-id: file:///svn/phpbb/trunk@9334 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/diff')
-rw-r--r--phpBB/includes/diff/diff.php8
-rw-r--r--phpBB/includes/diff/renderer.php14
2 files changed, 9 insertions, 13 deletions
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 0837ac90d1..674a3b58b4 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -439,8 +439,6 @@ class diff3 extends diff
*/
function merged_output($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN', $get_conflicts = false, $merge_new = false)
{
- global $user;
-
if ($get_conflicts)
{
foreach ($this->_edits as $edit)
@@ -454,9 +452,9 @@ class diff3 extends diff
return $this->_conflicting_blocks;
}
- $label1 = (!empty($user->lang[$label1])) ? $user->lang[$label1] : $label1;
- $label2 = (!empty($user->lang[$label2])) ? $user->lang[$label2] : $label2;
- $label_sep = (!empty($user->lang[$label_sep])) ? $user->lang[$label_sep] : $label_sep;
+ $label1 = (!empty(phpbb::$user->lang[$label1])) ? phpbb::$user->lang[$label1] : $label1;
+ $label2 = (!empty(phpbb::$user->lang[$label2])) ? phpbb::$user->lang[$label2] : $label2;
+ $label_sep = (!empty(phpbb::$user->lang[$label_sep])) ? phpbb::$user->lang[$label_sep] : $label_sep;
$lines = array();
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 7f7a3366b1..8194b63da6 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -598,15 +598,13 @@ class diff_renderer_side_by_side extends diff_renderer
*/
function get_diff_content($diff)
{
- global $user;
-
$output = '';
$output .= '<table cellspacing="0" class="hrdiff">
<caption>
- <span class="unmodified">&nbsp;</span> ' . $user->lang['LINE_UNMODIFIED'] . '
- <span class="added">&nbsp;</span> ' . $user->lang['LINE_ADDED'] . '
- <span class="modified">&nbsp;</span> ' . $user->lang['LINE_MODIFIED'] . '
- <span class="removed">&nbsp;</span> ' . $user->lang['LINE_REMOVED'] . '
+ <span class="unmodified">&nbsp;</span> ' . phpbb::$user->lang['LINE_UNMODIFIED'] . '
+ <span class="added">&nbsp;</span> ' . phpbb::$user->lang['LINE_ADDED'] . '
+ <span class="modified">&nbsp;</span> ' . phpbb::$user->lang['LINE_MODIFIED'] . '
+ <span class="removed">&nbsp;</span> ' . phpbb::$user->lang['LINE_REMOVED'] . '
</caption>
<tbody>
';
@@ -616,14 +614,14 @@ class diff_renderer_side_by_side extends diff_renderer
// Is the diff empty?
if (!sizeof($this->lines))
{
- $output .= '<tr><th colspan="2">' . $user->lang['NO_VISIBLE_CHANGES'] . '</th></tr>';
+ $output .= '<tr><th colspan="2">' . phpbb::$user->lang['NO_VISIBLE_CHANGES'] . '</th></tr>';
}
else
{
// Iterate through every header block of changes
foreach ($this->lines as $header)
{
- $output .= '<tr><th>' . $user->lang['LINE'] . ' ' . $header['oldline'] . '</th><th>' . $user->lang['LINE'] . ' ' . $header['newline'] . '</th></tr>';
+ $output .= '<tr><th>' . phpbb::$user->lang['LINE'] . ' ' . $header['oldline'] . '</th><th>' . phpbb::$user->lang['LINE'] . ' ' . $header['newline'] . '</th></tr>';
// Each header block consists of a number of changes (add, remove, change).
$current_context = '';