@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 13 | 13 | |
| 14 | -defined('NEWBB_FUNCTIONS_INI') || include __DIR__ . '/functions.ini.php'; |
|
| 14 | +defined('NEWBB_FUNCTIONS_INI') || include __DIR__.'/functions.ini.php'; |
|
| 15 | 15 | define('NEWBB_FUNCTIONS_TOPIC_LOADED', true); |
| 16 | 16 | |
| 17 | 17 | if (!defined('NEWBB_FUNCTIONS_TOPIC')) { |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | if (empty($prefixName)) { |
| 43 | 43 | return $topicTitle; |
| 44 | 44 | } |
| 45 | - $topicPrefix = $prefixColor ? '<em style="font-style: normal; color: ' . $prefixColor . ';">[' . $prefixName . ']</em> ' : '[' . $prefixName . '] '; |
|
| 45 | + $topicPrefix = $prefixColor ? '<em style="font-style: normal; color: '.$prefixColor.';">['.$prefixName.']</em> ' : '['.$prefixName.'] '; |
|
| 46 | 46 | |
| 47 | - return $topicPrefix . $topicTitle; |
|
| 47 | + return $topicPrefix.$topicTitle; |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -39,24 +39,24 @@ discard block |
||
| 39 | 39 | function newbbAttachmentImage($source) |
| 40 | 40 | { |
| 41 | 41 | $img_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments']); |
| 42 | - $img_url = XOOPS_URL . '/' . $GLOBALS['xoopsModuleConfig']['dir_attachments']; |
|
| 43 | - $thumb_path = $img_path . '/thumbs'; |
|
| 44 | - $thumb_url = $img_url . '/thumbs'; |
|
| 42 | + $img_url = XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['dir_attachments']; |
|
| 43 | + $thumb_path = $img_path.'/thumbs'; |
|
| 44 | + $thumb_url = $img_url.'/thumbs'; |
|
| 45 | 45 | |
| 46 | - $thumb = $thumb_path . '/' . $source; |
|
| 47 | - $image = $img_path . '/' . $source; |
|
| 48 | - $thumb_url = $thumb_url . '/' . $source; |
|
| 49 | - $image_url = $img_url . '/' . $source; |
|
| 46 | + $thumb = $thumb_path.'/'.$source; |
|
| 47 | + $image = $img_path.'/'.$source; |
|
| 48 | + $thumb_url = $thumb_url.'/'.$source; |
|
| 49 | + $image_url = $img_url.'/'.$source; |
|
| 50 | 50 | |
| 51 | 51 | $imginfo = @getimagesize($image); |
| 52 | - $img_info = (count($imginfo) > 0) ? $imginfo[0] . 'X' . $imginfo[1] . ' px' : ''; |
|
| 52 | + $img_info = (count($imginfo) > 0) ? $imginfo[0].'X'.$imginfo[1].' px' : ''; |
|
| 53 | 53 | |
| 54 | 54 | if ($GLOBALS['xoopsModuleConfig']['max_image_width'] > 0 |
| 55 | 55 | && $GLOBALS['xoopsModuleConfig']['max_image_height'] > 0) { |
| 56 | 56 | if ($imginfo[0] > $GLOBALS['xoopsModuleConfig']['max_image_width'] |
| 57 | 57 | || $imginfo[1] > $GLOBALS['xoopsModuleConfig']['max_image_height']) { |
| 58 | 58 | //if (!file_exists($thumb_path.'/'.$source) && $imginfo[0] > $GLOBALS['xoopsModuleConfig']['max_img_width']) { |
| 59 | - if (!file_exists($thumb_path . '/' . $source)) { |
|
| 59 | + if (!file_exists($thumb_path.'/'.$source)) { |
|
| 60 | 60 | newbbCreateThumbnail($source, $GLOBALS['xoopsModuleConfig']['max_image_width']); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -65,28 +65,28 @@ discard block |
||
| 65 | 65 | || $imginfo[1] > $GLOBALS['xoopsModuleConfig']['max_image_height']) { |
| 66 | 66 | $pseudo_width = $GLOBALS['xoopsModuleConfig']['max_image_width']; |
| 67 | 67 | $pseudo_height = $GLOBALS['xoopsModuleConfig']['max_image_width'] * ($imginfo[1] / $imginfo[0]); |
| 68 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
| 68 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
| 69 | 69 | } |
| 70 | 70 | // irmtfan to fix Undefined variable: pseudo_height |
| 71 | 71 | if (!empty($pseudo_height) && $GLOBALS['xoopsModuleConfig']['max_image_height'] > 0 |
| 72 | 72 | && $pseudo_height > $GLOBALS['xoopsModuleConfig']['max_image_height']) { |
| 73 | 73 | $pseudo_height = $GLOBALS['xoopsModuleConfig']['max_image_height']; |
| 74 | 74 | $pseudo_width = $GLOBALS['xoopsModuleConfig']['max_image_height'] * ($imginfo[0] / $imginfo[1]); |
| 75 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
| 75 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | if (file_exists($thumb)) { |
| 80 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
| 80 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
| 81 | 81 | // $attachmentImage .= '<img src="' . $thumb_url . '" alt="' . $source . ' ' . $img_info . '" />'; |
| 82 | - $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '" />'; |
|
| 82 | + $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'" />'; |
|
| 83 | 83 | $attachmentImage .= '</a>'; |
| 84 | 84 | } elseif (!empty($pseudo_size)) { |
| 85 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
| 86 | - $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '" />'; |
|
| 85 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
| 86 | + $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'" />'; |
|
| 87 | 87 | $attachmentImage .= '</a>'; |
| 88 | 88 | } elseif (file_exists($image)) { |
| 89 | - $attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '" />'; |
|
| 89 | + $attachmentImage = '<img src="'.$image_url.'" alt="'.$source.' '.$img_info.'" />'; |
|
| 90 | 90 | } else { |
| 91 | 91 | $attachmentImage = ''; |
| 92 | 92 | } |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | $cmd = ''; |
| 105 | 105 | $img_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments']); |
| 106 | - $thumb_path = $img_path . '/thumbs'; |
|
| 107 | - $src_file = $img_path . '/' . $source; |
|
| 108 | - $new_file = $thumb_path . '/' . $source; |
|
| 106 | + $thumb_path = $img_path.'/thumbs'; |
|
| 107 | + $src_file = $img_path.'/'.$source; |
|
| 108 | + $new_file = $thumb_path.'/'.$source; |
|
| 109 | 109 | //$imageLibs = newbb_getImageLibs(); |
| 110 | 110 | |
| 111 | 111 | if (!filesize($src_file) || !is_readable($src_file)) { |
@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) { |
| 132 | 132 | if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) { |
| 133 | 133 | $cur_dir = __DIR__; |
| 134 | - $src_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $src_file) . '"'; |
|
| 135 | - $new_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $new_file) . '"'; |
|
| 134 | + $src_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $src_file).'"'; |
|
| 135 | + $new_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $new_file).'"'; |
|
| 136 | 136 | } else { |
| 137 | 137 | $src_file_im = @escapeshellarg($src_file); |
| 138 | 138 | $new_file_im = @escapeshellarg($new_file); |
| 139 | 139 | } |
| 140 | - $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'] . '/'; |
|
| 141 | - $magick_command = $path . 'convert -quality 85 -antialias -sample ' . $newWidth . 'x' . $newHeight . ' ' . $src_file_im . ' +profile "*" ' . str_replace('\\', '/', $new_file_im) . ''; |
|
| 140 | + $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'].'/'; |
|
| 141 | + $magick_command = $path.'convert -quality 85 -antialias -sample '.$newWidth.'x'.$newHeight.' '.$src_file_im.' +profile "*" '.str_replace('\\', '/', $new_file_im).''; |
|
| 142 | 142 | |
| 143 | 143 | @passthru($magick_command); |
| 144 | 144 | if (file_exists($new_file)) { |
@@ -147,13 +147,13 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) { |
| 150 | - $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'] . '/'; |
|
| 150 | + $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'].'/'; |
|
| 151 | 151 | if (preg_match("/\.png/", $source)) { |
| 152 | - $cmd = $path . "pngtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "pnmtopng > $new_file"; |
|
| 152 | + $cmd = $path."pngtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."pnmtopng > $new_file"; |
|
| 153 | 153 | } elseif (preg_match("/\.(jpg|jpeg)/", $source)) { |
| 154 | - $cmd = $path . "jpegtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "ppmtojpeg -quality=90 > $new_file"; |
|
| 154 | + $cmd = $path."jpegtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."ppmtojpeg -quality=90 > $new_file"; |
|
| 155 | 155 | } elseif (preg_match("/\.gif/", $source)) { |
| 156 | - $cmd = $path . "giftopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | ppmquant 256 | " . $path . "ppmtogif > $new_file"; |
|
| 156 | + $cmd = $path."giftopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ppmquant 256 | ".$path."ppmtogif > $new_file"; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | @exec($cmd, $output, $retval); |
@@ -222,7 +222,7 @@ |
||
| 222 | 222 | return $forum_moderators; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - $sql = 'SELECT forum_moderator FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_forums'); |
|
| 225 | + $sql = 'SELECT forum_moderator FROM '.$GLOBALS['xoopsDB']->prefix('newbb_forums'); |
|
| 226 | 226 | if ($result = $GLOBALS['xoopsDB']->query($sql)) { |
| 227 | 227 | while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) { |
| 228 | 228 | if (empty($myrow['forum_moderator'])) { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $forumImage['facebook'] = $forumImage['twitter'] = $forumImage['linkedin'] = $forumImage['googleplus'] = $forumImage['stumbleupon'] = $forumImage['friendfeed'] = $forumImage['digg'] = $forumImage['reddit'] = $forumImage['delicious'] = $forumImage['technorati'] = $forumImage['wong'] = $forumImage['anonym'] = $forumImage['more'] = $forumImage['less'] = 'icon'; |
| 49 | 49 | |
| 50 | 50 | for ($i = 1; $i <= 5; ++$i) { |
| 51 | - $forumImage['rate' . $i] = 'icon'; |
|
| 51 | + $forumImage['rate'.$i] = 'icon'; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $forumImage['p_delete'] = $forumImage['p_reply'] = $forumImage['p_quote'] = $forumImage['p_edit'] = $forumImage['p_report'] = |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * @package module::newbb |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -include __DIR__ . '/preloads/autoloader.php'; |
|
| 12 | +include __DIR__.'/preloads/autoloader.php'; |
|
| 13 | 13 | |
| 14 | 14 | $moduleDirName = basename(__DIR__); |
| 15 | 15 | $modversion = [ |
@@ -45,24 +45,24 @@ discard block |
||
| 45 | 45 | 'sqlfile' => ['mysql' => 'sql/mysql.sql'], |
| 46 | 46 | // ------------------- Tables ---------------------------- |
| 47 | 47 | 'tables' => [ |
| 48 | - $moduleDirName . '_' . 'archive', |
|
| 49 | - $moduleDirName . '_' . 'categories', |
|
| 50 | - $moduleDirName . '_' . 'votedata', |
|
| 51 | - $moduleDirName . '_' . 'forums', |
|
| 52 | - $moduleDirName . '_' . 'posts', |
|
| 53 | - $moduleDirName . '_' . 'posts_text', |
|
| 54 | - $moduleDirName . '_' . 'topics', |
|
| 55 | - $moduleDirName . '_' . 'online', |
|
| 56 | - $moduleDirName . '_' . 'digest', |
|
| 57 | - $moduleDirName . '_' . 'report', |
|
| 58 | - $moduleDirName . '_' . 'attachments', |
|
| 59 | - $moduleDirName . '_' . 'moderates', |
|
| 60 | - $moduleDirName . '_' . 'reads_forum', |
|
| 61 | - $moduleDirName . '_' . 'reads_topic', |
|
| 62 | - $moduleDirName . '_' . 'type', |
|
| 63 | - $moduleDirName . '_' . 'type_forum', |
|
| 64 | - $moduleDirName . '_' . 'stats', |
|
| 65 | - $moduleDirName . '_' . 'user_stats' |
|
| 48 | + $moduleDirName.'_'.'archive', |
|
| 49 | + $moduleDirName.'_'.'categories', |
|
| 50 | + $moduleDirName.'_'.'votedata', |
|
| 51 | + $moduleDirName.'_'.'forums', |
|
| 52 | + $moduleDirName.'_'.'posts', |
|
| 53 | + $moduleDirName.'_'.'posts_text', |
|
| 54 | + $moduleDirName.'_'.'topics', |
|
| 55 | + $moduleDirName.'_'.'online', |
|
| 56 | + $moduleDirName.'_'.'digest', |
|
| 57 | + $moduleDirName.'_'.'report', |
|
| 58 | + $moduleDirName.'_'.'attachments', |
|
| 59 | + $moduleDirName.'_'.'moderates', |
|
| 60 | + $moduleDirName.'_'.'reads_forum', |
|
| 61 | + $moduleDirName.'_'.'reads_topic', |
|
| 62 | + $moduleDirName.'_'.'type', |
|
| 63 | + $moduleDirName.'_'.'type_forum', |
|
| 64 | + $moduleDirName.'_'.'stats', |
|
| 65 | + $moduleDirName.'_'.'user_stats' |
|
| 66 | 66 | ], |
| 67 | 67 | // ------------------- Admin Menu ------------------- |
| 68 | 68 | 'system_menu' => 1, |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | 'description' => '_MI_NEWBB_ANONYMOUS_PRE_DESC', |
| 604 | 604 | 'formtype' => 'textbox', |
| 605 | 605 | 'valuetype' => 'text', |
| 606 | - 'default' => $GLOBALS['xoopsConfig']['anonymous'] . '-' |
|
| 606 | + 'default' => $GLOBALS['xoopsConfig']['anonymous'].'-' |
|
| 607 | 607 | ]; |
| 608 | 608 | $modversion['config'][] = [ |
| 609 | 609 | 'name' => 'allow_require_reply', |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | 'item_name' => 'topic_id', |
| 731 | 731 | 'allow_bookmark' => 1, |
| 732 | 732 | ]; |
| 733 | -$modversion['notification']['category'][] = [ |
|
| 733 | +$modversion['notification']['category'][] = [ |
|
| 734 | 734 | 'name' => 'forum', |
| 735 | 735 | 'title' => _MI_NEWBB_FORUM_NOTIFY, |
| 736 | 736 | 'description' => _MI_NEWBB_FORUM_NOTIFYDSC, |
@@ -738,13 +738,13 @@ discard block |
||
| 738 | 738 | 'item_name' => 'forum', |
| 739 | 739 | 'allow_bookmark' => 1, |
| 740 | 740 | ]; |
| 741 | -$modversion['notification']['category'][] = [ |
|
| 741 | +$modversion['notification']['category'][] = [ |
|
| 742 | 742 | 'name' => 'global', |
| 743 | 743 | 'title' => _MI_NEWBB_GLOBAL_NOTIFY, |
| 744 | 744 | 'description' => _MI_NEWBB_GLOBAL_NOTIFYDSC, |
| 745 | 745 | 'subscribe_from' => 'index.php', |
| 746 | 746 | ]; |
| 747 | -$modversion['notification']['event'][] = [ |
|
| 747 | +$modversion['notification']['event'][] = [ |
|
| 748 | 748 | 'name' => 'new_post', |
| 749 | 749 | 'category' => 'thread', |
| 750 | 750 | 'title' => _MI_NEWBB_THREAD_NEWPOST_NOTIFY, |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | 'mail_template' => 'thread_newpost_notify', |
| 754 | 754 | 'mail_subject' => _MI_NEWBB_THREAD_NEWPOST_NOTIFYSBJ, |
| 755 | 755 | ]; |
| 756 | -$modversion['notification']['event'][] = [ |
|
| 756 | +$modversion['notification']['event'][] = [ |
|
| 757 | 757 | 'name' => 'new_thread', |
| 758 | 758 | 'category' => 'forum', |
| 759 | 759 | 'title' => _MI_NEWBB_FORUM_NEWTHREAD_NOTIFY, |
@@ -762,7 +762,7 @@ discard block |
||
| 762 | 762 | 'mail_template' => 'forum_newthread_notify', |
| 763 | 763 | 'mail_subject' => _MI_NEWBB_FORUM_NEWTHREAD_NOTIFYSBJ, |
| 764 | 764 | ]; |
| 765 | -$modversion['notification']['event'][] = [ |
|
| 765 | +$modversion['notification']['event'][] = [ |
|
| 766 | 766 | 'name' => 'new_forum', |
| 767 | 767 | 'category' => 'global', |
| 768 | 768 | 'title' => _MI_NEWBB_GLOBAL_NEWFORUM_NOTIFY, |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | 'mail_template' => 'global_newforum_notify', |
| 772 | 772 | 'mail_subject' => _MI_NEWBB_GLOBAL_NEWFORUM_NOTIFYSBJ, |
| 773 | 773 | ]; |
| 774 | -$modversion['notification']['event'][] = [ |
|
| 774 | +$modversion['notification']['event'][] = [ |
|
| 775 | 775 | 'name' => 'new_post', |
| 776 | 776 | 'category' => 'global', |
| 777 | 777 | 'title' => _MI_NEWBB_GLOBAL_NEWPOST_NOTIFY, |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | 'mail_template' => 'global_newpost_notify', |
| 781 | 781 | 'mail_subject' => _MI_NEWBB_GLOBAL_NEWPOST_NOTIFYSBJ, |
| 782 | 782 | ]; |
| 783 | -$modversion['notification']['event'][] = [ |
|
| 783 | +$modversion['notification']['event'][] = [ |
|
| 784 | 784 | 'name' => 'new_post', |
| 785 | 785 | 'category' => 'forum', |
| 786 | 786 | 'title' => _MI_NEWBB_FORUM_NEWPOST_NOTIFY, |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | 'mail_template' => 'forum_newpost_notify', |
| 790 | 790 | 'mail_subject' => _MI_NEWBB_FORUM_NEWPOST_NOTIFYSBJ, |
| 791 | 791 | ]; |
| 792 | -$modversion['notification']['event'][] = [ |
|
| 792 | +$modversion['notification']['event'][] = [ |
|
| 793 | 793 | 'name' => 'new_fullpost', |
| 794 | 794 | 'category' => 'global', |
| 795 | 795 | 'admin_only' => 1, |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | 'mail_template' => 'global_newfullpost_notify', |
| 800 | 800 | 'mail_subject' => _MI_NEWBB_GLOBAL_NEWFULLPOST_NOTIFYSBJ, |
| 801 | 801 | ]; |
| 802 | -$modversion['notification']['event'][] = [ |
|
| 802 | +$modversion['notification']['event'][] = [ |
|
| 803 | 803 | 'name' => 'digest', |
| 804 | 804 | 'category' => 'global', |
| 805 | 805 | 'title' => _MI_NEWBB_GLOBAL_DIGEST_NOTIFY, |
@@ -808,7 +808,7 @@ discard block |
||
| 808 | 808 | 'mail_template' => 'global_digest_notify', |
| 809 | 809 | 'mail_subject' => _MI_NEWBB_GLOBAL_DIGEST_NOTIFYSBJ, |
| 810 | 810 | ]; |
| 811 | -$modversion['notification']['event'][] = [ |
|
| 811 | +$modversion['notification']['event'][] = [ |
|
| 812 | 812 | 'name' => 'new_fullpost', |
| 813 | 813 | 'category' => 'forum', |
| 814 | 814 | 'admin_only' => 1, |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public static function eventCoreIncludeCommonEnd($args) |
| 30 | 30 | { |
| 31 | - include __DIR__ . '/autoloader.php'; |
|
| 31 | + include __DIR__.'/autoloader.php'; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | -spl_autoload_register(function ($class) { |
|
| 6 | +spl_autoload_register(function($class) { |
|
| 7 | 7 | // project-specific namespace prefix |
| 8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 9 | 9 | |
| 10 | 10 | // base directory for the namespace prefix |
| 11 | - $base_dir = __DIR__ . '/../class/'; |
|
| 11 | + $base_dir = __DIR__.'/../class/'; |
|
| 12 | 12 | |
| 13 | 13 | // does the class use the namespace prefix? |
| 14 | 14 | $len = strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
| 24 | 24 | // separators with directory separators in the relative class name, append |
| 25 | 25 | // with .php |
| 26 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 26 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
| 27 | 27 | |
| 28 | 28 | // if the file exists, require it |
| 29 | 29 | if (file_exists($file)) { |
@@ -41,77 +41,77 @@ |
||
| 41 | 41 | $adminmenu[] = [ |
| 42 | 42 | 'title' => _MI_NEWBB_ADMENU_INDEX, |
| 43 | 43 | 'link' => 'admin/index.php', |
| 44 | - 'icon' => $pathIcon32 . 'home.png' |
|
| 44 | + 'icon' => $pathIcon32.'home.png' |
|
| 45 | 45 | ]; |
| 46 | 46 | |
| 47 | 47 | $adminmenu[] = [ |
| 48 | 48 | 'title' => _MI_NEWBB_ADMENU_CATEGORY, |
| 49 | 49 | 'link' => 'admin/admin_cat_manager.php', |
| 50 | - 'icon' => $pathIcon32 . 'category.png' |
|
| 50 | + 'icon' => $pathIcon32.'category.png' |
|
| 51 | 51 | ]; |
| 52 | 52 | |
| 53 | 53 | $adminmenu[] = [ |
| 54 | 54 | 'title' => _MI_NEWBB_ADMENU_FORUM, |
| 55 | 55 | 'link' => 'admin/admin_forum_manager.php', |
| 56 | - 'icon' => $pathIcon32 . 'forums.png' |
|
| 56 | + 'icon' => $pathIcon32.'forums.png' |
|
| 57 | 57 | ]; |
| 58 | 58 | |
| 59 | 59 | $adminmenu[] = [ |
| 60 | 60 | 'title' => _MI_NEWBB_ADMENU_PERMISSION, |
| 61 | 61 | 'link' => 'admin/admin_permissions.php', |
| 62 | - 'icon' => $pathIcon32 . 'permissions.png' |
|
| 62 | + 'icon' => $pathIcon32.'permissions.png' |
|
| 63 | 63 | ]; |
| 64 | 64 | |
| 65 | 65 | $adminmenu[] = [ |
| 66 | 66 | 'title' => _MI_NEWBB_ADMENU_ORDER, |
| 67 | 67 | 'link' => 'admin/admin_forum_reorder.php', |
| 68 | - 'icon' => $pathIcon32 . 'compfile.png' |
|
| 68 | + 'icon' => $pathIcon32.'compfile.png' |
|
| 69 | 69 | ]; |
| 70 | 70 | |
| 71 | 71 | $adminmenu[] = [ |
| 72 | 72 | 'title' => _MI_NEWBB_ADMENU_PRUNE, |
| 73 | 73 | 'link' => 'admin/admin_forum_prune.php', |
| 74 | - 'icon' => $pathIcon32 . 'update.png' |
|
| 74 | + 'icon' => $pathIcon32.'update.png' |
|
| 75 | 75 | ]; |
| 76 | 76 | |
| 77 | 77 | $adminmenu[] = [ |
| 78 | 78 | 'title' => _MI_NEWBB_ADMENU_REPORT, |
| 79 | 79 | 'link' => 'admin/admin_report.php', |
| 80 | - 'icon' => $pathIcon32 . 'content.png' |
|
| 80 | + 'icon' => $pathIcon32.'content.png' |
|
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | 83 | $adminmenu[] = [ |
| 84 | 84 | 'title' => _MI_NEWBB_ADMENU_DIGEST, |
| 85 | 85 | 'link' => 'admin/admin_digest.php', |
| 86 | - 'icon' => $pathIcon32 . 'digest.png' |
|
| 86 | + 'icon' => $pathIcon32.'digest.png' |
|
| 87 | 87 | ]; |
| 88 | 88 | |
| 89 | 89 | $adminmenu[] = [ |
| 90 | 90 | 'title' => _MI_NEWBB_ADMENU_VOTE, |
| 91 | 91 | 'link' => 'admin/admin_votedata.php', |
| 92 | - 'icon' => $pathIcon32 . 'button_ok.png' |
|
| 92 | + 'icon' => $pathIcon32.'button_ok.png' |
|
| 93 | 93 | ]; |
| 94 | 94 | |
| 95 | 95 | $adminmenu[] = [ |
| 96 | 96 | 'title' => _MI_NEWBB_ADMENU_TYPE, |
| 97 | 97 | 'link' => 'admin/admin_type_manager.php', |
| 98 | - 'icon' => $pathIcon32 . 'type.png' |
|
| 98 | + 'icon' => $pathIcon32.'type.png' |
|
| 99 | 99 | ]; |
| 100 | 100 | |
| 101 | 101 | $adminmenu[] = [ |
| 102 | 102 | 'title' => _MI_NEWBB_ADMENU_GROUPMOD, |
| 103 | 103 | 'link' => 'admin/admin_groupmod.php', |
| 104 | - 'icon' => $pathIcon32 . 'groupmod.png' |
|
| 104 | + 'icon' => $pathIcon32.'groupmod.png' |
|
| 105 | 105 | ]; |
| 106 | 106 | |
| 107 | 107 | $adminmenu[] = [ |
| 108 | 108 | 'title' => _MI_NEWBB_ADMENU_SYNC, |
| 109 | 109 | 'link' => 'admin/admin_synchronization.php', |
| 110 | - 'icon' => $pathIcon32 . 'synchronized.png' |
|
| 110 | + 'icon' => $pathIcon32.'synchronized.png' |
|
| 111 | 111 | ]; |
| 112 | 112 | |
| 113 | 113 | $adminmenu[] = [ |
| 114 | 114 | 'title' => _MI_NEWBB_ADMENU_ABOUT, |
| 115 | 115 | 'link' => 'admin/about.php', |
| 116 | - 'icon' => $pathIcon32 . 'about.png' |
|
| 116 | + 'icon' => $pathIcon32.'about.png' |
|
| 117 | 117 | ]; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | global $pathIcon32; |
| 21 | 21 | if (!class_exists('\Xoops', false)) { |
| 22 | - echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>\n"; |
|
| 22 | + echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n"."</div>\n"; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | xoops_cp_footer(); |