diff --git a/contrib/de.xml b/contrib/de.xml
index 7bebe997..4db6962c 100644
--- a/contrib/de.xml
+++ b/contrib/de.xml
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
- 2.0.0b1
+ 2.0.0a1easy
diff --git a/contrib/subsilver2.xml b/contrib/subsilver2.xml
index a9f988b9..e7c4d8e1 100644
--- a/contrib/subsilver2.xml
+++ b/contrib/subsilver2.xml
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
- 2.0.0b1
+ 2.0.0a1easy
diff --git a/contrib/update_106_to_200-a1/contrib/de.xml b/contrib/update_106_to_200a1/contrib/de.xml
similarity index 98%
rename from contrib/update_106_to_200-a1/contrib/de.xml
rename to contrib/update_106_to_200a1/contrib/de.xml
index 664715d5..0d387b42 100644
--- a/contrib/update_106_to_200-a1/contrib/de.xml
+++ b/contrib/update_106_to_200a1/contrib/de.xml
@@ -6,8 +6,8 @@
http://opensource.org/licenses/gpl-license.php GNU General Public License v2
- board3 Portal - German Language Update for 2.0.0-a1
- board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0-a1
+ board3 Portal - German Language Update for 2.0.0a1
+ board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0a1Adds a portal to your forum.
It has several boxes wich can be turned on an off in the ACP and certain settings.
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
- 2.0.0b1
+ 2.0.0a1easy
diff --git a/contrib/update_106_to_200-a1/contrib/modx.prosilver.en.xsl b/contrib/update_106_to_200a1/contrib/modx.prosilver.en.xsl
similarity index 100%
rename from contrib/update_106_to_200-a1/contrib/modx.prosilver.en.xsl
rename to contrib/update_106_to_200a1/contrib/modx.prosilver.en.xsl
diff --git a/contrib/update_106_to_200-a1/contrib/subsilver2.xml b/contrib/update_106_to_200a1/contrib/subsilver2.xml
similarity index 98%
rename from contrib/update_106_to_200-a1/contrib/subsilver2.xml
rename to contrib/update_106_to_200a1/contrib/subsilver2.xml
index b1cc458b..5ca211be 100644
--- a/contrib/update_106_to_200-a1/contrib/subsilver2.xml
+++ b/contrib/update_106_to_200a1/contrib/subsilver2.xml
@@ -6,8 +6,8 @@
http://opensource.org/licenses/gpl-license.php GNU General Public License v2
- board3 Portal - Update subsilver2 style for 2.0.0-a1
- board3 Portal - Aktualisiere das subsilver2 style für 2.0.0-a1
+ board3 Portal - Update subsilver2 style for 2.0.0a1
+ board3 Portal - Aktualisiere das subsilver2 style für 2.0.0a1Adds a portal to your forum.
It has several boxes wich can be turned on an off in the ACP and certain settings.
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
- 2.0.0b1
+ 2.0.0a1easy
diff --git a/contrib/update_106_to_200-a1/modx.prosilver.en.xsl b/contrib/update_106_to_200a1/modx.prosilver.en.xsl
similarity index 100%
rename from contrib/update_106_to_200-a1/modx.prosilver.en.xsl
rename to contrib/update_106_to_200a1/modx.prosilver.en.xsl
diff --git a/contrib/update_106_to_200-a1/update.xml b/contrib/update_106_to_200a1/update.xml
similarity index 96%
rename from contrib/update_106_to_200-a1/update.xml
rename to contrib/update_106_to_200a1/update.xml
index 7662135d..15ea823b 100644
--- a/contrib/update_106_to_200-a1/update.xml
+++ b/contrib/update_106_to_200a1/update.xml
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
- 2.0.0b1
+ 2.0.0a1easy
@@ -97,10 +97,10 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
Installations-Anleitung
Manual
- Update subsilver2 to Board3 Portal 2.0.0-a1
- Aktualisiere subsilver2 für Board3 Portal 2.0.0-a1
- Update German language to Board3 Portal 2.0.0-a1
- Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0-a1
+ Update subsilver2 to Board3 Portal 2.0.0a1
+ Aktualisiere subsilver2 für Board3 Portal 2.0.0a1
+ Update German language to Board3 Portal 2.0.0a1
+ Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0a1
diff --git a/install.xml b/install.xml
index 5db6ea16..8268bb52 100644
--- a/install.xml
+++ b/install.xml
@@ -101,8 +101,8 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
Anleitung für das deutsche Sprachpaket
Manual for subsilver2
Anleitung für subsilver2
- Manual for Updating B3P 1.0.6 to 2.0.0-a1
- Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0-a1
+ Manual for Updating B3P 1.0.6 to 2.0.0a1
+ Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0a1
diff --git a/root/adm/style/portal/acp_portal_menu.html b/root/adm/style/portal/acp_portal_menu.html
index 3dcb8acf..fb42d17f 100644
--- a/root/adm/style/portal/acp_portal_menu.html
+++ b/root/adm/style/portal/acp_portal_menu.html
@@ -47,7 +47,7 @@
-
+ {L_ACP_PORTAL_MENU_PERMISSION_EXP}
diff --git a/root/adm/style/portal/acp_portal_upload_module.html b/root/adm/style/portal/acp_portal_upload_module.html
old mode 100644
new mode 100755
index 00ed8e93..3b17c50b
--- a/root/adm/style/portal/acp_portal_upload_module.html
+++ b/root/adm/style/portal/acp_portal_upload_module.html
@@ -18,10 +18,12 @@
diff --git a/root/language/de/mods/info_acp_portal.php b/root/language/de/mods/info_acp_portal.php
index 2b2a6881..179878cf 100644
--- a/root/language/de/mods/info_acp_portal.php
+++ b/root/language/de/mods/info_acp_portal.php
@@ -102,7 +102,7 @@ $lang = array_merge($lang, array(
// Upload Module
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
- 'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst.',
+ 'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst:',
'MODULE_UPLOAD_GO' => 'Hochladen',
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
'NO_AUTOMOD_INSTALLED' => 'Du hast AutoMOD nicht installiert, AutoMOD ist für dieses Feature aber zwingend erforderlich.',
diff --git a/root/language/de/mods/portal/portal_announcements_module.php b/root/language/de/mods/portal/portal_announcements_module.php
index 4c9fdefb..3964b3c0 100644
--- a/root/language/de/mods/portal/portal_announcements_module.php
+++ b/root/language/de/mods/portal/portal_announcements_module.php
@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
'POSTED_BY' => 'Autor',
'COMMENTS' => 'Kommentare',
'VIEW_COMMENTS' => 'Kommentare anzeigen',
- 'POST_REPLY' => 'Kommentar schreiben',
+ 'PORTAL_POST_REPLY' => 'Kommentar schreiben',
'TOPIC_VIEWS' => 'Zugriffe',
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
diff --git a/root/language/en/mods/info_acp_portal.php b/root/language/en/mods/info_acp_portal.php
old mode 100644
new mode 100755
index 03d86777..62dd38e5
--- a/root/language/en/mods/info_acp_portal.php
+++ b/root/language/en/mods/info_acp_portal.php
@@ -103,7 +103,7 @@ $lang = array_merge($lang, array(
// Upload Module
'ACP_PORTAL_UPLOAD' => 'Upload module',
'MODULE_UPLOAD' => 'Upload a module',
- 'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload.',
+ 'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload:',
'MODULE_UPLOAD_GO' => 'Upload',
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
'NO_AUTOMOD_INSTALLED' => 'You don’t have AutoMOD installed, but AutoMOD is required for this module.',
diff --git a/root/language/en/mods/portal/portal_announcements_module.php b/root/language/en/mods/portal/portal_announcements_module.php
index 7025b266..d0c1db81 100644
--- a/root/language/en/mods/portal/portal_announcements_module.php
+++ b/root/language/en/mods/portal/portal_announcements_module.php
@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
'POSTED_BY' => 'Poster',
'COMMENTS' => 'Comments',
'VIEW_COMMENTS' => 'View comments',
- 'POST_REPLY' => 'Write comments',
+ 'PORTAL_POST_REPLY' => 'Write comments',
'TOPIC_VIEWS' => 'Views',
'JUMP_NEWEST' => 'Jump to newest post',
'JUMP_FIRST' => 'Jump to first post',
diff --git a/root/language/en/mods/portal/portal_news_module.php b/root/language/en/mods/portal/portal_news_module.php
index a887b654..ca2b4dff 100644
--- a/root/language/en/mods/portal/portal_news_module.php
+++ b/root/language/en/mods/portal/portal_news_module.php
@@ -38,7 +38,7 @@ $lang = array_merge($lang, array(
'POSTED_BY' => 'Poster',
'COMMENTS' => 'Comments',
'VIEW_COMMENTS' => 'View comments',
- 'POST_REPLY' => 'Write comments',
+ 'PORTAL_POST_REPLY' => 'Write comments',
'TOPIC_VIEWS' => 'Views',
'JUMP_NEWEST' => 'Jump to newest post',
'JUMP_FIRST' => 'Jump to first post',
diff --git a/root/portal.php b/root/portal.php
old mode 100644
new mode 100755
index 3a42d4ef..4f581cd2
--- a/root/portal.php
+++ b/root/portal.php
@@ -14,35 +14,38 @@ define('IN_PHPBB', true);
define('IN_PORTAL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
-
$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
$portal_root_path = PORTAL_ROOT_PATH;
include($phpbb_root_path . $portal_root_path . 'includes/functions_modules.' . $phpEx);
-include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx);
-//include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
-
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/portal');
-/*
+/**
* Make sure we do an isset first,
* else we will get errors if someone uninstalls the portal and forgets to remove portal.php
*/
if (!isset($config['board3_enable']) || !$config['board3_enable'] || !$auth->acl_get('u_view_portal'))
{
- redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
+ redirect(append_sid($phpbb_root_path . 'index.' . $phpEx));
}
+/**
+* get initial data
+*/
$portal_config = obtain_portal_config();
+$portal_modules = obtain_portal_modules();
-/*
+/**
* set up column_count array
+* with this we can hide unneeded parts of the portal
*/
$module_count = array(
'total' => 0,
@@ -53,9 +56,10 @@ $module_count = array(
'bottom' => 0,
);
-$portal_modules = obtain_portal_modules();
-
-foreach($portal_modules as $row)
+/**
+* start assigning block vars
+*/
+foreach ($portal_modules as $row)
{
$class_name = 'portal_' . $row['module_classname'] . '_module';
if (!class_exists($class_name))
@@ -67,12 +71,14 @@ foreach($portal_modules as $row)
trigger_error(sprintf($user->lang['CLASS_NOT_FOUND'], $class_name, 'portal_' . $row['module_classname']), E_USER_ERROR);
}
-
$module = new $class_name();
- // Check for permissions before loading anything
+ /**
+ * Check for permissions before loading anything
+ * the default group of a user always defines his/her permission (KISS)
+ */
$group_ary = (!empty($row['module_group_ids'])) ? explode(',', $row['module_group_ids']) : '';
- if((is_array($group_ary) && !in_array($user->data['group_id'], $group_ary)))
+ if ((is_array($group_ary) && !in_array($user->data['group_id'], $group_ary)))
{
continue;
}
@@ -115,10 +121,10 @@ foreach($portal_modules as $row)
}
// Custom Blocks that have been defined in the ACP will return an array instead of just the name of the template file
- if(is_array($template_module))
+ if (is_array($template_module))
{
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
- 'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'],
+ 'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'],
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $template_module['image_src'],
'TITLE' => $template_module['title'],
'CODE' => $template_module['code'],
@@ -128,10 +134,10 @@ foreach($portal_modules as $row)
else
{
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
- 'TEMPLATE_FILE' => 'portal/modules/' . $template_module,
+ 'TEMPLATE_FILE' => 'portal/modules/' . $template_module,
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $row['module_image_src'],
- 'IMAGE_WIDTH' => $row['module_image_width'],
- 'IMAGE_HEIGHT' => $row['module_image_height'],
+ 'IMAGE_WIDTH' => $row['module_image_width'],
+ 'IMAGE_HEIGHT' => $row['module_image_height'],
'MODULE_ID' => $row['module_id'],
'TITLE' => (isset($user->lang[$row['module_name']])) ? $user->lang[$row['module_name']] : utf8_normalize_nfc($row['module_name']),
));
@@ -143,20 +149,20 @@ $module_count['total'] = sizeof($portal_modules);
// Redirect to index if there are currently no active modules
if($module_count['total'] < 1)
{
- redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
+ redirect(append_sid($phpbb_root_path . 'index.' . $phpEx));
}
// Assign specific vars
$template->assign_vars(array(
- 'S_SMALL_BLOCK' => true,
- 'S_PORTAL_LEFT_COLUMN' => $config['board3_left_column_width'],
- 'S_PORTAL_RIGHT_COLUMN' => $config['board3_right_column_width'],
+// 'S_SMALL_BLOCK' => true,
+ 'S_PORTAL_LEFT_COLUMN' => $config['board3_left_column_width'],
+ 'S_PORTAL_RIGHT_COLUMN' => $config['board3_right_column_width'],
'S_LEFT_COLUMN' => ($module_count['left'] > 0 && $config['board3_left_column']) ? true : false,
'S_CENTER_COLUMN' => ($module_count['center'] > 0) ? true : false,
'S_RIGHT_COLUMN' => ($module_count['right'] > 0 && $config['board3_right_column']) ? true : false,
'S_TOP_COLUMN' => ($module_count['top'] > 0) ? true : false,
'S_BOTTOM_COLUMN' => ($module_count['bottom'] > 0) ? true : false,
- 'S_DISPLAY_PHPBB_MENU' => $config['board3_phpbb_menu'],
+ 'S_DISPLAY_PHPBB_MENU' => $config['board3_phpbb_menu'],
'S_DISPLAY_JUMPBOX' => $config['board3_display_jumpbox'],
));
@@ -171,4 +177,4 @@ make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
-?>
+?>
\ No newline at end of file
diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php
index 53587b3c..f96d88d0 100644
--- a/root/portal/includes/functions.php
+++ b/root/portal/includes/functions.php
@@ -107,7 +107,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
$topic_icons = array(0);
$have_icons = 0;
- if($permissions == true)
+ if ($permissions == true)
{
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
}
@@ -116,7 +116,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
$disallow_access = array();
}
- if($invert == true)
+ if ($invert == true)
{
$disallow_access = array_merge($disallow_access, $forum_from);
$forum_from = array();
@@ -124,19 +124,19 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
$global_f = 0;
- if(sizeof($forum_from))
+ if (sizeof($forum_from))
{
$disallow_access = array_diff($forum_from, $disallow_access);
- if(!sizeof($disallow_access))
+ if (!sizeof($disallow_access))
{
return array();
}
- foreach($disallow_access as $acc_id)
+ foreach ($disallow_access as $acc_id)
{
$acc_id = (int) $acc_id;
$str_where .= "t.forum_id = $acc_id OR ";
- if($type == 'announcements' && $global_f < 1 && $acc_id > 0)
+ if ($type == 'announcements' && $global_f < 1 && $acc_id > 0)
{
$global_f = $acc_id;
}
@@ -144,7 +144,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
}
else
{
- foreach($disallow_access as $acc_id)
+ foreach ($disallow_access as $acc_id)
{
$acc_id = (int) $acc_id;
$str_where .= "t.forum_id <> $acc_id AND ";
@@ -176,7 +176,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
break;
}
- if($type == 'announcements' && $global_f < 1)
+ if ($type == 'announcements' && $global_f < 1)
{
$sql = 'SELECT
forum_id
@@ -191,7 +191,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if(!sizeof($row))
+ if (!sizeof($row))
{
return array();
}
@@ -278,7 +278,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
while ($row = $db->sql_fetchrow($result))
{
$attachments = array();
- if(($auth->acl_get('u_download') && ($auth->acl_get('f_download', $row['forum_id']) || $row['forum_id'] == 0)) && $config['allow_attachments'] && $row['post_id'] && $row['post_attachment'])
+ if (($auth->acl_get('u_download') && ($auth->acl_get('f_download', $row['forum_id']) || $row['forum_id'] == 0)) && $config['allow_attachments'] && $row['post_id'] && $row['post_attachment'])
{
// Pull attachment data
$sql2 = 'SELECT *
@@ -318,7 +318,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
parse_attachments($row['forum_id'], $message, $attachments, $update_count);
}
- if($global_f < 1)
+ if ($global_f < 1)
{
$global_f = $row['forum_id'];
}
@@ -353,14 +353,14 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
'attachments' => (!empty($attachments)) ? $attachments : array(),
));
$posts['global_id'] = $global_f;
- $i++;
+ ++$i;
}
$db->sql_freeresult($result);
$posts['topic_icons'] = ((max($topic_icons) > 0) && $have_icons) ? true : false;
$posts['topic_count'] = $i;
- if($global_f < 1)
+ if ($global_f < 1)
{
return array();
}
@@ -399,7 +399,7 @@ function is_valid_bbtag($str, $bbuid)
function get_end_bbtag($tag, $bbuid)
{
$etag = '';
- for($i=0;$i 0))
+ while ((strlen($ntext) < $cnt) && (strlen($sl) > 0))
{
$sr = '';
if (substr($sl, 0, 1) == '[')
@@ -497,7 +497,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
{
if (strcmp($elem[1],$sr) != 0)
{
- $tarr[$j++] = $elem;
+ $tarr[++$j] = $elem;
}
}
$arr = $tarr;
@@ -505,7 +505,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
else
{
$arr[$i][0] = $sr;
- $arr[$i++][1] = get_end_bbtag($sr, $bbuid);
+ $arr[++$i][1] = get_end_bbtag($sr, $bbuid);
}
$ret .= $sr;
}
@@ -528,7 +528,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
$ret .= $ap;
$ret = trim($ret);
- if(substr($ret, -4) == '';
}
@@ -586,7 +586,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
- for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
+ for ($i = $start_cnt + 1; $i < $end_cnt; ++$i)
{
$page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . '';
if ($i < $end_cnt - 1)
@@ -600,7 +600,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
{
$page_string .= $seperator;
- for ($i = 2; $i < $total_pages; $i++)
+ for ($i = 2; $i < $total_pages; ++$i)
{
$page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . '';
if ($i < $total_pages)
@@ -701,7 +701,7 @@ function add_endtag ($message = '')
$check = (int) strripos($message, '';
}
@@ -726,7 +726,7 @@ function get_portal_tracking_info($fetch_news)
* group everything by the forum IDs
*/
$count = $fetch_news['topic_count'];
- for ($i = 0; $i < $count; $i++)
+ for ($i = 0; $i < $count; ++$i)
{
$tracking_info[$fetch_news[$i]['forum_id']][] = $fetch_news[$i]['topic_id'];
}
@@ -855,16 +855,16 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
{
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix, $config;
- if(!defined('PORTAL_MODULES_TABLE'))
+ if (!defined('PORTAL_MODULES_TABLE'))
{
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
}
- if($mode == 'install' || $mode == 'update')
+ if ($mode == 'install' || $mode == 'update')
{
$directory = $phpbb_root_path . 'portal/modules/';
- if($purge_modules)
+ if ($purge_modules)
{
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE;
$result = $db->sql_query($sql);
@@ -905,7 +905,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
'portal_links' => array(3, 6),
);
- foreach($modules_ary as $module_name => $module_data)
+ foreach ($modules_ary as $module_name => $module_data)
{
$class_name = $module_name . '_module';
if (!class_exists($class_name))
@@ -935,7 +935,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
$c_class->install($db->sql_nextid());
}
- if($mode == 'update')
+ if ($mode == 'update')
{
/**
* Check if we need to convert from Board3 Portal 1.0.6
@@ -952,11 +952,11 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
$convert = false;
}
- if($convert)
+ if ($convert)
{
$portal_modules = obtain_portal_modules();
- foreach($portal_modules as $row)
+ foreach ($portal_modules as $row)
{
switch($row['module_classname'])
{
@@ -1082,7 +1082,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
}
-/*
+/**
* check if the entered source file actually exists
*/
function check_file_src($value, $key, $module_id)
@@ -1098,16 +1098,16 @@ function check_file_src($value, $key, $module_id)
WHERE s.style_active = 1';
$result = $db->sql_query($sql);
- while($row = $db->sql_fetchrow($result))
+ while ($row = $db->sql_fetchrow($result))
{
- if(!file_exists($phpbb_root_path . 'styles/' . $row['theme_path'] . '/theme/images/portal/' . $value))
+ if (!file_exists($phpbb_root_path . 'styles/' . $row['theme_path'] . '/theme/images/portal/' . $value))
{
$error .= $user->lang['B3P_FILE_NOT_FOUND'] . ': styles/' . $row['theme_path'] . '/theme/images/portal/' . $value . ' ';
}
}
$db->sql_freeresult($result);
- if(!empty($error))
+ if (!empty($error))
{
trigger_error($error . adm_back_link(append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)));
}
diff --git a/root/portal/modules/portal_latest_bots.php b/root/portal/modules/portal_latest_bots.php
old mode 100644
new mode 100755
index 884bdd2c..749edda1
--- a/root/portal/modules/portal_latest_bots.php
+++ b/root/portal/modules/portal_latest_bots.php
@@ -87,7 +87,10 @@ class portal_latest_bots_module
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $config['board3_last_visited_bots_number_' . $module_id]),
));
- return 'latest_bots_side.html';
+ if(!empty($row))
+ {
+ return 'latest_bots_side.html';
+ }
}
function get_template_acp($module_id)