Passed
Pull Request — master (#610)
by Richard
14:27
created
htdocs/modules/banners/xoops_version.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 // paypal
45 45
 $modversion['paypal']                  = array();
46 46
 $modversion['paypal']['business']      = '[email protected]';
47
-$modversion['paypal']['item_name']     = 'Donation : ' . _MI_BANNERS_DESC;
47
+$modversion['paypal']['item_name']     = 'Donation : '._MI_BANNERS_DESC;
48 48
 $modversion['paypal']['amount']        = 0;
49 49
 $modversion['paypal']['currency_code'] = 'USD';
50 50
 
Please login to merge, or discard this patch.
htdocs/modules/banners/preloads/preload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
     {
35 35
         $path = dirname(__DIR__);
36 36
         XoopsLoad::addMap(array(
37
-            'banners' => $path . '/class/helper.php',
37
+            'banners' => $path.'/class/helper.php',
38 38
         ));
39 39
     }
40 40
 
41 41
     public static function eventCoreBannerDisplay($args)
42 42
     {
43
-        require_once dirname(__DIR__) . '/class/bannerrender.php';
43
+        require_once dirname(__DIR__).'/class/bannerrender.php';
44 44
         $render = new BannerRender();
45 45
         $args[0] = $render->displayBanner();
46 46
     }
Please login to merge, or discard this patch.
htdocs/modules/banners/include/install.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
84 84
     $sql = "DELETE FROM " . $xoopsDB->prefix("config") . " WHERE `conf_name` = 'my_ip'";
85 85
     $xoopsDB->queryF($sql);
86 86
 */
87
-	$xoops_root_path = \XoopsBaseConfig::get('root-path');
88
-	$xoops_upload_url = \XoopsBaseConfig::get('uploads-url');
87
+    $xoops_root_path = \XoopsBaseConfig::get('root-path');
88
+    $xoops_upload_url = \XoopsBaseConfig::get('uploads-url');
89 89
 	
90 90
     // create folder "banners"
91 91
     $dir = $xoops_root_path . "/uploads/banners";
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     $xoops = Xoops::getInstance();
33 33
     //$xoops->db();
34 34
     //global $xoopsDB;
35
-    XoopsLoad::addMap(array('banners' => dirname(__DIR__) . '/class/helper.php'));
35
+    XoopsLoad::addMap(array('banners' => dirname(__DIR__).'/class/helper.php'));
36 36
     $helper = Banners::getInstance();
37 37
     // Get handler
38 38
     $banner_Handler = $helper->getHandlerBanner();
@@ -88,25 +88,25 @@  discard block
 block discarded – undo
88 88
 	$xoops_upload_url = \XoopsBaseConfig::get('uploads-url');
89 89
 	
90 90
     // create folder "banners"
91
-    $dir = $xoops_root_path . "/uploads/banners";
91
+    $dir = $xoops_root_path."/uploads/banners";
92 92
     if (!is_dir($dir)) {
93 93
         mkdir($dir, 0777);
94 94
         chmod($dir, 0777);
95 95
     }
96 96
     //Copy index.html
97
-    $file = $xoops_root_path . "/uploads/banners/index.html";
97
+    $file = $xoops_root_path."/uploads/banners/index.html";
98 98
     if (!is_file($file)) {
99
-        copy($xoops_root_path . "/modules/banners/images/index.html", $file);
99
+        copy($xoops_root_path."/modules/banners/images/index.html", $file);
100 100
     }
101 101
     //Copy blank.gif
102
-    $file = $xoops_root_path . "/uploads/banners/blank.gif";
102
+    $file = $xoops_root_path."/uploads/banners/blank.gif";
103 103
     if (!is_file($file)) {
104
-        copy($xoops_root_path . "/uploads/blank.gif", $file);
104
+        copy($xoops_root_path."/uploads/blank.gif", $file);
105 105
     }
106 106
     //Copy .htaccess
107
-    $file = $xoops_root_path . "/uploads/banners/.htaccess";
107
+    $file = $xoops_root_path."/uploads/banners/.htaccess";
108 108
     if (!is_file($file)) {
109
-        copy($xoops_root_path . "/uploads/.htaccess", $file);
109
+        copy($xoops_root_path."/uploads/.htaccess", $file);
110 110
     }
111 111
 
112 112
 /* this should be in system upgrade, not module install
@@ -179,15 +179,15 @@  discard block
 block discarded – undo
179 179
     );
180 180
     foreach ($banners as $k => $v) {
181 181
         //Copy banner
182
-        $file = $xoops_root_path . "/uploads/banners/" . $k;
183
-        $copy_file = $xoops_root_path . "/modules/banners/images/" . $k;
182
+        $file = $xoops_root_path."/uploads/banners/".$k;
183
+        $copy_file = $xoops_root_path."/modules/banners/images/".$k;
184 184
         if (!is_file($file) && is_file($copy_file)) {
185 185
             copy($copy_file, $file);
186 186
         }
187 187
         $obj = $banner_Handler->create();
188 188
         $obj->setVar("banner_cid", $newclient_id);
189 189
         $obj->setVar("banner_clickurl", $v);
190
-        $obj->setVar("banner_imageurl", $xoops_upload_url . '/banners/' . $k);
190
+        $obj->setVar("banner_imageurl", $xoops_upload_url.'/banners/'.$k);
191 191
         $obj->setVar("banner_datestart", time());
192 192
         $obj->setVar("banner_dateend", 0);
193 193
         $obj->setVar("banner_status", 1);
Please login to merge, or discard this patch.
htdocs/modules/banners/language/english/blocks.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
  * @author          Mage Grégory (AKA Mage)
20 20
  * @version         $Id$
21 21
  */
22
-define("_MB_BANNERS_DISP","Display");
23
-define("_MB_BANNERS","Banners");
24
-define("_MB_BANNERS_ALIGNEMENT","Alignement");
25
-define("_MB_BANNERS_ALIGNEMENT_H","horizontal");
26
-define("_MB_BANNERS_ALIGNEMENT_V","vertical");
27
-define("_MB_BANNERS_ALLCLIENTS","All clients");
28
-define("_MB_BANNERS_CLIENTSTODISPLAY","Select displayed clients");
29
-define("_MB_BANNERS_IDDISPLAY","Indicate the ID of the banner to be displayed");
30
-define("_MB_BANNERS_SEP","separated with ','.");
22
+define("_MB_BANNERS_DISP", "Display");
23
+define("_MB_BANNERS", "Banners");
24
+define("_MB_BANNERS_ALIGNEMENT", "Alignement");
25
+define("_MB_BANNERS_ALIGNEMENT_H", "horizontal");
26
+define("_MB_BANNERS_ALIGNEMENT_V", "vertical");
27
+define("_MB_BANNERS_ALLCLIENTS", "All clients");
28
+define("_MB_BANNERS_CLIENTSTODISPLAY", "Select displayed clients");
29
+define("_MB_BANNERS_IDDISPLAY", "Indicate the ID of the banner to be displayed");
30
+define("_MB_BANNERS_SEP", "separated with ','.");
Please login to merge, or discard this patch.
htdocs/modules/banners/language/english/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 //define("_MD_BANNERS_INDEX_CLIENTNAME", "Displaying active banners for client: %s");
24 24
 define("_MD_BANNERS_INDEX_DBERROR", "Database was not updated due to some error!");
25 25
 define("_MD_BANNERS_INDEX_EMAIL", "Send E-mail stats");
26
-define("_MD_BANNERS_INDEX_NO_ID","No valid ID detected");
26
+define("_MD_BANNERS_INDEX_NO_ID", "No valid ID detected");
27 27
 define("_MD_BANNERS_INDEX_NO_REFERER", "No referer detected");
28 28
 define("_MD_BANNERS_INDEX_ID", "ID");
29 29
 define("_MD_BANNERS_INDEX_MAIL_MESSAGE", "Available Banner Statistics for the selected Banner at %s :\n\n\n
Please login to merge, or discard this patch.
htdocs/modules/banners/language/english/admin.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -20,64 +20,64 @@
 block discarded – undo
20 20
  * @version         $Id$
21 21
  */
22 22
 //generic
23
-define("_AM_BANNERS_ACTION","Action");
24
-define("_AM_BANNERS_VIEW","View");
25
-define("_AM_BANNERS_DELETE","Delete");
26
-define("_AM_BANNERS_EDIT","Edit");
27
-define("_AM_BANNERS_DBUPDATED","Database updated successfully!");
23
+define("_AM_BANNERS_ACTION", "Action");
24
+define("_AM_BANNERS_VIEW", "View");
25
+define("_AM_BANNERS_DELETE", "Delete");
26
+define("_AM_BANNERS_EDIT", "Edit");
27
+define("_AM_BANNERS_DBUPDATED", "Database updated successfully!");
28 28
 
29 29
 //index.php
30
-define("_AM_BANNERS_INDEX_NBTOTAL","There are %s banners in our database");
31
-define("_AM_BANNERS_INDEX_NBCLIENT","There are %s client in our database");
32
-define("_AM_BANNERS_INDEX_NBFINISH","There are %s banners finished");
30
+define("_AM_BANNERS_INDEX_NBTOTAL", "There are %s banners in our database");
31
+define("_AM_BANNERS_INDEX_NBCLIENT", "There are %s client in our database");
32
+define("_AM_BANNERS_INDEX_NBFINISH", "There are %s banners finished");
33 33
 
34 34
 //clients.php
35
-define("_AM_BANNERS_CLIENTS_ACTIVEBANNERS","Active Banners");
36
-define("_AM_BANNERS_CLIENTS_ADD","Add a new client");
37
-define("_AM_BANNERS_CLIENTS_EDIT","Edit client");
38
-define("_AM_BANNERS_CLIENTS_EXTRAINFO","Extra Info");
39
-define("_AM_BANNERS_CLIENTS_LIST","List of clients");
40
-define("_AM_BANNERS_CLIENTS_MAIL","Client email");
41
-define("_AM_BANNERS_CLIENTS_NAME","Client name");
42
-define("_AM_BANNERS_CLIENTS_SUREDEL","Are you sure to delete this client '<strong>%s</strong>' and ALL its banners?");
43
-define("_AM_BANNERS_CLIENTS_UNAME","User name");
44
-define("_AM_BANNERS_CLIENTS_UNAME_NO","Do not use a member");
45
-define("_AM_BANNERS_CLIENTS_UNAME_YES","Use a member");
35
+define("_AM_BANNERS_CLIENTS_ACTIVEBANNERS", "Active Banners");
36
+define("_AM_BANNERS_CLIENTS_ADD", "Add a new client");
37
+define("_AM_BANNERS_CLIENTS_EDIT", "Edit client");
38
+define("_AM_BANNERS_CLIENTS_EXTRAINFO", "Extra Info");
39
+define("_AM_BANNERS_CLIENTS_LIST", "List of clients");
40
+define("_AM_BANNERS_CLIENTS_MAIL", "Client email");
41
+define("_AM_BANNERS_CLIENTS_NAME", "Client name");
42
+define("_AM_BANNERS_CLIENTS_SUREDEL", "Are you sure to delete this client '<strong>%s</strong>' and ALL its banners?");
43
+define("_AM_BANNERS_CLIENTS_UNAME", "User name");
44
+define("_AM_BANNERS_CLIENTS_UNAME_NO", "Do not use a member");
45
+define("_AM_BANNERS_CLIENTS_UNAME_YES", "Use a member");
46 46
 
47 47
 //banners.php
48
-define("_AM_BANNERS_BANNERS_ADD","Add a new banner");
49
-define("_AM_BANNERS_BANNERS_CLICKS","Clicks");
50
-define("_AM_BANNERS_BANNERS_CLICKURL","Click URL");
51
-define("_AM_BANNERS_BANNERS_CODEHTML","Code HTML");
52
-define("_AM_BANNERS_BANNERS_CURRENT","Current active banners");
53
-define("_AM_BANNERS_BANNERS_EDIT","Edit banner");
54
-define("_AM_BANNERS_BANNERS_ENDDATE","Date ended");
55
-define("_AM_BANNERS_BANNERS_FINISH","Finished banners");
56
-define("_AM_BANNERS_BANNERS_IMAGE","Image");
57
-define("_AM_BANNERS_BANNERS_IMAGE_PATH","Files exist in: %s");
58
-define("_AM_BANNERS_BANNERS_IMGURL","Image URL:");
59
-define("_AM_BANNERS_BANNERS_IMPRESIONLEFT","Impressions left");
60
-define("_AM_BANNERS_BANNERS_IMPRESSIONS","Impressions");
61
-define("_AM_BANNERS_BANNERS_IMPRESSIONSP","Impressions purchased");
62
-define("_AM_BANNERS_BANNERS_IMPRESSIONSP_PATTERN","You must enter an integer");
63
-define("_AM_BANNERS_BANNERS_LIST","List of banners");
64
-define("_AM_BANNERS_BANNERS_NCLICKS","% Clicks");
65
-define("_AM_BANNERS_BANNERS_RELOAD","Reload banner");
66
-define("_AM_BANNERS_BANNERS_STARTDATE","Date started");
67
-define("_AM_BANNERS_BANNERS_SUREDEL","Are you sure to delete this Banner?");
68
-define("_AM_BANNERS_BANNERS_UNLIMIT","Unlimited");
69
-define("_AM_BANNERS_BANNERS_UPLOADS","Upload");
70
-define("_AM_BANNERS_BANNERS_USEHTML","Use HTML?");
48
+define("_AM_BANNERS_BANNERS_ADD", "Add a new banner");
49
+define("_AM_BANNERS_BANNERS_CLICKS", "Clicks");
50
+define("_AM_BANNERS_BANNERS_CLICKURL", "Click URL");
51
+define("_AM_BANNERS_BANNERS_CODEHTML", "Code HTML");
52
+define("_AM_BANNERS_BANNERS_CURRENT", "Current active banners");
53
+define("_AM_BANNERS_BANNERS_EDIT", "Edit banner");
54
+define("_AM_BANNERS_BANNERS_ENDDATE", "Date ended");
55
+define("_AM_BANNERS_BANNERS_FINISH", "Finished banners");
56
+define("_AM_BANNERS_BANNERS_IMAGE", "Image");
57
+define("_AM_BANNERS_BANNERS_IMAGE_PATH", "Files exist in: %s");
58
+define("_AM_BANNERS_BANNERS_IMGURL", "Image URL:");
59
+define("_AM_BANNERS_BANNERS_IMPRESIONLEFT", "Impressions left");
60
+define("_AM_BANNERS_BANNERS_IMPRESSIONS", "Impressions");
61
+define("_AM_BANNERS_BANNERS_IMPRESSIONSP", "Impressions purchased");
62
+define("_AM_BANNERS_BANNERS_IMPRESSIONSP_PATTERN", "You must enter an integer");
63
+define("_AM_BANNERS_BANNERS_LIST", "List of banners");
64
+define("_AM_BANNERS_BANNERS_NCLICKS", "% Clicks");
65
+define("_AM_BANNERS_BANNERS_RELOAD", "Reload banner");
66
+define("_AM_BANNERS_BANNERS_STARTDATE", "Date started");
67
+define("_AM_BANNERS_BANNERS_SUREDEL", "Are you sure to delete this Banner?");
68
+define("_AM_BANNERS_BANNERS_UNLIMIT", "Unlimited");
69
+define("_AM_BANNERS_BANNERS_UPLOADS", "Upload");
70
+define("_AM_BANNERS_BANNERS_USEHTML", "Use HTML?");
71 71
 
72
-define("_AM_BANNERS_BANNERS_ERROR_NOCLIENT","Please create first a client");
72
+define("_AM_BANNERS_BANNERS_ERROR_NOCLIENT", "Please create first a client");
73 73
 
74 74
 
75 75
 // Tips
76 76
 define("_AM_BANNERS_TIPS_CLIENTS", "<ul><li>Add, modify and update clients.</li></ul>");
77 77
 define("_AM_BANNERS_TIPS_BANNERS", "<ul><li>Add, modify and update banners.</li></ul>");
78 78
 // Alert
79
-define("_AM_BANNERS_ALERT_INFO_TITLE_UPLOADS","Information for uploads");
80
-define("_AM_BANNERS_ALERT_INFO_TITLE","Information");
79
+define("_AM_BANNERS_ALERT_INFO_TITLE_UPLOADS", "Information for uploads");
80
+define("_AM_BANNERS_ALERT_INFO_TITLE", "Information");
81 81
 define("_AM_BANNERS_ALERT_INFO_CLIENT_ADDEDIT", "If you do not put a user of the site, the customer will not have access to these banners.");
82 82
 define("_AM_BANNERS_ALERT_INFO_MIMETYPES", "Authorized mime types: %s");
83 83
 define("_AM_BANNERS_ALERT_INFO_MAXFILE", "Max uploaded files size: %s [KB]");
Please login to merge, or discard this patch.
htdocs/modules/banners/blocks/banners_blocks.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 function banners_blocks_show($options) {
23 23
     $block = array();
24 24
     $xoops = Xoops::getInstance();
25
-    require_once dirname(__DIR__) . '/class/bannerrender.php';
25
+    require_once dirname(__DIR__).'/class/bannerrender.php';
26 26
     $render = new BannerRender();
27 27
     switch ($options[0]) {
28 28
         case 'random':
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
     switch ($options[0]) {
50 50
 
51 51
         case 'random':
52
-            $form .= _MB_BANNERS_DISP . "&nbsp;\n";
53
-            $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"" . $options[0] . "\" />\n";
54
-            $form .= "<input name=\"options[1]\" size=\"5\" maxlength=\"255\" value=\"" . $options[1] . "\" type=\"text\" />&nbsp;" . _MB_BANNERS . "<br />\n";
55
-            switch ($options[2]){
52
+            $form .= _MB_BANNERS_DISP."&nbsp;\n";
53
+            $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"".$options[0]."\" />\n";
54
+            $form .= "<input name=\"options[1]\" size=\"5\" maxlength=\"255\" value=\"".$options[1]."\" type=\"text\" />&nbsp;"._MB_BANNERS."<br />\n";
55
+            switch ($options[2]) {
56 56
                 case 'H':
57 57
                     $checked_H = 'checked="checked"';
58 58
                     $checked_V = '';
@@ -63,30 +63,30 @@  discard block
 block discarded – undo
63 63
                     $checked_V = 'checked="checked"';
64 64
                     break;
65 65
             }
66
-            $form .= _MB_BANNERS_ALIGNEMENT . " : <input name=\"options[2]\" value=\"H\" type=\"radio\" " . $checked_H . "/>" . _MB_BANNERS_ALIGNEMENT_H . "&nbsp;\n";
67
-            $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" " . $checked_V . "/>" . _MB_BANNERS_ALIGNEMENT_V . "<br />\n";
66
+            $form .= _MB_BANNERS_ALIGNEMENT." : <input name=\"options[2]\" value=\"H\" type=\"radio\" ".$checked_H."/>"._MB_BANNERS_ALIGNEMENT_H."&nbsp;\n";
67
+            $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" ".$checked_V."/>"._MB_BANNERS_ALIGNEMENT_V."<br />\n";
68 68
             array_shift($options);
69 69
             array_shift($options);
70 70
             array_shift($options);
71
-            $form .= _MB_BANNERS_CLIENTSTODISPLAY . "<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">\n";
71
+            $form .= _MB_BANNERS_CLIENTSTODISPLAY."<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">\n";
72 72
             $xoops = Xoops::getInstance();
73
-            $client_Handler = $xoops->getModuleHandler('bannerclient','banners');
73
+            $client_Handler = $xoops->getModuleHandler('bannerclient', 'banners');
74 74
             $criteria = new CriteriaCompo();
75 75
             $criteria->setSort('bannerclient_name');
76 76
             $criteria->setOrder('ASC');
77 77
             $client_arr = $client_Handler->getAll($criteria);
78
-            $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? '' : 'selected="selected"') . ">" . _MB_BANNERS_ALLCLIENTS . "</option>\n";
78
+            $form .= "<option value=\"0\" ".(array_search(0, $options) === false ? '' : 'selected="selected"').">"._MB_BANNERS_ALLCLIENTS."</option>\n";
79 79
             foreach (array_keys($client_arr) as $i) {
80
-                $form .= "<option value=\"" . $client_arr[$i]->getVar('cid') . "\" " . (array_search($client_arr[$i]->getVar('cid'), $options) === false ? '' : 'selected="selected"') . ">" . $client_arr[$i]->getVar('name')."</option>\n";
80
+                $form .= "<option value=\"".$client_arr[$i]->getVar('cid')."\" ".(array_search($client_arr[$i]->getVar('cid'), $options) === false ? '' : 'selected="selected"').">".$client_arr[$i]->getVar('name')."</option>\n";
81 81
             }
82 82
             $form .= "</select>\n";
83 83
             break;
84 84
 
85 85
         case 'id':
86
-            $form .= _MB_BANNERS_IDDISPLAY . "&nbsp;\n";
87
-            $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"" . $options[0] . "\" />\n";
88
-            $form .= "<input name=\"options[1]\" size=\"20\" maxlength=\"255\" value=\"" . $options[1] . "\" type=\"text\" />&nbsp;" . _MB_BANNERS_SEP . "<br />\n";
89
-            switch ($options[2]){
86
+            $form .= _MB_BANNERS_IDDISPLAY."&nbsp;\n";
87
+            $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"".$options[0]."\" />\n";
88
+            $form .= "<input name=\"options[1]\" size=\"20\" maxlength=\"255\" value=\"".$options[1]."\" type=\"text\" />&nbsp;"._MB_BANNERS_SEP."<br />\n";
89
+            switch ($options[2]) {
90 90
                 case 'H':
91 91
                     $checked_H = 'checked="checked"';
92 92
                     $checked_V = '';
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
                     $checked_V = 'checked="checked"';
98 98
                     break;
99 99
             }
100
-            $form .= _MB_BANNERS_ALIGNEMENT . " : <input name=\"options[2]\" value=\"H\" type=\"radio\" " . $checked_H . "/>" . _MB_BANNERS_ALIGNEMENT_H . "&nbsp;\n";
101
-            $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" " . $checked_V . "/>" . _MB_BANNERS_ALIGNEMENT_V . "<br />\n";
100
+            $form .= _MB_BANNERS_ALIGNEMENT." : <input name=\"options[2]\" value=\"H\" type=\"radio\" ".$checked_H."/>"._MB_BANNERS_ALIGNEMENT_H."&nbsp;\n";
101
+            $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" ".$checked_V."/>"._MB_BANNERS_ALIGNEMENT_V."<br />\n";
102 102
             break;
103 103
     }
104 104
     return $form;
Please login to merge, or discard this patch.
htdocs/modules/banners/class/bannerrender.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function displayBanner($nb_banner = 1, $align = 'H', $client = array(), $ids = '')
42 42
     {
43 43
         $xoops = Xoops::getInstance();
44
-        XoopsLoad::addMap(array('banners' => __DIR__ . '/helper.php'));
44
+        XoopsLoad::addMap(array('banners' => __DIR__.'/helper.php'));
45 45
         $helper = Banners::getInstance();
46 46
         if ($xoops->isActiveModule('banners')) {
47 47
             // Get banners handler
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
             $criteria->setSort($sort);
54 54
             if (!empty($client)) {
55 55
                 if (!in_array(0, $client)) {
56
-                    $criteria->add(new Criteria('banner_cid', '(' . implode(',', $client) . ')', 'IN'));
56
+                    $criteria->add(new Criteria('banner_cid', '('.implode(',', $client).')', 'IN'));
57 57
                 }
58 58
             }
59 59
             if ($ids == '') {
60 60
                 $criteria->setLimit($nb_banner);
61 61
                 $criteria->setStart(0);
62 62
             } else {
63
-                $criteria->add(new Criteria('banner_bid', '(' . $ids . ')', 'IN'));
63
+                $criteria->add(new Criteria('banner_bid', '('.$ids.')', 'IN'));
64 64
             }
65 65
             $banner_arr = $banner_Handler->getAll($criteria);
66 66
             $numrows = count($banner_arr);
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
                         $bannerobject .= $htmlcode;
82 82
                     } else {
83 83
                         if (stristr($imageurl, '.swf')) {
84
-                            $bannerobject .= '<a href="' . \XoopsBaseConfig::get('url') . '/modules/banners/index.php?op=click&amp;bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>';
84
+                            $bannerobject .= '<a href="'.\XoopsBaseConfig::get('url').'/modules/banners/index.php?op=click&amp;bid='.$bid.'" rel="external" title="'.$clickurl.'"></a>'.'<object type="application/x-shockwave-flash" width="468" height="60" data="'.$imageurl.'" style="z-index:100;">'.'<param name="movie" value="'.$imageurl.'" />'.'<param name="wmode" value="opaque" />'.'</object>';
85 85
                         } else {
86
-                            $bannerobject .= '<a href="' . \XoopsBaseConfig::get('url') . '/modules/banners/index.php?op=click&amp;bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>';
86
+                            $bannerobject .= '<a href="'.\XoopsBaseConfig::get('url').'/modules/banners/index.php?op=click&amp;bid='.$bid.'" rel="external" title="'.$clickurl.'"><img src="'.$imageurl.'" alt="'.$clickurl.'" /></a>';
87 87
                         }
88 88
                     }
89 89
                     if ($align === 'V') {
Please login to merge, or discard this patch.
htdocs/modules/banners/class/form/banner.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
             $blank_img = 'blank.gif';
35 35
             $html_banner = 0;
36 36
         } else {
37
-            if (substr_count($obj->getVar('banner_imageurl'), $xoops_upload_url . '/banners/') == 0) {
37
+            if (substr_count($obj->getVar('banner_imageurl'), $xoops_upload_url.'/banners/') == 0) {
38 38
                 $blank_img = 'blank.gif';
39 39
             } else {
40 40
                 $namefile =
41
-                    substr_replace($obj->getVar('banner_imageurl'), '', 0, strlen($xoops_upload_url . '/banners/'));
42
-                $pathfile =  $xoops->path('uploads/banners/') . $namefile;
41
+                    substr_replace($obj->getVar('banner_imageurl'), '', 0, strlen($xoops_upload_url.'/banners/'));
42
+                $pathfile = $xoops->path('uploads/banners/').$namefile;
43 43
                 if (is_file($pathfile)) {
44
-                    $blank_img = str_replace($xoops_upload_url . '/banners/', '', $obj->getVar('banner_imageurl', 'e'));
44
+                    $blank_img = str_replace($xoops_upload_url.'/banners/', '', $obj->getVar('banner_imageurl', 'e'));
45 45
                 } else {
46 46
                     $blank_img = 'blank.gif';
47 47
                 }
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
         \Xoops\Core\Lists\ImageFile::setOptionsArray($imageselect_img, $xoops->path('uploads/banners'));
74 74
         $imageselect_img->setExtra(
75 75
             'onchange="showImgSelected(\'xo-banners-img\', \'banners_imageurl\', \'banners\', \'\', \''
76
-            . $xoops_upload_url . '\' )"'
76
+            . $xoops_upload_url.'\' )"'
77 77
         );
78 78
         $imgtray_img->addElement($imageselect_img, false);
79 79
         $imgtray_img->addElement(
80 80
             new Xoops\Form\Label(
81 81
                 '',
82
-                "<br /><img src='" . $xoops_upload_url . "/banners/" . $blank_img
82
+                "<br /><img src='".$xoops_upload_url."/banners/".$blank_img
83 83
                 . "' name='image_img' id='xo-banners-img' alt='' />"
84 84
             )
85 85
         );
Please login to merge, or discard this patch.