@@ -54,9 +54,9 @@ |
||
54 | 54 | $imageselect_img = new Xoops\Form\Select($imgpath_img, 'rank_image', $blank_img); |
55 | 55 | $imageselect_img->addOption($blank_img, $blank_img); |
56 | 56 | \Xoops\Core\Lists\ImageFile::setOptionsArray($imageselect_img, $xoops->path('uploads/ranks')); |
57 | - $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"" . \XoopsBaseConfig::get('uploads-url') . "\")'"); |
|
57 | + $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"".\XoopsBaseConfig::get('uploads-url')."\")'"); |
|
58 | 58 | $imgtray_img->addElement($imageselect_img, false); |
59 | - $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='" . \XoopsBaseConfig::get('uploads-url') . "/ranks/" . $blank_img . "' name='image_img' id='xo-ranks-img' alt='' />")); |
|
59 | + $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='".\XoopsBaseConfig::get('uploads-url')."/ranks/".$blank_img."' name='image_img' id='xo-ranks-img' alt='' />")); |
|
60 | 60 | |
61 | 61 | $fileseltray_img = new Xoops\Form\ElementTray('<br />', '<br /><br />'); |
62 | 62 | $fileseltray_img->addElement(new Xoops\Form\File(_AM_USERRANK_UPLOAD, 'rank_image'), false); |
@@ -172,7 +172,7 @@ |
||
172 | 172 | // Delete file |
173 | 173 | $file = $obj->getVar('avatar_file'); |
174 | 174 | if ($file !== 'avatars/blank.gif') { |
175 | - $fullname = $xoops_upload_path . '/' . $file; |
|
175 | + $fullname = $xoops_upload_path . '/' . $file; |
|
176 | 176 | if (is_file($fullname)) { |
177 | 177 | chmod($fullname, 0777); |
178 | 178 | unlink($fullname); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | // Get main instance |
27 | 27 | $xoops = Xoops::getInstance(); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $xoops->redirect('avatar_custom.php', 3, implode('<br />', $xoops->security()->getErrors())); |
116 | 116 | } |
117 | 117 | $uploader_avatars_img = |
118 | - new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height); |
|
118 | + new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height); |
|
119 | 119 | // Get avatar id |
120 | 120 | $avatar_id = Request::getInt('avatar_id', 0); |
121 | 121 | if ($avatar_id > 0) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $error_msg = ''; |
127 | 127 | $obj->setVars($_POST); |
128 | 128 | if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) { |
129 | - $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />'; |
|
129 | + $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />'; |
|
130 | 130 | $obj->setVar("avatar_weight", 0); |
131 | 131 | } else { |
132 | 132 | $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0)); |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | $obj->setVar('avatar_file', 'avatars/blank.gif'); |
141 | 141 | } else { |
142 | 142 | $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType()); |
143 | - $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName()); |
|
143 | + $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName()); |
|
144 | 144 | } |
145 | 145 | } else { |
146 | 146 | $file = Request::getString('avatar_file', 'blank.gif'); |
147 | - $obj->setVar('avatar_file', 'avatars/' . $file); |
|
147 | + $obj->setVar('avatar_file', 'avatars/'.$file); |
|
148 | 148 | } |
149 | 149 | if ($error_msg == '') { |
150 | 150 | if ($avatar_Handler->insert($obj)) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | // Delete file |
173 | 173 | $file = $obj->getVar('avatar_file'); |
174 | 174 | if ($file !== 'avatars/blank.gif') { |
175 | - $fullname = $xoops_upload_path . '/' . $file; |
|
175 | + $fullname = $xoops_upload_path.'/'.$file; |
|
176 | 176 | if (is_file($fullname)) { |
177 | 177 | chmod($fullname, 0777); |
178 | 178 | unlink($fullname); |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | if ($avatar_id > 0) { |
195 | 195 | // Define Stylesheet |
196 | 196 | $xoops->theme()->addStylesheet('modules/system/css/admin.css'); |
197 | - $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/' |
|
197 | + $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/' |
|
198 | 198 | . $obj->getVar('avatar_file', 's') |
199 | 199 | . '" alt="" /></div><div class="txtcenter bold">' |
200 | - . $obj->getVar('avatar_name', 's') . '</div>' |
|
200 | + . $obj->getVar('avatar_name', 's').'</div>' |
|
201 | 201 | . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM; |
202 | 202 | // Display message |
203 | 203 | echo $xoops->confirm( |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10 | 10 | */ |
11 | 11 | |
12 | - use Xmf\Request; |
|
12 | + use Xmf\Request; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * avatars module |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | // Delete file |
180 | 180 | $file = $obj->getVar('avatar_file'); |
181 | 181 | if ($file !== 'avatars/blank.gif') { |
182 | - $fullname = $xoops_upload_path . '/' . $file; |
|
182 | + $fullname = $xoops_upload_path . '/' . $file; |
|
183 | 183 | if (is_file($fullname)) { |
184 | 184 | chmod($fullname, 0777); |
185 | 185 | unlink($fullname); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | // Get main instance |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $helper = Avatars::getInstance(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $xoops->redirect('avatar_system.php', 3, implode('<br />', $xoops->security()->getErrors())); |
123 | 123 | } |
124 | 124 | $uploader_avatars_img = |
125 | - new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height); |
|
125 | + new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height); |
|
126 | 126 | // Get avatar id |
127 | 127 | $avatar_id = Request::getInt('avatar_id', 0); |
128 | 128 | if ($avatar_id > 0) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $error_msg = ''; |
134 | 134 | $obj->setVars($_POST); |
135 | 135 | if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) { |
136 | - $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />'; |
|
136 | + $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />'; |
|
137 | 137 | $obj->setVar("avatar_weight", 0); |
138 | 138 | } else { |
139 | 139 | $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0)); |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | $obj->setVar('avatar_file', 'avatars/blank.gif'); |
148 | 148 | } else { |
149 | 149 | $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType()); |
150 | - $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName()); |
|
150 | + $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName()); |
|
151 | 151 | } |
152 | 152 | } else { |
153 | 153 | $file = Request::getString('avatar_file', 'blank.gif'); |
154 | - $obj->setVar('avatar_file', 'avatars/' . $file); |
|
154 | + $obj->setVar('avatar_file', 'avatars/'.$file); |
|
155 | 155 | } |
156 | 156 | if ($error_msg == '') { |
157 | 157 | if ($avatar_Handler->insert($obj)) { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | // Delete file |
180 | 180 | $file = $obj->getVar('avatar_file'); |
181 | 181 | if ($file !== 'avatars/blank.gif') { |
182 | - $fullname = $xoops_upload_path . '/' . $file; |
|
182 | + $fullname = $xoops_upload_path.'/'.$file; |
|
183 | 183 | if (is_file($fullname)) { |
184 | 184 | chmod($fullname, 0777); |
185 | 185 | unlink($fullname); |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | if ($avatar_id > 0) { |
202 | 202 | // Define Stylesheet |
203 | 203 | $xoops->theme()->addStylesheet('modules/system/css/admin.css'); |
204 | - $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/' |
|
204 | + $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/' |
|
205 | 205 | . $obj->getVar('avatar_file', 's') |
206 | 206 | . '" alt="" /></div><div class="txtcenter bold">' |
207 | - . $obj->getVar('avatar_name', 's') . '</div>' |
|
207 | + . $obj->getVar('avatar_name', 's').'</div>' |
|
208 | 208 | . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM; |
209 | 209 | // Display message |
210 | 210 | echo $xoops->confirm( |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -include __DIR__ . '/header.php'; |
|
22 | +include __DIR__.'/header.php'; |
|
23 | 23 | // Get avatars handler |
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $helper = Avatars::getInstance(); |
@@ -51,20 +51,20 @@ discard block |
||
51 | 51 | // total avatars custom |
52 | 52 | $avatars_total_c = $avatars_notdisplay_c + $avatars_display_c; |
53 | 53 | // folder path |
54 | -$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/avatars'; |
|
54 | +$folder_path = \XoopsBaseConfig::get('root-path').'/uploads/avatars'; |
|
55 | 55 | |
56 | 56 | $admin_page = new \Xoops\Module\Admin(); |
57 | 57 | $admin_page->displayNavigation('index.php'); |
58 | 58 | |
59 | 59 | $admin_page->addInfoBox(AvatarsLocale::SYSTEM, 'avatar_system'); |
60 | 60 | $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_S, $avatars_total_s), 'avatar_system'); |
61 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">' . $avatars_display_s . '</span>'), 'avatar_system'); |
|
62 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">' . $avatars_notdisplay_s . '</span>'), 'avatar_system'); |
|
61 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">'.$avatars_display_s.'</span>'), 'avatar_system'); |
|
62 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">'.$avatars_notdisplay_s.'</span>'), 'avatar_system'); |
|
63 | 63 | |
64 | 64 | $admin_page->addInfoBox(AvatarsLocale::CUSTOM, 'avatar_custom'); |
65 | 65 | $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_C, $avatars_total_c), 'avatar_custom'); |
66 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">' . $avatars_display_c . '</span>'), 'avatar_custom'); |
|
67 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">' . $avatars_notdisplay_c . '</span>'), 'avatar_custom'); |
|
66 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">'.$avatars_display_c.'</span>'), 'avatar_custom'); |
|
67 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">'.$avatars_notdisplay_c.'</span>'), 'avatar_custom'); |
|
68 | 68 | |
69 | 69 | $admin_page->addConfigBoxLine($folder_path, 'folder'); |
70 | 70 | $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); |
@@ -19,4 +19,4 @@ |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | // paypal |
44 | 44 | $modversion['paypal'] = array( |
45 | 45 | 'business' => '[email protected]', |
46 | - 'item_name' => 'Donation : ' . AvatarsLocale::MODULE_DESC, |
|
46 | + 'item_name' => 'Donation : '.AvatarsLocale::MODULE_DESC, |
|
47 | 47 | 'amount' => 0, |
48 | 48 | 'currency_code' => 'USD', |
49 | 49 | ); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | $path = dirname(__DIR__); |
35 | 35 | XoopsLoad::addMap(array( |
36 | - 'avatars' => $path . '/class/helper.php', |
|
36 | + 'avatars' => $path.'/class/helper.php', |
|
37 | 37 | )); |
38 | 38 | } |
39 | 39 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public static function eventCoreServiceLocateAvatar(Provider $provider) |
48 | 48 | { |
49 | 49 | if (is_a($provider, '\Xoops\Core\Service\Provider')) { |
50 | - $path = dirname(__DIR__) . '/class/AvatarsProvider.php'; |
|
50 | + $path = dirname(__DIR__).'/class/AvatarsProvider.php'; |
|
51 | 51 | require $path; |
52 | 52 | $object = new AvatarsProvider(); |
53 | 53 | $provider->register($object); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $dbManager->copyFields($map, 'avatar_user_link', 'avatars_user_link', false); |
60 | 60 | */ |
61 | 61 | |
62 | - $xoops_root_path = \XoopsBaseConfig::get('root-path'); |
|
62 | + $xoops_root_path = \XoopsBaseConfig::get('root-path'); |
|
63 | 63 | |
64 | 64 | // create folder "avatars" |
65 | 65 | $dir = $xoops_root_path . "/uploads/avatars"; |
@@ -62,25 +62,25 @@ |
||
62 | 62 | $xoops_root_path = \XoopsBaseConfig::get('root-path'); |
63 | 63 | |
64 | 64 | // create folder "avatars" |
65 | - $dir = $xoops_root_path . "/uploads/avatars"; |
|
65 | + $dir = $xoops_root_path."/uploads/avatars"; |
|
66 | 66 | if (!is_dir($dir)) { |
67 | 67 | mkdir($dir, 0777); |
68 | 68 | chmod($dir, 0777); |
69 | 69 | } |
70 | 70 | //Copy index.html |
71 | - $file = $xoops_root_path . "/uploads/avatars/index.html"; |
|
71 | + $file = $xoops_root_path."/uploads/avatars/index.html"; |
|
72 | 72 | if (!is_file($file)) { |
73 | - copy($xoops_root_path . "/modules/avatars/images/index.html", $file); |
|
73 | + copy($xoops_root_path."/modules/avatars/images/index.html", $file); |
|
74 | 74 | } |
75 | 75 | //Copy blank.gif |
76 | - $file = $xoops_root_path . "/uploads/avatars/blank.gif"; |
|
76 | + $file = $xoops_root_path."/uploads/avatars/blank.gif"; |
|
77 | 77 | if (!is_file($file)) { |
78 | - copy($xoops_root_path . "/modules/avatars/images/blank.gif", $file); |
|
78 | + copy($xoops_root_path."/modules/avatars/images/blank.gif", $file); |
|
79 | 79 | } |
80 | 80 | //Copy .htaccess |
81 | - $file = $xoops_root_path . "/uploads/avatars/.htaccess"; |
|
81 | + $file = $xoops_root_path."/uploads/avatars/.htaccess"; |
|
82 | 82 | if (!is_file($file)) { |
83 | - copy($xoops_root_path . "/uploads/.htaccess", $file); |
|
83 | + copy($xoops_root_path."/uploads/.htaccess", $file); |
|
84 | 84 | } |
85 | 85 | return true; |
86 | 86 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | */ |
23 | 23 | |
24 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
24 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
25 | 25 | |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $xoops->disableErrorReporting(); |