@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author Richard Griffith <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -require __DIR__ . '/admin_header.php'; |
|
18 | +require __DIR__.'/admin_header.php'; |
|
19 | 19 | |
20 | 20 | $indexAdmin = new \Xoops\Module\Admin(); |
21 | 21 | $indexAdmin->displayNavigation('index.php'); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | // paypal |
59 | 59 | $modversion['paypal'] = array( |
60 | 60 | 'business' => '[email protected]', |
61 | - 'item_name' => 'Donation : ' . _MI_SCHEMATOOL_DESC, |
|
61 | + 'item_name' => 'Donation : '._MI_SCHEMATOOL_DESC, |
|
62 | 62 | 'amount' => 0, |
63 | 63 | 'currency_code' => 'USD', |
64 | 64 | ); |
@@ -2,12 +2,12 @@ |
||
2 | 2 | define('_MI_SCHEMATOOL_NAME', 'Schema Tool'); |
3 | 3 | define('_MI_SCHEMATOOL_DESC', 'Developer tool to create schema files.'); |
4 | 4 | |
5 | -define('_MI_SCHEMATOOL_ADMIN_INDEX','Home'); |
|
6 | -define('_MI_SCHEMATOOL_ADMIN_ABOUT','About'); |
|
7 | -define('_MI_SCHEMATOOL_ADMIN_TOOL','Schema'); |
|
5 | +define('_MI_SCHEMATOOL_ADMIN_INDEX', 'Home'); |
|
6 | +define('_MI_SCHEMATOOL_ADMIN_ABOUT', 'About'); |
|
7 | +define('_MI_SCHEMATOOL_ADMIN_TOOL', 'Schema'); |
|
8 | 8 | |
9 | -define('_MI_SCHEMATOOL_TITLE','Schema Tool'); |
|
10 | -define('_MI_SCHEMATOOL_FORM_CAPTION','Select module'); |
|
11 | -define('_MI_SCHEMATOOL_EXPORT_SCHEMA','Exportable Schema'); |
|
12 | -define('_MI_SCHEMATOOL_TITLE_NO_TABLES','No Tables'); |
|
13 | -define('_MI_SCHEMATOOL_MSG_NO_TABLES','The module "%s" does not have any database tables.'); |
|
9 | +define('_MI_SCHEMATOOL_TITLE', 'Schema Tool'); |
|
10 | +define('_MI_SCHEMATOOL_FORM_CAPTION', 'Select module'); |
|
11 | +define('_MI_SCHEMATOOL_EXPORT_SCHEMA', 'Exportable Schema'); |
|
12 | +define('_MI_SCHEMATOOL_TITLE_NO_TABLES', 'No Tables'); |
|
13 | +define('_MI_SCHEMATOOL_MSG_NO_TABLES', 'The module "%s" does not have any database tables.'); |
@@ -155,7 +155,7 @@ |
||
155 | 155 | } else { |
156 | 156 | $smilies_img = ($obj->getVar('smiley_url')) ? $obj->getVar('smiley_url') : 'blank.gif'; |
157 | 157 | echo $xoops->confirm(array( |
158 | - 'ok' => 1, 'smiley_id' => $smiley_id, 'op' => 'del' |
|
158 | + 'ok' => 1, 'smiley_id' => $smiley_id, 'op' => 'del' |
|
159 | 159 | ), \XoopsBaseConfig::get('url') . '/modules/smilies/admin/smilies.php', sprintf(_AM_SMILIES_SUREDEL) . '<br /><strong>' . $obj->getVar('smiley_emotion') . '</strong><br /><img src="' . \XoopsBaseConfig::get('uploads-url') . '/' . $smilies_img . '" alt="' . $obj->getVar('smiley_emotion') . '"><br />'); |
160 | 160 | } |
161 | 161 | break; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | |
27 | 27 | // Call Header & ... |
28 | 28 | $xoops->header('admin:smilies/smilies_smilies.tpl'); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | $smiley_id = Request::getInt('smiley_id', 0); |
96 | - if (isset($smiley_id) && $smiley_id !=0) { |
|
96 | + if (isset($smiley_id) && $smiley_id != 0) { |
|
97 | 97 | $obj = $helper->getHandlerSmilies()->get($smiley_id); |
98 | 98 | } else { |
99 | 99 | $obj = $helper->getHandlerSmilies()->create(); |
@@ -102,19 +102,19 @@ discard block |
||
102 | 102 | $obj->setVar('smiley_code', Request::getString('smiley_code', '')); |
103 | 103 | $obj->setVar('smiley_emotion', Request::getString('smiley_emotion', '')); |
104 | 104 | $obj->setVar('smiley_display', Request::getBool('smiley_display', true)); |
105 | - $obj->setVar('smiley_url', 'smilies/' . Request::getPath('smiley_url', '')); |
|
105 | + $obj->setVar('smiley_url', 'smilies/'.Request::getPath('smiley_url', '')); |
|
106 | 106 | $xoops_upload_file = Request::getArray('xoops_upload_file', array()); |
107 | 107 | |
108 | 108 | $error_msg = ''; |
109 | 109 | if ($_FILES[$xoops_upload_file[0]]['error'] === 0) { |
110 | - $uploader = new XoopsMediaUploader(\XoopsBaseConfig::get('uploads-path') . '/smilies', $mimetypes, $upload_size, null, null); |
|
110 | + $uploader = new XoopsMediaUploader(\XoopsBaseConfig::get('uploads-path').'/smilies', $mimetypes, $upload_size, null, null); |
|
111 | 111 | if ($uploader->fetchMedia($xoops_upload_file[0])) { |
112 | 112 | $uploader->setPrefix('smil'); |
113 | 113 | if (!$uploader->upload()) { |
114 | 114 | $error_msg .= $uploader->getErrors(); |
115 | 115 | $obj->setVar('smiley_url', 'blank.gif'); |
116 | 116 | } else { |
117 | - $obj->setVar('smiley_url', 'smilies/' . $uploader->getSavedFileName()); |
|
117 | + $obj->setVar('smiley_url', 'smilies/'.$uploader->getSavedFileName()); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if (!$xoops->security()->check()) { |
143 | 143 | $xoops->redirect('smilies.php', 3, implode(',', $xoops->security()->getErrors())); |
144 | 144 | } |
145 | - $path_file = \XoopsBaseConfig::get('uploads-path') . '/' . $obj->getVar('smile_url'); |
|
145 | + $path_file = \XoopsBaseConfig::get('uploads-path').'/'.$obj->getVar('smile_url'); |
|
146 | 146 | if ($helper->getHandlerSmilies()->delete($obj)) { |
147 | 147 | if (is_file($path_file)) { |
148 | 148 | chmod($path_file, 0777); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $smilies_img = ($obj->getVar('smiley_url')) ? $obj->getVar('smiley_url') : 'blank.gif'; |
157 | 157 | echo $xoops->confirm(array( |
158 | 158 | 'ok' => 1, 'smiley_id' => $smiley_id, 'op' => 'del' |
159 | - ), \XoopsBaseConfig::get('url') . '/modules/smilies/admin/smilies.php', sprintf(_AM_SMILIES_SUREDEL) . '<br /><strong>' . $obj->getVar('smiley_emotion') . '</strong><br /><img src="' . \XoopsBaseConfig::get('uploads-url') . '/' . $smilies_img . '" alt="' . $obj->getVar('smiley_emotion') . '"><br />'); |
|
159 | + ), \XoopsBaseConfig::get('url').'/modules/smilies/admin/smilies.php', sprintf(_AM_SMILIES_SUREDEL).'<br /><strong>'.$obj->getVar('smiley_emotion').'</strong><br /><img src="'.\XoopsBaseConfig::get('uploads-url').'/'.$smilies_img.'" alt="'.$obj->getVar('smiley_emotion').'"><br />'); |
|
160 | 160 | } |
161 | 161 | break; |
162 | 162 |
@@ -19,33 +19,33 @@ |
||
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 | |
24 | 24 | $xoops->header(); |
25 | 25 | |
26 | 26 | // smilies not display |
27 | 27 | $criteria = new CriteriaCompo(); |
28 | 28 | $criteria->add(new Criteria('smiley_display', 0)); |
29 | -$smilies_notdisplay = $helper->getHandlerSmilies()->getCount($criteria); |
|
29 | +$smilies_notdisplay = $helper->getHandlerSmilies()->getCount($criteria); |
|
30 | 30 | |
31 | 31 | // smilies display |
32 | 32 | $criteria = new CriteriaCompo(); |
33 | 33 | $criteria->add(new Criteria('smiley_display', 0, '!=')); |
34 | -$smilies_display = $helper->getHandlerSmilies()->getCount($criteria); |
|
34 | +$smilies_display = $helper->getHandlerSmilies()->getCount($criteria); |
|
35 | 35 | |
36 | 36 | // total smilies |
37 | -$smilies_total= $smilies_notdisplay + $smilies_display; |
|
37 | +$smilies_total = $smilies_notdisplay + $smilies_display; |
|
38 | 38 | |
39 | 39 | // folder path |
40 | -$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/smilies'; |
|
40 | +$folder_path = \XoopsBaseConfig::get('root-path').'/uploads/smilies'; |
|
41 | 41 | |
42 | 42 | $admin_page = new \Xoops\Module\Admin(); |
43 | 43 | $admin_page->displayNavigation('index.php'); |
44 | 44 | |
45 | 45 | $admin_page->addInfoBox(_MI_SMILIES_SMILIES); |
46 | 46 | $admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBTOTAL, $smilies_total)); |
47 | -$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBDISPLAY, '<span class="green">' . $smilies_display . '</span>')); |
|
48 | -$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBNOTDISPLAY, '<span class="red">' . $smilies_notdisplay . '</span>')); |
|
47 | +$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBDISPLAY, '<span class="green">'.$smilies_display.'</span>')); |
|
48 | +$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBNOTDISPLAY, '<span class="red">'.$smilies_notdisplay.'</span>')); |
|
49 | 49 | |
50 | 50 | $admin_page->addConfigBoxLine($folder_path, 'folder'); |
51 | 51 | $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | // paypal |
49 | 49 | $modversion['paypal'] = array( |
50 | 50 | 'business' => '[email protected]', |
51 | - 'item_name' => 'Donation : ' . _MI_SMILIES_DESC, |
|
51 | + 'item_name' => 'Donation : '._MI_SMILIES_DESC, |
|
52 | 52 | 'amount' => 0, |
53 | 53 | 'currency_code' => 'USD', |
54 | 54 | ); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | // sql |
72 | 72 | $modversion['schema'] = 'sql/schema.yml'; |
73 | -$modversion['sqlfile']['mysql'] = 'sql/mysql.' . Xoops::getInstance()->getConfig('language') . '.sql'; |
|
73 | +$modversion['sqlfile']['mysql'] = 'sql/mysql.'.Xoops::getInstance()->getConfig('language').'.sql'; |
|
74 | 74 | |
75 | 75 | // Tables created by sql file (without prefix!) |
76 | 76 | $modversion['tables'] = array( |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public static function eventCoreServiceLocateEmoji(Provider $provider) |
36 | 36 | { |
37 | - require dirname(__DIR__) . '/class/SmiliesProvider.php'; |
|
37 | + require dirname(__DIR__).'/class/SmiliesProvider.php'; |
|
38 | 38 | $provider->register(new SmiliesProvider()); |
39 | 39 | } |
40 | 40 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $path = dirname(__DIR__); |
52 | 52 | XoopsLoad::addMap(array( |
53 | - 'smilies' => $path . '/class/helper.php', |
|
53 | + 'smilies' => $path.'/class/helper.php', |
|
54 | 54 | )); |
55 | 55 | } |
56 | 56 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @author Mage Grégory (AKA Mage) |
23 | 23 | */ |
24 | 24 | |
25 | -include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
25 | +include dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
26 | 26 | |
27 | 27 | $xoops = Xoops::getInstance(); |
28 | 28 | $xoops->logger()->quiet(); |
@@ -19,32 +19,32 @@ |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -define("_AM_SMILIES_ACTION","Action"); |
|
22 | +define("_AM_SMILIES_ACTION", "Action"); |
|
23 | 23 | define("_AM_SMILIES_ADD", "Add a new smilie"); |
24 | -define("_AM_SMILIES_CODE","Code"); |
|
25 | -define("_AM_SMILIES_DELETE","Delete smilie"); |
|
26 | -define("_AM_SMILIES_DELETED","Smilies deleted"); |
|
27 | -define("_AM_SMILIES_DESCRIPTION","Description"); |
|
28 | -define("_AM_SMILIES_DISPLAY","Display in form"); |
|
29 | -define("_AM_SMILIES_EDIT","Edit smilie"); |
|
30 | -define("_AM_SMILIES_FILE","Smilie file"); |
|
31 | -define("_AM_SMILIES_IMAGE_PATH","Files exist in: %s"); |
|
24 | +define("_AM_SMILIES_CODE", "Code"); |
|
25 | +define("_AM_SMILIES_DELETE", "Delete smilie"); |
|
26 | +define("_AM_SMILIES_DELETED", "Smilies deleted"); |
|
27 | +define("_AM_SMILIES_DESCRIPTION", "Description"); |
|
28 | +define("_AM_SMILIES_DISPLAY", "Display in form"); |
|
29 | +define("_AM_SMILIES_EDIT", "Edit smilie"); |
|
30 | +define("_AM_SMILIES_FILE", "Smilie file"); |
|
31 | +define("_AM_SMILIES_IMAGE_PATH", "Files exist in: %s"); |
|
32 | 32 | define("_AM_SMILIES_LIST", "List of smilies"); |
33 | -define("_AM_SMILIES_NBTOTAL","There are %s smilies in our database"); |
|
34 | -define("_AM_SMILIES_NBDISPLAY","There are %s visible smilies"); |
|
35 | -define("_AM_SMILIES_NBNOTDISPLAY","There are %s smilies not visible"); |
|
36 | -define("_AM_SMILIES_OFF","Display in the form "); |
|
37 | -define("_AM_SMILIES_ON","Does not display in the form"); |
|
38 | -define("_AM_SMILIES_SAVE","Smilie saved"); |
|
39 | -define("_AM_SMILIES_SUREDEL","Are you sure you want to delete this smilie?"); |
|
40 | -define("_AM_SMILIES_SMILIE","Smilie"); |
|
41 | -define("_AM_SMILIES_UPLOADS","Upload"); |
|
33 | +define("_AM_SMILIES_NBTOTAL", "There are %s smilies in our database"); |
|
34 | +define("_AM_SMILIES_NBDISPLAY", "There are %s visible smilies"); |
|
35 | +define("_AM_SMILIES_NBNOTDISPLAY", "There are %s smilies not visible"); |
|
36 | +define("_AM_SMILIES_OFF", "Display in the form "); |
|
37 | +define("_AM_SMILIES_ON", "Does not display in the form"); |
|
38 | +define("_AM_SMILIES_SAVE", "Smilie saved"); |
|
39 | +define("_AM_SMILIES_SUREDEL", "Are you sure you want to delete this smilie?"); |
|
40 | +define("_AM_SMILIES_SMILIE", "Smilie"); |
|
41 | +define("_AM_SMILIES_UPLOADS", "Upload"); |
|
42 | 42 | |
43 | 43 | // Alert |
44 | -define("_AM_SMILIES_ALERT_ERROR_TITLE","Errors"); |
|
45 | -define("_AM_SMILIES_ALERT_INFO_TITLE","Information for uploads"); |
|
46 | -define("_AM_SMILIES_ALERT_INFO_MAXFILE","Max uploaded files size: %s"); |
|
47 | -define("_AM_SMILIES_ALERT_INFO_MIMETYPES","Authorized mime types: %s"); |
|
44 | +define("_AM_SMILIES_ALERT_ERROR_TITLE", "Errors"); |
|
45 | +define("_AM_SMILIES_ALERT_INFO_TITLE", "Information for uploads"); |
|
46 | +define("_AM_SMILIES_ALERT_INFO_MAXFILE", "Max uploaded files size: %s"); |
|
47 | +define("_AM_SMILIES_ALERT_INFO_MIMETYPES", "Authorized mime types: %s"); |
|
48 | 48 | |
49 | 49 | // Tips |
50 | -define("_AM_SMILIES_TIPS","<ul><li>Add, update or delete smilies</li></ul>"); |
|
50 | +define("_AM_SMILIES_TIPS", "<ul><li>Add, update or delete smilies</li></ul>"); |