Merge pull request #383 from marc1706/ticket/382
[ticket/382] Fix inheritdoc and functions_upload docblock
This commit is contained in:
@@ -266,7 +266,7 @@ class portal_upload
|
|||||||
* @param $from string Can be a file or a directory. Will move either the file or all files within the directory
|
* @param $from string Can be a file or a directory. Will move either the file or all files within the directory
|
||||||
* @param $to string Where to move the file(s) to. If not specified then will get moved to the root folder
|
* @param $to string Where to move the file(s) to. If not specified then will get moved to the root folder
|
||||||
* @param $strip Used for FTP only
|
* @param $strip Used for FTP only
|
||||||
* @return mixed: Bool true on success, error string on failure, NULL if no action was taken
|
* @return mixed Bool true on success, error string on failure, NULL if no action was taken
|
||||||
*
|
*
|
||||||
* NOTE: function should preferably not return in case of failure on only one file.
|
* NOTE: function should preferably not return in case of failure on only one file.
|
||||||
* The current method makes error handling difficult
|
* The current method makes error handling difficult
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -231,7 +231,7 @@ class announcements extends module_base
|
|||||||
// unread?
|
// unread?
|
||||||
$forum_id = $fetch_news[$i]['forum_id'];
|
$forum_id = $fetch_news[$i]['forum_id'];
|
||||||
$topic_id = $fetch_news[$i]['topic_id'];
|
$topic_id = $fetch_news[$i]['topic_id'];
|
||||||
//$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
|
|
||||||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||||
$real_forum_id = ($forum_id == 0) ? $fetch_news['global_id']: $forum_id;
|
$real_forum_id = ($forum_id == 0) ? $fetch_news['global_id']: $forum_id;
|
||||||
$read_full_url = ($this->request->is_set('ap')) ? 'ap='. $start . '&announcement=' . $i . '#a' . $i : 'announcement=' . $i . '#a' . $i;
|
$read_full_url = ($this->request->is_set('ap')) ? 'ap='. $start . '&announcement=' . $i . '#a' . $i : 'announcement=' . $i . '#a' . $i;
|
||||||
@@ -243,7 +243,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$replies = ($this->auth->acl_get('m_approve', $forum_id)) ? $fetch_news[$i]['topic_replies_real'] : $fetch_news[$i]['topic_replies'];
|
$replies = ($this->auth->acl_get('m_approve', $forum_id)) ? $fetch_news[$i]['topic_replies_real'] : $fetch_news[$i]['topic_replies'];
|
||||||
$folder_img = $folder_alt = $topic_type = $folder = $folder_new = '';
|
|
||||||
switch ($fetch_news[$i]['topic_type'])
|
switch ($fetch_news[$i]['topic_type'])
|
||||||
{
|
{
|
||||||
case POST_GLOBAL:
|
case POST_GLOBAL:
|
||||||
@@ -270,10 +270,7 @@ class announcements extends module_base
|
|||||||
$folder .= '_locked';
|
$folder .= '_locked';
|
||||||
$folder_new .= '_locked';
|
$folder_new .= '_locked';
|
||||||
}
|
}
|
||||||
if ($fetch_news[$i]['topic_type'] == POST_GLOBAL)
|
|
||||||
{
|
|
||||||
$global_announce_list[$fetch_news[$i]['topic_id']] = true;
|
|
||||||
}
|
|
||||||
if ($fetch_news[$i]['topic_posted'])
|
if ($fetch_news[$i]['topic_posted'])
|
||||||
{
|
{
|
||||||
$folder .= '_mine';
|
$folder .= '_mine';
|
||||||
@@ -336,7 +333,7 @@ class announcements extends module_base
|
|||||||
if ($this->config['board3_number_of_announcements_' . $module_id] != 0 && $this->config['board3_announcements_archive_' . $module_id])
|
if ($this->config['board3_number_of_announcements_' . $module_id] != 0 && $this->config['board3_announcements_archive_' . $module_id])
|
||||||
{
|
{
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
'AP_PAGINATION' => $pagination,
|
'AP_PAGINATION' => (isset($pagination)) ? $pagination : '',
|
||||||
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
||||||
'AP_PAGE_NUMBER' => $this->pagination->on_page($total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start))
|
'AP_PAGE_NUMBER' => $this->pagination->on_page($total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start))
|
||||||
);
|
);
|
||||||
@@ -359,7 +356,7 @@ class announcements extends module_base
|
|||||||
|
|
||||||
$forum_id = $fetch_news[$i]['forum_id'];
|
$forum_id = $fetch_news[$i]['forum_id'];
|
||||||
$topic_id = $fetch_news[$i]['topic_id'];
|
$topic_id = $fetch_news[$i]['topic_id'];
|
||||||
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
|
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id);
|
||||||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||||
$open_bracket = '[ ';
|
$open_bracket = '[ ';
|
||||||
$close_bracket = ' ]';
|
$close_bracket = ' ]';
|
||||||
@@ -412,7 +409,7 @@ class announcements extends module_base
|
|||||||
if ($this->config['board3_number_of_announcements_' . $module_id] <> 0 && $this->config['board3_announcements_archive_' . $module_id])
|
if ($this->config['board3_number_of_announcements_' . $module_id] <> 0 && $this->config['board3_announcements_archive_' . $module_id])
|
||||||
{
|
{
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
'AP_PAGINATION' => $pagination,
|
'AP_PAGINATION' => (!empty($pagination)) ? $pagination : '',
|
||||||
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
||||||
'AP_PAGE_NUMBER' => $this->pagination->on_page($total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start))
|
'AP_PAGE_NUMBER' => $this->pagination->on_page($total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start))
|
||||||
);
|
);
|
||||||
@@ -445,7 +442,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -467,7 +464,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -485,7 +482,7 @@ class announcements extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class attachments extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@ class attachments extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -111,7 +111,7 @@ class attachments extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -130,7 +130,7 @@ class attachments extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -144,7 +144,7 @@ class attachments extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class birthday_list extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -158,7 +158,7 @@ class birthday_list extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -172,7 +172,7 @@ class birthday_list extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -181,7 +181,7 @@ class birthday_list extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class calendar extends module_base
|
|||||||
* additional variables
|
* additional variables
|
||||||
*/
|
*/
|
||||||
protected $mini_cal_fdow;
|
protected $mini_cal_fdow;
|
||||||
|
protected $mini_cal_month;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User datetime object
|
* User datetime object
|
||||||
@@ -143,7 +144,7 @@ class calendar extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -177,7 +178,6 @@ class calendar extends module_base
|
|||||||
$mini_cal_count = $this->mini_cal_fdow;
|
$mini_cal_count = $this->mini_cal_fdow;
|
||||||
$mini_cal_this_year = $this->dateYYYY;
|
$mini_cal_this_year = $this->dateYYYY;
|
||||||
$mini_cal_this_month = $this->dateMM;
|
$mini_cal_this_month = $this->dateMM;
|
||||||
$mini_cal_this_day = $this->dateDD;
|
|
||||||
$mini_cal_month_days = $this->daysMonth;
|
$mini_cal_month_days = $this->daysMonth;
|
||||||
|
|
||||||
// output our general calendar bits
|
// output our general calendar bits
|
||||||
@@ -264,6 +264,7 @@ class calendar extends module_base
|
|||||||
|
|
||||||
if (!empty($events) && $this->config['board3_display_events_' . $module_id])
|
if (!empty($events) && $this->config['board3_display_events_' . $module_id])
|
||||||
{
|
{
|
||||||
|
$time_ary = array();
|
||||||
// we sort the $events array by the start time
|
// we sort the $events array by the start time
|
||||||
foreach ($events as $key => $cur_event)
|
foreach ($events as $key => $cur_event)
|
||||||
{
|
{
|
||||||
@@ -337,7 +338,7 @@ class calendar extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -357,7 +358,7 @@ class calendar extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -374,7 +375,7 @@ class calendar extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -520,6 +521,7 @@ class calendar extends module_base
|
|||||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->data['user_ip'], 'LOG_PORTAL_EVENT_ADDED', false, array($event_title));
|
$this->log->add('admin', $this->user->data['user_id'], $this->user->data['user_ip'], 'LOG_PORTAL_EVENT_ADDED', false, array($event_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$time_ary = array();
|
||||||
// we sort the $events array by the start time
|
// we sort the $events array by the start time
|
||||||
foreach ($events as $key => $cur_event)
|
foreach ($events as $key => $cur_event)
|
||||||
{
|
{
|
||||||
@@ -601,8 +603,6 @@ class calendar extends module_base
|
|||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i < sizeof($events); $i++)
|
for ($i = 0; $i < sizeof($events); $i++)
|
||||||
@@ -618,7 +618,7 @@ class calendar extends module_base
|
|||||||
'EVENT_TITLE' => ($action != 'add') ? ((isset($this->user->lang[$events[$i]['title']])) ? $this->user->lang[$events[$i]['title']] : $events[$i]['title']) : '',
|
'EVENT_TITLE' => ($action != 'add') ? ((isset($this->user->lang[$events[$i]['title']])) ? $this->user->lang[$events[$i]['title']] : $events[$i]['title']) : '',
|
||||||
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
|
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
|
||||||
'EVENT_START' => ($action != 'add') ? $this->user->format_date($events[$i]['start_time'], $start_time_format) : '',
|
'EVENT_START' => ($action != 'add') ? $this->user->format_date($events[$i]['start_time'], $start_time_format) : '',
|
||||||
'EVENT_END' => ($action != 'add' && !$event_all_day) ? $this->user->format_date($events[$i]['end_time'], $end_time_format) : '',
|
'EVENT_END' => ($action != 'add' && !$event_all_day && !empty($end_time_format)) ? $this->user->format_date($events[$i]['end_time'], $end_time_format) : '',
|
||||||
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $this->validate_url($events[$i]['url']) : '',
|
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $this->validate_url($events[$i]['url']) : '',
|
||||||
'EVENT_URL_RAW' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $events[$i]['url'] : '',
|
'EVENT_URL_RAW' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $events[$i]['url'] : '',
|
||||||
'U_EDIT' => $u_action . '&action=edit&id=' . $i,
|
'U_EDIT' => $u_action . '&action=edit&id=' . $i,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class clock extends module_base
|
|||||||
public $language = 'portal_clock_module';
|
public $language = 'portal_clock_module';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ class clock extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class custom extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@ class custom extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ class custom extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -126,7 +126,7 @@ class custom extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -142,7 +142,7 @@ class custom extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -202,7 +202,7 @@ class custom extends module_base
|
|||||||
$custom_image_src = $this->request->variable('module_image', '', true);
|
$custom_image_src = $this->request->variable('module_image', '', true);
|
||||||
$groups_ary = array();
|
$groups_ary = array();
|
||||||
$uid = $bitfield = $flags = '';
|
$uid = $bitfield = $flags = '';
|
||||||
$options = 7;
|
|
||||||
if ($custom_bbcode)
|
if ($custom_bbcode)
|
||||||
{
|
{
|
||||||
generate_text_for_storage($custom_code, $uid, $bitfield, $flags, true, true, true);
|
generate_text_for_storage($custom_code, $uid, $bitfield, $flags, true, true, true);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class modulename extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,7 @@ class modulename extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -95,7 +95,7 @@ class modulename extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -110,7 +110,7 @@ class modulename extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ class modulename extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class donation extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@ class donation extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -91,7 +91,7 @@ class donation extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ class donation extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -116,7 +116,7 @@ class donation extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class forumlist extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -109,7 +109,7 @@ class forumlist extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class friends extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -131,7 +131,7 @@ class friends extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -145,7 +145,7 @@ class friends extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -154,7 +154,7 @@ class friends extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class latest_bots extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ class latest_bots extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ class latest_bots extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ class latest_bots extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class latest_members extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -94,7 +94,7 @@ class latest_members extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@ class latest_members extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -117,7 +117,7 @@ class latest_members extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class leaders extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -213,6 +213,10 @@ class leaders extends module_base
|
|||||||
{
|
{
|
||||||
$which_row = 'b3p_moderators';
|
$which_row = 'b3p_moderators';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($row['group_type'] == GROUP_HIDDEN && !$this->auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $this->user->data['user_id'])
|
if ($row['group_type'] == GROUP_HIDDEN && !$this->auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $this->user->data['user_id'])
|
||||||
{
|
{
|
||||||
@@ -244,7 +248,7 @@ class leaders extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -258,7 +262,7 @@ class leaders extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -268,7 +272,7 @@ class leaders extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class link_us extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@ class link_us extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -102,11 +102,10 @@ class links extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
$links = array();
|
|
||||||
$portal_config = obtain_portal_config();
|
$portal_config = obtain_portal_config();
|
||||||
|
|
||||||
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
||||||
@@ -144,7 +143,7 @@ class links extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -160,7 +159,7 @@ class links extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -205,7 +204,7 @@ class links extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -243,8 +242,6 @@ class links extends module_base
|
|||||||
$link_id = $this->request->variable('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
$link_id = $this->request->variable('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
||||||
$portal_config = obtain_portal_config();
|
$portal_config = obtain_portal_config();
|
||||||
|
|
||||||
$links = array();
|
|
||||||
|
|
||||||
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
||||||
|
|
||||||
$u_action = append_sid('index.' . $this->php_ext, 'i=\board3\portal\acp\portal_module&mode=config&module_id=' . $module_id);
|
$u_action = append_sid('index.' . $this->php_ext, 'i=\board3\portal\acp\portal_module&mode=config&module_id=' . $module_id);
|
||||||
@@ -430,8 +427,6 @@ class links extends module_base
|
|||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i < sizeof($links); $i++)
|
for ($i = 0; $i < sizeof($links); $i++)
|
||||||
|
|||||||
@@ -103,11 +103,10 @@ class main_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
$links = array();
|
|
||||||
$portal_config = obtain_portal_config();
|
$portal_config = obtain_portal_config();
|
||||||
|
|
||||||
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
||||||
@@ -154,7 +153,7 @@ class main_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -169,12 +168,13 @@ class main_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
// get the correct group IDs from the database
|
// get the correct group IDs from the database
|
||||||
$in_ary = array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA');
|
$in_ary = array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA');
|
||||||
|
$groups_ary = array();
|
||||||
|
|
||||||
$sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . ' WHERE ' . $this->db->sql_in_set('group_name', $in_ary);
|
$sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . ' WHERE ' . $this->db->sql_in_set('group_name', $in_ary);
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
@@ -260,7 +260,7 @@ class main_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -298,8 +298,6 @@ class main_menu extends module_base
|
|||||||
$link_id = $this->request->variable('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
$link_id = $this->request->variable('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
||||||
$portal_config = obtain_portal_config();
|
$portal_config = obtain_portal_config();
|
||||||
|
|
||||||
$links = array();
|
|
||||||
|
|
||||||
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
||||||
|
|
||||||
$u_action = append_sid('index.' . $this->php_ext, 'i=%5Cboard3%5Cportal%5Cacp%5Cportal_module&mode=config&module_id=' . $module_id);
|
$u_action = append_sid('index.' . $this->php_ext, 'i=%5Cboard3%5Cportal%5Cacp%5Cportal_module&mode=config&module_id=' . $module_id);
|
||||||
@@ -492,8 +490,6 @@ class main_menu extends module_base
|
|||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i < sizeof($links); $i++)
|
for ($i = 0; $i < sizeof($links); $i++)
|
||||||
|
|||||||
@@ -14,8 +14,20 @@ namespace board3\portal\modules;
|
|||||||
*/
|
*/
|
||||||
class module_base implements module_interface
|
class module_base implements module_interface
|
||||||
{
|
{
|
||||||
|
/** @var int Module's allowed columns */
|
||||||
|
protected $columns;
|
||||||
|
|
||||||
|
/** @var string Module name */
|
||||||
|
protected $name;
|
||||||
|
|
||||||
|
/** @var string Module image source */
|
||||||
|
protected $image_src;
|
||||||
|
|
||||||
|
/** @var string Module language file */
|
||||||
|
protected $language;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_allowed_columns()
|
public function get_allowed_columns()
|
||||||
{
|
{
|
||||||
@@ -23,7 +35,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_name()
|
public function get_name()
|
||||||
{
|
{
|
||||||
@@ -31,7 +43,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_image()
|
public function get_image()
|
||||||
{
|
{
|
||||||
@@ -39,7 +51,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_language()
|
public function get_language()
|
||||||
{
|
{
|
||||||
@@ -47,7 +59,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -55,7 +67,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -63,15 +75,15 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -79,7 +91,7 @@ class module_base implements module_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ interface module_interface
|
|||||||
*
|
*
|
||||||
* @param int $module_id Module's ID
|
* @param int $module_id Module's ID
|
||||||
*
|
*
|
||||||
* @return string Module template file
|
* @return string|array Module template file
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id);
|
public function get_template_side($module_id);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ interface module_interface
|
|||||||
*
|
*
|
||||||
* @param int $module_id Module's ID
|
* @param int $module_id Module's ID
|
||||||
*
|
*
|
||||||
* @return string Module template file
|
* @return string|array Module template file
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id);
|
public function get_template_center($module_id);
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class news extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -119,6 +119,7 @@ class news extends module_base
|
|||||||
$this->user->add_lang('viewforum');
|
$this->user->add_lang('viewforum');
|
||||||
$start = $this->request->variable('np', 0);
|
$start = $this->request->variable('np', 0);
|
||||||
$start = ($start < 0) ? 0 : $start;
|
$start = ($start < 0) ? 0 : $start;
|
||||||
|
$total_news = 1;
|
||||||
|
|
||||||
// Fetch news from portal functions.php with check if "read full" is requested.
|
// Fetch news from portal functions.php with check if "read full" is requested.
|
||||||
$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;
|
||||||
@@ -234,7 +235,7 @@ class news extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$replies = ($this->auth->acl_get('m_approve', $forum_id)) ? $fetch_news[$i]['topic_replies_real'] : $fetch_news[$i]['topic_replies'];
|
$replies = ($this->auth->acl_get('m_approve', $forum_id)) ? $fetch_news[$i]['topic_replies_real'] : $fetch_news[$i]['topic_replies'];
|
||||||
$folder_img = $folder_alt = $topic_type = $folder = $folder_new = '';
|
|
||||||
switch ($fetch_news[$i]['topic_type'])
|
switch ($fetch_news[$i]['topic_type'])
|
||||||
{
|
{
|
||||||
case POST_STICKY:
|
case POST_STICKY:
|
||||||
@@ -325,7 +326,7 @@ class news extends module_base
|
|||||||
if ($this->config['board3_number_of_news_' . $module_id] <> 0 && $this->config['board3_news_archive_' . $module_id])
|
if ($this->config['board3_number_of_news_' . $module_id] <> 0 && $this->config['board3_news_archive_' . $module_id])
|
||||||
{
|
{
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
'NP_PAGINATION' => $pagination,
|
'NP_PAGINATION' => (!empty($pagination)) ? $pagination : '',
|
||||||
'TOTAL_NEWS' => ($total_news == 1) ? sprintf($this->user->lang['VIEW_FORUM_TOPICS'][1], $total_news) : sprintf($this->user->lang['VIEW_FORUM_TOPICS'][2], $total_news),
|
'TOTAL_NEWS' => ($total_news == 1) ? sprintf($this->user->lang['VIEW_FORUM_TOPICS'][1], $total_news) : sprintf($this->user->lang['VIEW_FORUM_TOPICS'][2], $total_news),
|
||||||
'NP_PAGE_NUMBER' => $this->pagination->on_page($total_news, $this->config['board3_number_of_news_' . $module_id], $start))
|
'NP_PAGE_NUMBER' => $this->pagination->on_page($total_news, $this->config['board3_number_of_news_' . $module_id], $start))
|
||||||
);
|
);
|
||||||
@@ -389,7 +390,7 @@ class news extends module_base
|
|||||||
if ($this->config['board3_number_of_news_' . $module_id] <> 0 && $this->config['board3_news_archive_' . $module_id])
|
if ($this->config['board3_number_of_news_' . $module_id] <> 0 && $this->config['board3_news_archive_' . $module_id])
|
||||||
{
|
{
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
'NP_PAGINATION' => $pagination,
|
'NP_PAGINATION' => (!empty($pagination)) ? $pagination : '',
|
||||||
'TOTAL_NEWS' => ($total_news == 1) ? $this->user->lang['VIEW_FORUM_TOPIC'] : $this->user->lang('VIEW_FORUM_TOPICS', $total_news),
|
'TOTAL_NEWS' => ($total_news == 1) ? $this->user->lang['VIEW_FORUM_TOPIC'] : $this->user->lang('VIEW_FORUM_TOPICS', $total_news),
|
||||||
'NP_PAGE_NUMBER' => $this->pagination->on_page($total_news, $this->config['board3_number_of_news_' . $module_id], $start))
|
'NP_PAGE_NUMBER' => $this->pagination->on_page($total_news, $this->config['board3_number_of_news_' . $module_id], $start))
|
||||||
);
|
);
|
||||||
@@ -424,7 +425,7 @@ class news extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -447,7 +448,7 @@ class news extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -465,7 +466,7 @@ class news extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -130,7 +130,7 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -143,7 +143,7 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -209,7 +209,7 @@ class poll extends module_base
|
|||||||
// Cookie based guest tracking ... I don't like this but hum ho
|
// Cookie based guest tracking ... I don't like this but hum ho
|
||||||
// it's oft requested. This relies on "nice" users who don't feel
|
// it's oft requested. This relies on "nice" users who don't feel
|
||||||
// the need to delete cookies to mess with results.
|
// the need to delete cookies to mess with results.
|
||||||
if ($request->is_set($this->config['cookie_name'] . '_poll_' . $up_topic_id, \phpbb\request\request_interface::COOKIE))
|
if ($this->request->is_set($this->config['cookie_name'] . '_poll_' . $up_topic_id, \phpbb\request\request_interface::COOKIE))
|
||||||
{
|
{
|
||||||
$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $up_topic_id, '', true, \phpbb\request\request_interface::COOKIE));
|
$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $up_topic_id, '', true, \phpbb\request\request_interface::COOKIE));
|
||||||
$cur_voted_id = array_map('intval', $cur_voted_id);
|
$cur_voted_id = array_map('intval', $cur_voted_id);
|
||||||
@@ -317,12 +317,9 @@ class poll extends module_base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$where = '';
|
|
||||||
$poll_forums = false;
|
$poll_forums = false;
|
||||||
|
|
||||||
// Get readable forums
|
// Get readable forums
|
||||||
$forum_list = array();
|
|
||||||
|
|
||||||
$forum_list = array_unique(array_keys($this->auth->acl_getf('f_read', true)));
|
$forum_list = array_unique(array_keys($this->auth->acl_getf('f_read', true)));
|
||||||
|
|
||||||
if($this->config['board3_poll_topic_id_' . $module_id] !== '')
|
if($this->config['board3_poll_topic_id_' . $module_id] !== '')
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class random_member extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@ class random_member extends module_base
|
|||||||
|
|
||||||
$avatar_img = phpbb_get_avatar(\phpbb\avatar\manager::clean_row($row, 'user'), 'USER_AVATAR');
|
$avatar_img = phpbb_get_avatar(\phpbb\avatar\manager::clean_row($row, 'user'), 'USER_AVATAR');
|
||||||
|
|
||||||
$rank_title = $rank_img = '';
|
$rank_title = $rank_img = $rank_img_src = '';
|
||||||
get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||||
|
|
||||||
$username = $row['username'];
|
$username = $row['username'];
|
||||||
@@ -138,7 +138,7 @@ class random_member extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class recent extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -209,7 +209,7 @@ class recent extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -226,7 +226,7 @@ class recent extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -238,7 +238,7 @@ class recent extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class search extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -81,7 +81,7 @@ class search extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class statistics extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ class statistics extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class stylechanger extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -125,7 +125,7 @@ class stylechanger extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class topposters extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ class topposters extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -115,7 +115,7 @@ class topposters extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -124,7 +124,7 @@ class topposters extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class user_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -113,7 +113,6 @@ class user_menu extends module_base
|
|||||||
|
|
||||||
if ($this->auth->acl_get('m_approve'))
|
if ($this->auth->acl_get('m_approve'))
|
||||||
{
|
{
|
||||||
$m_approve_fid_ary = array(-1);
|
|
||||||
$m_approve_fid_sql = '';
|
$m_approve_fid_sql = '';
|
||||||
}
|
}
|
||||||
else if ($this->auth->acl_getf_global('m_approve'))
|
else if ($this->auth->acl_getf_global('m_approve'))
|
||||||
@@ -123,7 +122,6 @@ class user_menu extends module_base
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$m_approve_fid_ary = array();
|
|
||||||
$m_approve_fid_sql = ' AND p.post_visibility = 1';
|
$m_approve_fid_sql = ' AND p.post_visibility = 1';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +139,6 @@ class user_menu extends module_base
|
|||||||
$sql_where = 'AND t.topic_moved_id = 0
|
$sql_where = 'AND t.topic_moved_id = 0
|
||||||
' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
||||||
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $this->db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
|
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $this->db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
|
||||||
$unread_list = array();
|
|
||||||
$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);
|
||||||
|
|
||||||
@@ -150,7 +147,7 @@ class user_menu extends module_base
|
|||||||
$username = $this->user->data['username'];
|
$username = $this->user->data['username'];
|
||||||
$colour = $this->user->data['user_colour'];
|
$colour = $this->user->data['user_colour'];
|
||||||
$avatar_img = phpbb_get_avatar(\phpbb\avatar\manager::clean_row($this->user->data, 'user'), 'USER_AVATAR');
|
$avatar_img = phpbb_get_avatar(\phpbb\avatar\manager::clean_row($this->user->data, 'user'), 'USER_AVATAR');
|
||||||
$rank_title = $rank_img = '';
|
$rank_title = $rank_img = $rank_img_src = '';
|
||||||
\get_user_rank($this->user->data['user_rank'], $this->user->data['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
\get_user_rank($this->user->data['user_rank'], $this->user->data['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||||
|
|
||||||
// Assign specific vars
|
// Assign specific vars
|
||||||
@@ -198,7 +195,7 @@ class user_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -212,7 +209,7 @@ class user_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -222,7 +219,7 @@ class user_menu extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class welcome extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ class welcome extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ class welcome extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function install($module_id)
|
public function install($module_id)
|
||||||
{
|
{
|
||||||
@@ -132,7 +132,7 @@ class welcome extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function uninstall($module_id, $db)
|
public function uninstall($module_id, $db)
|
||||||
{
|
{
|
||||||
@@ -184,7 +184,6 @@ class welcome extends module_base
|
|||||||
|
|
||||||
$welcome_message = $this->request->variable('welcome_message', '', true);
|
$welcome_message = $this->request->variable('welcome_message', '', true);
|
||||||
$uid = $bitfield = $flags = '';
|
$uid = $bitfield = $flags = '';
|
||||||
$options = 7;
|
|
||||||
generate_text_for_storage($welcome_message, $uid, $bitfield, $flags, true, true, true);
|
generate_text_for_storage($welcome_message, $uid, $bitfield, $flags, true, true, true);
|
||||||
|
|
||||||
// first check for obvious errors, we don't want to waste server resources
|
// first check for obvious errors, we don't want to waste server resources
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class whois_online extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_center($module_id)
|
public function get_template_center($module_id)
|
||||||
{
|
{
|
||||||
@@ -139,7 +139,7 @@ class whois_online extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_side($module_id)
|
public function get_template_side($module_id)
|
||||||
{
|
{
|
||||||
@@ -147,7 +147,7 @@ class whois_online extends module_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function get_template_acp($module_id)
|
public function get_template_acp($module_id)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user