Merge pull request #250 from marc1706/ticket/249
[ticket/249] Fix codesniffer issues
This commit is contained in:
@@ -232,7 +232,7 @@ class portal_module
|
|||||||
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
set_config($config_name, $config_value);
|
set_config($config_name, $config_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -385,8 +385,8 @@ class portal_module
|
|||||||
$portal_modules = obtain_portal_modules();
|
$portal_modules = obtain_portal_modules();
|
||||||
$installed_modules = array();
|
$installed_modules = array();
|
||||||
|
|
||||||
foreach($portal_modules as $cur_module)
|
foreach($portal_modules as $cur_module)
|
||||||
{
|
{
|
||||||
$installed_modules[] = $cur_module['module_classname'];
|
$installed_modules[] = $cur_module['module_classname'];
|
||||||
// Create an array with the columns the module is in
|
// Create an array with the columns the module is in
|
||||||
$this->module_column[$cur_module['module_classname']][] = column_num_string($cur_module['module_column']);
|
$this->module_column[$cur_module['module_classname']][] = column_num_string($cur_module['module_column']);
|
||||||
@@ -790,10 +790,10 @@ class portal_module
|
|||||||
$portal_config = obtain_portal_config(); // we need to prevent duplicate entry errors
|
$portal_config = obtain_portal_config(); // we need to prevent duplicate entry errors
|
||||||
$this->c_class->install($module_id);
|
$this->c_class->install($module_id);
|
||||||
$this->cache->purge();
|
$this->cache->purge();
|
||||||
|
|
||||||
// We need to return to the module config
|
// We need to return to the module config
|
||||||
meta_refresh(3, $this->get_module_link('config', $module_id));
|
meta_refresh(3, $this->get_module_link('config', $module_id));
|
||||||
|
|
||||||
trigger_error($this->user->lang['MODULE_RESET_SUCCESS'] . adm_back_link($this->u_action . "&module_id=$module_id"));
|
trigger_error($this->user->lang['MODULE_RESET_SUCCESS'] . adm_back_link($this->u_action . "&module_id=$module_id"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -942,14 +942,14 @@ class portal_module
|
|||||||
public function move_module_left($module_id)
|
public function move_module_left($module_id)
|
||||||
{
|
{
|
||||||
$module_data = $this->get_move_module_data($module_id);
|
$module_data = $this->get_move_module_data($module_id);
|
||||||
|
|
||||||
if (!isset($this->modules[$module_data['module_classname']]))
|
if (!isset($this->modules[$module_data['module_classname']]))
|
||||||
{
|
{
|
||||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->c_class = $this->modules[$module_data['module_classname']];
|
$this->c_class = $this->modules[$module_data['module_classname']];
|
||||||
|
|
||||||
if ($module_data !== false && $module_data['module_column'] > column_string_num('left'))
|
if ($module_data !== false && $module_data['module_column'] > column_string_num('left'))
|
||||||
{
|
{
|
||||||
if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] - 1)))
|
if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] - 1)))
|
||||||
@@ -964,7 +964,7 @@ class portal_module
|
|||||||
{
|
{
|
||||||
$this->handle_after_move(false);
|
$this->handle_after_move(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* moving only 1 column to the left means we will either end up in the left column
|
* moving only 1 column to the left means we will either end up in the left column
|
||||||
* or in the center column. this is not possible when moving 2 columns to the left.
|
* or in the center column. this is not possible when moving 2 columns to the left.
|
||||||
@@ -998,13 +998,13 @@ class portal_module
|
|||||||
SET module_column = module_column - ' . $move_action . '
|
SET module_column = module_column - ' . $move_action . '
|
||||||
WHERE module_id = ' . (int) $module_id;
|
WHERE module_id = ' . (int) $module_id;
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||||
SET module_order = module_order - 1
|
SET module_order = module_order - 1
|
||||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||||
AND module_column = ' . $module_data['module_column'];
|
AND module_column = ' . $module_data['module_column'];
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
// the module that needs to moved is in the last row
|
// the module that needs to moved is in the last row
|
||||||
if(!$updated)
|
if(!$updated)
|
||||||
{
|
{
|
||||||
@@ -1014,7 +1014,7 @@ class portal_module
|
|||||||
AND module_column = ' . (int) ($module_data['module_column'] - $move_action);
|
AND module_column = ' . (int) ($module_data['module_column'] - $move_action);
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
$new_order = $this->db->sql_fetchfield('new_order') + 1;
|
$new_order = $this->db->sql_fetchfield('new_order') + 1;
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||||
SET module_order = ' . $new_order . '
|
SET module_order = ' . $new_order . '
|
||||||
WHERE module_id = ' . (int) $module_id;
|
WHERE module_id = ' . (int) $module_id;
|
||||||
@@ -1025,7 +1025,7 @@ class portal_module
|
|||||||
{
|
{
|
||||||
$this->handle_after_move(false);
|
$this->handle_after_move(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->handle_after_move(true);
|
$this->handle_after_move(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,14 +1037,14 @@ class portal_module
|
|||||||
public function move_module_right($module_id)
|
public function move_module_right($module_id)
|
||||||
{
|
{
|
||||||
$module_data = $this->get_move_module_data($module_id);
|
$module_data = $this->get_move_module_data($module_id);
|
||||||
|
|
||||||
if (!isset($this->modules[$module_data['module_classname']]))
|
if (!isset($this->modules[$module_data['module_classname']]))
|
||||||
{
|
{
|
||||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->c_class = $this->modules[$module_data['module_classname']];
|
$this->c_class = $this->modules[$module_data['module_classname']];
|
||||||
|
|
||||||
if ($module_data !== false && $module_data['module_column'] < column_string_num('right'))
|
if ($module_data !== false && $module_data['module_column'] < column_string_num('right'))
|
||||||
{
|
{
|
||||||
if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] + 1)))
|
if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] + 1)))
|
||||||
@@ -1059,7 +1059,7 @@ class portal_module
|
|||||||
{
|
{
|
||||||
$this->handle_after_move(false);
|
$this->handle_after_move(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* moving only 1 column to the right means we will either end up in the right column
|
* moving only 1 column to the right means we will either end up in the right column
|
||||||
* or in the center column. this is not possible when moving 2 columns to the right.
|
* or in the center column. this is not possible when moving 2 columns to the right.
|
||||||
@@ -1081,7 +1081,7 @@ class portal_module
|
|||||||
$move_action = 2;
|
$move_action = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||||
SET module_order = module_order + 1
|
SET module_order = module_order + 1
|
||||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||||
@@ -1093,13 +1093,13 @@ class portal_module
|
|||||||
SET module_column = module_column + ' . $move_action . '
|
SET module_column = module_column + ' . $move_action . '
|
||||||
WHERE module_id = ' . (int) $module_id;
|
WHERE module_id = ' . (int) $module_id;
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||||
SET module_order = module_order - 1
|
SET module_order = module_order - 1
|
||||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||||
AND module_column = ' . (int) $module_data['module_column'];
|
AND module_column = ' . (int) $module_data['module_column'];
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
// the module that needs to moved is in the last row
|
// the module that needs to moved is in the last row
|
||||||
if(!$updated)
|
if(!$updated)
|
||||||
{
|
{
|
||||||
@@ -1109,7 +1109,7 @@ class portal_module
|
|||||||
AND module_column = ' . (int) ($module_data['module_column'] + $move_action);
|
AND module_column = ' . (int) ($module_data['module_column'] + $move_action);
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
$new_order = $this->db->sql_fetchfield('new_order') + 1;
|
$new_order = $this->db->sql_fetchfield('new_order') + 1;
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||||
SET module_order = ' . (int) $new_order . '
|
SET module_order = ' . (int) $new_order . '
|
||||||
WHERE module_id = ' . (int) $module_id;
|
WHERE module_id = ' . (int) $module_id;
|
||||||
@@ -1140,7 +1140,7 @@ class portal_module
|
|||||||
$result = $this->db->sql_query_limit($sql, 1);
|
$result = $this->db->sql_query_limit($sql, 1);
|
||||||
$module_data = $this->db->sql_fetchrow($result);
|
$module_data = $this->db->sql_fetchrow($result);
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
if ($module_data !== false)
|
if ($module_data !== false)
|
||||||
{
|
{
|
||||||
$module_classname = $this->request->variable('module_classname', '');
|
$module_classname = $this->request->variable('module_classname', '');
|
||||||
@@ -1164,7 +1164,7 @@ class portal_module
|
|||||||
WHERE module_column = ' . $module_data['module_column'] . '
|
WHERE module_column = ' . $module_data['module_column'] . '
|
||||||
AND module_order > ' . $module_data['module_order'];
|
AND module_order > ' . $module_data['module_order'];
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
$this->cache->purge(); // make sure we don't get errors after re-adding a module
|
$this->cache->purge(); // make sure we don't get errors after re-adding a module
|
||||||
|
|
||||||
if ($this->request->is_ajax())
|
if ($this->request->is_ajax())
|
||||||
@@ -1194,7 +1194,7 @@ class portal_module
|
|||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->cache->destroy('portal_modules');
|
$this->cache->destroy('portal_modules');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
if ($permissions == true)
|
if ($permissions == true)
|
||||||
{
|
{
|
||||||
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$disallow_access = array();
|
$disallow_access = array();
|
||||||
@@ -316,7 +316,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
$message = get_sub_taged_string($message, $row['bbcode_uid'], $maxlen);
|
$message = get_sub_taged_string($message, $row['bbcode_uid'], $maxlen);
|
||||||
$posts[$i]['striped'] = true;
|
$posts[$i]['striped'] = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$message = str_replace("\n", '<br/> ', $row['post_text']);
|
$message = str_replace("\n", '<br/> ', $row['post_text']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class portal_upload
|
|||||||
|
|
||||||
if (!sizeof($file->error))
|
if (!sizeof($file->error))
|
||||||
{
|
{
|
||||||
// Let's start moving our files where they belong
|
// Let's start moving our files where they belong
|
||||||
foreach ($actions['NEW_FILES'] as $source => $target)
|
foreach ($actions['NEW_FILES'] as $source => $target)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -245,7 +245,7 @@ class portal_upload
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (scandir($dir) as $item)
|
foreach (scandir($dir) as $item)
|
||||||
{
|
{
|
||||||
if ($item == '.' || $item == '..')
|
if ($item == '.' || $item == '..')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ class phpbb_trim_message_bbcodes
|
|||||||
$this->is_sensitive = true;
|
$this->is_sensitive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->open_bbcode($bbcode_tag, $this->cur_position);
|
$this->open_bbcode($bbcode_tag, $this->cur_position);
|
||||||
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
|
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
|
||||||
$this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position);
|
$this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position);
|
||||||
@@ -376,7 +375,7 @@ class phpbb_trim_message_bbcodes
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11))) != '--')
|
if (($smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11))) != '--')
|
||||||
{
|
{
|
||||||
if ($last_smiley == $smiley_code)
|
if ($last_smiley == $smiley_code)
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL_ANNOUNCEMENTS_ARCHIVE' => 'Das Archivsystem für die Bekanntmachungen aktivieren',
|
'PORTAL_ANNOUNCEMENTS_ARCHIVE' => 'Das Archivsystem für die Bekanntmachungen aktivieren',
|
||||||
'PORTAL_ANNOUNCEMENTS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.',
|
'PORTAL_ANNOUNCEMENTS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.',
|
||||||
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
||||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -50,5 +50,5 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL_ATTACHMENTS_FILETYPE' => 'Dateitypen',
|
'PORTAL_ATTACHMENTS_FILETYPE' => 'Dateitypen',
|
||||||
'PORTAL_ATTACHMENTS_FILETYPE_EXP' => 'Falls "Dateitypen ausschließen" auf "Ja" steht, wähle die Dateitypen die du ausschließen willst.<br />Falls "Dateitypen ausschließen" auf "Nein" steht, wähle die Dateitypen die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
|
'PORTAL_ATTACHMENTS_FILETYPE_EXP' => 'Falls "Dateitypen ausschließen" auf "Ja" steht, wähle die Dateitypen die du ausschließen willst.<br />Falls "Dateitypen ausschließen" auf "Nein" steht, wähle die Dateitypen die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
|
||||||
'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen ausschließen',
|
'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen ausschließen',
|
||||||
'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.',
|
'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.',
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ $lang = array_merge($lang, array(
|
|||||||
'ACP_PORTAL_BIRTHDAYS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für den Geburtstage-Block ändern.',
|
'ACP_PORTAL_BIRTHDAYS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für den Geburtstage-Block ändern.',
|
||||||
'PORTAL_BIRTHDAYS' => 'Geburtstage',
|
'PORTAL_BIRTHDAYS' => 'Geburtstage',
|
||||||
'PORTAL_BIRTHDAYS_AHEAD' => 'Anstehende Geburtstage',
|
'PORTAL_BIRTHDAYS_AHEAD' => 'Anstehende Geburtstage',
|
||||||
'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'Zeitraum für die Geburtstagsvorschau (Tage).<br />"0" deaktiviert die Anzeige der bevorstehenden Geburtstage.',
|
'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'Zeitraum für die Geburtstagsvorschau (Tage).<br />"0" deaktiviert die Anzeige der bevorstehenden Geburtstage.',
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
|||||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'PORTAL_LINKS' => 'Links',
|
'PORTAL_LINKS' => 'Links',
|
||||||
'LINKS_NO_LINKS' => 'Keine Links vorhanden',
|
'LINKS_NO_LINKS' => 'Keine Links vorhanden',
|
||||||
|
|
||||||
// ACP
|
// ACP
|
||||||
'ACP_PORTAL_LINKS' => 'Links-Einstellungen',
|
'ACP_PORTAL_LINKS' => 'Links-Einstellungen',
|
||||||
|
|||||||
@@ -66,5 +66,5 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL_NEWS_ARCHIVE' => 'Das Archivsystem für die aktuellen Beiträge aktivieren',
|
'PORTAL_NEWS_ARCHIVE' => 'Das Archivsystem für die aktuellen Beiträge aktivieren',
|
||||||
'PORTAL_NEWS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.',
|
'PORTAL_NEWS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.',
|
||||||
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
||||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
|||||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'PORTAL_LINKS' => 'Links',
|
'PORTAL_LINKS' => 'Links',
|
||||||
'LINKS_NO_LINKS' => 'No links',
|
'LINKS_NO_LINKS' => 'No links',
|
||||||
|
|
||||||
// ACP
|
// ACP
|
||||||
'ACP_PORTAL_LINKS' => 'Link Settings',
|
'ACP_PORTAL_LINKS' => 'Link Settings',
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $lang = array_merge($lang, array(
|
|||||||
'M_TERMS' => 'Terms of use',
|
'M_TERMS' => 'Terms of use',
|
||||||
'M_PRV' => 'Privacy policy',
|
'M_PRV' => 'Privacy policy',
|
||||||
'M_SEARCH' => 'Search',
|
'M_SEARCH' => 'Search',
|
||||||
'MENU_NO_LINKS' => 'No links',
|
'MENU_NO_LINKS' => 'No links',
|
||||||
|
|
||||||
// ACP
|
// ACP
|
||||||
'ACP_PORTAL_MENU' => 'Menu settings',
|
'ACP_PORTAL_MENU' => 'Menu settings',
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class announcements extends module_base
|
|||||||
if($permissions == true)
|
if($permissions == true)
|
||||||
{
|
{
|
||||||
$disallow_access = array_unique(array_keys($this->auth->acl_getf('!f_read', true)));
|
$disallow_access = array_unique(array_keys($this->auth->acl_getf('!f_read', true)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$disallow_access = array();
|
$disallow_access = array();
|
||||||
@@ -156,7 +156,7 @@ class announcements extends module_base
|
|||||||
|
|
||||||
if(sizeof($forum_from))
|
if(sizeof($forum_from))
|
||||||
{
|
{
|
||||||
$disallow_access = array_diff($forum_from, $disallow_access);
|
$disallow_access = array_diff($forum_from, $disallow_access);
|
||||||
if(!sizeof($disallow_access))
|
if(!sizeof($disallow_access))
|
||||||
{
|
{
|
||||||
return array();
|
return array();
|
||||||
@@ -197,7 +197,7 @@ class announcements extends module_base
|
|||||||
$topic_tracking_info = (get_portal_tracking_info($fetch_news));
|
$topic_tracking_info = (get_portal_tracking_info($fetch_news));
|
||||||
|
|
||||||
if($announcement < 0)
|
if($announcement < 0)
|
||||||
// Show the announcements overview
|
// Show the announcements overview
|
||||||
{
|
{
|
||||||
$count = $fetch_news['topic_count'];
|
$count = $fetch_news['topic_count'];
|
||||||
for ($i = 0; $i < $count; $i++)
|
for ($i = 0; $i < $count; $i++)
|
||||||
@@ -310,7 +310,6 @@ class announcements extends module_base
|
|||||||
|
|
||||||
$this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true);
|
$this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true);
|
||||||
|
|
||||||
|
|
||||||
if(!empty($fetch_news[$i]['attachments']))
|
if(!empty($fetch_news[$i]['attachments']))
|
||||||
{
|
{
|
||||||
foreach ($fetch_news[$i]['attachments'] as $attachment)
|
foreach ($fetch_news[$i]['attachments'] as $attachment)
|
||||||
@@ -332,7 +331,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Show "read full" page
|
// Show "read full" page
|
||||||
{
|
{
|
||||||
$i = $announcement;
|
$i = $announcement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -358,7 +357,7 @@ class announcements extends module_base
|
|||||||
if ($this->config['board3_announcements_archive_' . $module_id])
|
if ($this->config['board3_announcements_archive_' . $module_id])
|
||||||
{
|
{
|
||||||
$pagination = generate_portal_pagination(append_sid("{$this->phpbb_root_path}app.{$this->php_ext}/portal"), $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start, 'announcements');
|
$pagination = generate_portal_pagination(append_sid("{$this->phpbb_root_path}app.{$this->php_ext}/portal"), $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start, 'announcements');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->template->assign_block_vars('announcements_center_row', array(
|
$this->template->assign_block_vars('announcements_center_row', array(
|
||||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $this->config['allow_attachments']) ? $this->user->img('icon_topic_attach', $this->user->lang['TOTAL_ATTACHMENTS']) : '',
|
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $this->config['allow_attachments']) ? $this->user->img('icon_topic_attach', $this->user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ class calendar extends module_base
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i < sizeof($events); $i++)
|
for ($i = 0; $i < sizeof($events); $i++)
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ class custom extends module_base
|
|||||||
display_custom_bbcodes();
|
display_custom_bbcodes();
|
||||||
$this->user->add_lang('posting');
|
$this->user->add_lang('posting');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ class links extends module_base
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* on move_down, switch position with next order_id...
|
* on move_down, switch position with next order_id...
|
||||||
* on move_up, switch position with previous order_id...
|
* on move_up, switch position with previous order_id...
|
||||||
* move up means a lower ID, move down means a higher ID
|
* move up means a lower ID, move down means a higher ID
|
||||||
@@ -465,9 +465,9 @@ class links extends module_base
|
|||||||
*
|
*
|
||||||
* @return string Unserialized string
|
* @return string Unserialized string
|
||||||
*/
|
*/
|
||||||
private function utf_unserialize($serial_str)
|
private function utf_unserialize($serial_str)
|
||||||
{
|
{
|
||||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
|
||||||
return unserialize($out);
|
return unserialize($out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ class main_menu extends module_base
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* on move_down, switch position with next order_id...
|
* on move_down, switch position with next order_id...
|
||||||
* on move_up, switch position with previous order_id...
|
* on move_up, switch position with previous order_id...
|
||||||
* move up means a lower ID, move down means a higher ID
|
* move up means a lower ID, move down means a higher ID
|
||||||
@@ -528,9 +528,9 @@ class main_menu extends module_base
|
|||||||
*
|
*
|
||||||
* @return string Unserialized string
|
* @return string Unserialized string
|
||||||
*/
|
*/
|
||||||
private function utf_unserialize($serial_str)
|
private function utf_unserialize($serial_str)
|
||||||
{
|
{
|
||||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
|
||||||
return unserialize($out);
|
return unserialize($out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ class news extends module_base
|
|||||||
$portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0;
|
$portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0;
|
||||||
$fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_news_forum_' . $module_id], $this->config['board3_news_permissions_' . $module_id], $this->config['board3_number_of_news_' . $module_id], $portal_news_length, 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, $this->config['board3_news_exclude_' . $module_id]);
|
$fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_news_forum_' . $module_id], $this->config['board3_news_permissions_' . $module_id], $this->config['board3_number_of_news_' . $module_id], $portal_news_length, 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, $this->config['board3_news_exclude_' . $module_id]);
|
||||||
|
|
||||||
|
|
||||||
// Any news present? If not terminate it here.
|
// Any news present? If not terminate it here.
|
||||||
if (sizeof($fetch_news) == 0)
|
if (sizeof($fetch_news) == 0)
|
||||||
{
|
{
|
||||||
@@ -268,7 +267,7 @@ class news extends module_base
|
|||||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||||
'POSTER' => $fetch_news[$i]['username'],
|
'POSTER' => $fetch_news[$i]['username'],
|
||||||
'POSTER_FULL' => $fetch_news[$i]['username_full'],
|
'POSTER_FULL' => $fetch_news[$i]['username_full'],
|
||||||
'USERNAME_FULL_LAST' => $fetch_news[$i]['username_full_last'],
|
'USERNAME_FULL_LAST' => $fetch_news[$i]['username_full_last'],
|
||||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||||
'TIME' => $fetch_news[$i]['topic_time'],
|
'TIME' => $fetch_news[$i]['topic_time'],
|
||||||
'LAST_POST_TIME' => $this->user->format_date($fetch_news[$i]['topic_last_post_time']),
|
'LAST_POST_TIME' => $this->user->format_date($fetch_news[$i]['topic_last_post_time']),
|
||||||
@@ -355,7 +354,7 @@ class news extends module_base
|
|||||||
'S_POLL' => $fetch_news[$i]['poll'],
|
'S_POLL' => $fetch_news[$i]['poll'],
|
||||||
'S_UNREAD_INFO' => $unread_topic,
|
'S_UNREAD_INFO' => $unread_topic,
|
||||||
'U_READ_FULL' => $read_full_url,
|
'U_READ_FULL' => $read_full_url,
|
||||||
'L_READ_FULL' => $read_full,
|
'L_READ_FULL' => $read_full,
|
||||||
'OPEN' => $open_bracket,
|
'OPEN' => $open_bracket,
|
||||||
'CLOSE' => $close_bracket,
|
'CLOSE' => $close_bracket,
|
||||||
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
|
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ class stylechanger extends module_base
|
|||||||
$this->template->assign_var('STYLE_SELECT', $style_select);
|
$this->template->assign_var('STYLE_SELECT', $style_select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Assign specific vars
|
// Assign specific vars
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
'S_STYLE_OPTIONS' => ($this->config['override_user_style'] || $style_count < 2) ? '' : style_select($this->user->data['user_style']),
|
'S_STYLE_OPTIONS' => ($this->config['override_user_style'] || $style_count < 2) ? '' : style_select($this->user->data['user_style']),
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ class user_menu extends module_base
|
|||||||
$unread_list = get_unread_topics($this->user->data['user_id'], $sql_where, 'ORDER BY t.topic_id DESC');
|
$unread_list = get_unread_topics($this->user->data['user_id'], $sql_where, 'ORDER BY t.topic_id DESC');
|
||||||
$unread_posts_count = sizeof($unread_list);
|
$unread_posts_count = sizeof($unread_list);
|
||||||
|
|
||||||
|
|
||||||
// Get user avatar and rank
|
// Get user avatar and rank
|
||||||
$user_id = $this->user->data['user_id'];
|
$user_id = $this->user->data['user_id'];
|
||||||
$username = $this->user->data['username'];
|
$username = $this->user->data['username'];
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ class welcome extends module_base
|
|||||||
display_custom_bbcodes();
|
display_custom_bbcodes();
|
||||||
$this->user->add_lang('posting');
|
$this->user->add_lang('posting');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<phpunit backupGlobals="true"
|
|
||||||
backupStaticAttributes="true"
|
|
||||||
colors="true"
|
|
||||||
convertErrorsToExceptions="true"
|
|
||||||
convertNoticesToExceptions="true"
|
|
||||||
convertWarningsToExceptions="true"
|
|
||||||
processIsolation="false"
|
|
||||||
stopOnFailure="false"
|
|
||||||
syntaxCheck="false"
|
|
||||||
verbose="true"
|
|
||||||
bootstrap="tests/bootstrap.php">
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="phpBB Gallery Test Suite">
|
|
||||||
<directory suffix="_test.php">./tests/</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<blacklist>
|
|
||||||
<directory>./tests/</directory>
|
|
||||||
</blacklist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
|
||||||
@@ -12,14 +12,13 @@
|
|||||||
verbose="true"
|
verbose="true"
|
||||||
bootstrap="tests/bootstrap.php">
|
bootstrap="tests/bootstrap.php">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpBB Gallery Test Suite">
|
<testsuite name="Board3 Portal Test Suite">
|
||||||
<directory suffix="_test.php">./tests/</directory>
|
<directory suffix="_test.php">./tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<groups>
|
<groups>
|
||||||
<exclude>
|
<exclude>
|
||||||
<group>functional</group>
|
|
||||||
<group>slow</group>
|
<group>slow</group>
|
||||||
</exclude>
|
</exclude>
|
||||||
</groups>
|
</groups>
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<phpunit backupGlobals="true"
|
|
||||||
backupStaticAttributes="true"
|
|
||||||
colors="true"
|
|
||||||
convertErrorsToExceptions="true"
|
|
||||||
convertNoticesToExceptions="true"
|
|
||||||
convertWarningsToExceptions="true"
|
|
||||||
processIsolation="false"
|
|
||||||
stopOnFailure="false"
|
|
||||||
syntaxCheck="false"
|
|
||||||
verbose="true"
|
|
||||||
bootstrap="tests/bootstrap.php">
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="phpBB Gallery Test Suite">
|
|
||||||
<directory suffix="_test.php">./tests/</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<groups>
|
|
||||||
<include>
|
|
||||||
<group>functional</group>
|
|
||||||
</include>
|
|
||||||
</groups>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<blacklist>
|
|
||||||
<directory>./tests/</directory>
|
|
||||||
</blacklist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
|
||||||
@@ -13,9 +13,9 @@
|
|||||||
bootstrap="../tests/bootstrap.php">
|
bootstrap="../tests/bootstrap.php">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpBB Test Suite">
|
<testsuite name="phpBB Test Suite">
|
||||||
<directory suffix="_test.php">../tests/</directory>
|
<directory suffix="_test.php">../tests</directory>
|
||||||
<exclude>tests/functional</exclude>
|
<exclude>../tests/functional</exclude>
|
||||||
<exclude>tests/lint_test.php</exclude>
|
<exclude>../tests/lint_test.php</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="phpBB Functional Tests">
|
<testsuite name="phpBB Functional Tests">
|
||||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
bootstrap="../tests/bootstrap.php">
|
bootstrap="../tests/bootstrap.php">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpBB Test Suite">
|
<testsuite name="phpBB Test Suite">
|
||||||
<directory suffix="_test.php">../tests/</directory>
|
<directory suffix="_test.php">../tests</directory>
|
||||||
<exclude>tests/functional</exclude>
|
<exclude>../tests/functional</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="phpBB Functional Tests">
|
<testsuite name="phpBB Functional Tests">
|
||||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
bootstrap="../tests/bootstrap.php">
|
bootstrap="../tests/bootstrap.php">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpBB Test Suite">
|
<testsuite name="phpBB Test Suite">
|
||||||
<directory suffix="_test.php">../tests/</directory>
|
<directory suffix="_test.php">../tests</directory>
|
||||||
<exclude>tests/functional</exclude>
|
<exclude>../tests/functional</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="phpBB Functional Tests">
|
<testsuite name="phpBB Functional Tests">
|
||||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
||||||
|
|||||||
Reference in New Issue
Block a user