@@ -24,7 +24,7 @@ |
||
24 | 24 | * @author Xoops Core Development Team - Mage Grégory (AKA Mage) - Laurent JEN (aka DuDris) |
25 | 25 | */ |
26 | 26 | |
27 | -include __DIR__ . '/header.php'; |
|
27 | +include __DIR__.'/header.php'; |
|
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | $xoops->header(); |
30 | 30 | $admin = new \Xoops\Module\Admin(); |
@@ -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, '755'), 'chmod'); |
@@ -19,7 +19,7 @@ |
||
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 | $xoops = Xoops::getInstance(); |
24 | 24 | $xoops->header(); |
25 | 25 | $admin = new \Xoops\Module\Admin(); |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $mediaPath = $xoops->path('modules/smilies/media'); |
40 | 40 | $directory = dir($mediaPath); |
41 | 41 | while ($filename = $directory->read()) { |
42 | - $mediaFilename = $mediaPath . '/' . $filename; |
|
42 | + $mediaFilename = $mediaPath.'/'.$filename; |
|
43 | 43 | if (is_file($mediaFilename)) { |
44 | - $target = $uploadDirectory . '/' . $filename; |
|
44 | + $target = $uploadDirectory.'/'.$filename; |
|
45 | 45 | if (!copy($mediaFilename, $target)) { |
46 | 46 | $module->setErrors("Failed copying: {$filename}"); |
47 | 47 | return false; |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | $directory->close(); |
53 | 53 | |
54 | 54 | $module->setMessage('Loading smilies table'); |
55 | - $countInserted = TableLoad::loadTableFromYamlFile('smilies', dirname(__DIR__) . '/sql/smiliesdata.yml'); |
|
55 | + $countInserted = TableLoad::loadTableFromYamlFile('smilies', dirname(__DIR__).'/sql/smiliesdata.yml'); |
|
56 | 56 | |
57 | - if($countInserted < 1) { |
|
57 | + if ($countInserted < 1) { |
|
58 | 58 | $module->setErrors('Loading smilies table failed'); |
59 | 59 | return false; |
60 | 60 | } |