Completed
Branch master (838035)
by Michael
03:45
created
htdocs/class/xoopsform/spin/formspin.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 /*----------------------------------------------------------*/
34 34
 /* set here the folder of the clas relative at the root     */
35 35
 /*----------------------------------------------------------*/
36
-define('_SPIN_FOLDER','/class/xoopsform/spin/');
36
+define('_SPIN_FOLDER', '/class/xoopsform/spin/');
37 37
 /*----------------------------------------------------------*/
38 38
 
39 39
 class XoopsFormSpin extends XoopsFormElement
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @var integer
110 110
      * @access private
111 111
      */
112
-    var $_minMaxVisible= true;
112
+    var $_minMaxVisible = true;
113 113
 
114 114
     /**
115 115
      *  tyleBordure ;  style CSS of frame control
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
      *
156 156
      */
157 157
     function XoopsFormSpin($caption, $name, $value = 0,
158
-                           $min = 0, $max=100,
158
+                           $min = 0, $max = 100,
159 159
                            $smallIncrement = 1, $largeIncrement = 10,
160
-                           $size = 5, $unite='', $imgFolder='default',
160
+                           $size = 5, $unite = '', $imgFolder = 'default',
161 161
                            $styleText = '', $styleBordure = '',
162 162
                            $minMaxVisible = true)
163 163
     {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     function setSmallIncrement($smallIncrement)
251 251
     {
252 252
         $this->_smallIncrement = intval($smallIncrement);
253
-        if ($this->_smallIncrement == 0) $this->_smallIncrement =1;
253
+        if ($this->_smallIncrement == 0) $this->_smallIncrement = 1;
254 254
     }
255 255
     
256 256
     /*-----------------------------------------------------------------*/
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     function setImgFolder($folder)
311 311
     {
312
-        if ($folder <> '' ) $this->_imgFolder = $folder;
312
+        if ($folder <> '') $this->_imgFolder = $folder;
313 313
     }
314 314
     /*-----------------------------------------------------------------*/
315 315
     /**
@@ -393,11 +393,11 @@  discard block
 block discarded – undo
393 393
     function render()
394 394
     {
395 395
      $sSpinFolder = $this->getFolder();
396
-     $sFolderImg =  "{$sSpinFolder}/images/{$this->getImgFolder()}/";
396
+     $sFolderImg = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
397 397
 
398 398
   
399 399
       $prefixe = $this->getName();
400
-      $prefixe2 = 'spin'.$prefixe;
400
+      $prefixe2 = 'spin' . $prefixe;
401 401
     
402 402
       $smallIncrement = $this->getSmallIncrement();
403 403
       $largeIncrement = $this->getLargeIncrement();
@@ -409,8 +409,8 @@  discard block
 block discarded – undo
409 409
 
410 410
       $onMouseUp = "spinStop();";
411 411
       //----------------------------------------------------------------
412
-      $styleBordure = $this->htmlAddAttribut ('style', $this->getStyleBordure());
413
-      $styleText    = $this->htmlAddAttribut ('style', $this->getStyleText());
412
+      $styleBordure = $this->htmlAddAttribut('style', $this->getStyleBordure());
413
+      $styleText    = $this->htmlAddAttribut('style', $this->getStyleText());
414 414
       $styleArrow = "style=\"display: table-cell;vertical-align: middle; text-align: center; line-height: 100%; font-size: 7 pt; margin-top: 0; margin-bottom: 0; padding: 0\"";
415 415
       //----------------------------------------------------------------
416 416
       $t = array();
@@ -434,11 +434,11 @@  discard block
 block discarded – undo
434 434
       $t[] = "    </td>";
435 435
       
436 436
       $unite = $this->getUnite();
437
-      if ($unite <> ''){
437
+      if ($unite <> '') {
438 438
         $t[] = "    <td style='display: table-cell;vertical-align: middle; '>&nbsp;{$unite}&nbsp;</td>";
439 439
       }
440 440
       //-------------------------------------------------------
441
-      if ($this->getMinMaxVisible()){
441
+      if ($this->getMinMaxVisible()) {
442 442
         $onMouseDownMin = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Min\", {$this->getMin()}, {$delai}, \"{$sFolderImg}spinMin1.gif\");";
443 443
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
444 444
         $t[] = "      <img border='0' name='{$prefixe2}_imgMin' src='{$sFolderImg}spinMin0.gif'   onmousedown='{$onMouseDownMin}'><br>";
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
       $t[] = "    </td>";
454 454
       
455 455
       //-------------------------------------------------------
456
-      if ($this->getMinMaxVisible()){
456
+      if ($this->getMinMaxVisible()) {
457 457
         $onMouseDownMax = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Max\", {$this->getMax()}, {$delai}, \"{$sFolderImg}spinMax1.gif\");";
458 458
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
459 459
         $t[] = "      <img border='0' name='{$prefixe2}_imgMax' src='{$sFolderImg}spinMax0.gif'   onmousedown='{$onMouseDownMax}'><br>";
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
       
464 464
       
465 465
       $t[] = "  </tr>";
466
-      $t[] = "</table>"."\n";
466
+      $t[] = "</table>" . "\n";
467 467
       $t[] = "</div>";
468 468
       //-------------------------------------------
469
-      $html = implode ("\n", $t);
469
+      $html = implode("\n", $t);
470 470
 
471 471
       return $html;
472 472
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 /**************************************************************************
476 476
  * calcul du dossier du composant
477 477
  *************************************************************************/
478
-function getFolder (){
478
+function getFolder() {
479 479
 
480 480
     $sSpinFolder = XOOPS_URL . _SPIN_FOLDER;
481 481
 
@@ -485,15 +485,15 @@  discard block
 block discarded – undo
485 485
 /********************************************************************
486 486
  *
487 487
 *********************************************************************/
488
-function htmlAddAttribut($attribut, $value, $default = ''){
488
+function htmlAddAttribut($attribut, $value, $default = '') {
489 489
 
490
-  if ($value == ''){$value = $default;}
490
+  if ($value == '') {$value = $default; }
491 491
   
492
-  if ($value <> ""){
493
-    if (substr($value,0,strlen($attribut)) <> $attribut){
494
-      $r ="{$attribut}=\"{$value}\"";
492
+  if ($value <> "") {
493
+    if (substr($value, 0, strlen($attribut)) <> $attribut) {
494
+      $r = "{$attribut}=\"{$value}\"";
495 495
     }
496
-  }else{
496
+  } else {
497 497
     $r = '';
498 498
   }
499 499
   
Please login to merge, or discard this patch.
htdocs/modules/extcal/versions/extcal_2_21.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@
 block discarded – undo
31 31
 global $xoopsDB;
32 32
 
33 33
         // Create eXtcal upload directory if don't exist
34
-        $dir = XOOPS_ROOT_PATH."/uploads/extcal";
34
+        $dir = XOOPS_ROOT_PATH . "/uploads/extcal";
35 35
         if (!is_dir($dir)) {
36 36
             mkdir($dir);
37 37
 
38 38
             // Copy index.html files on uploads folders
39
-            $indexFile = XOOPS_ROOT_PATH."/modules/extcal/include/index.html";
40
-            copy($indexFile, XOOPS_ROOT_PATH."/uploads/extcal/index.html");
39
+            $indexFile = XOOPS_ROOT_PATH . "/modules/extcal/include/index.html";
40
+            copy($indexFile, XOOPS_ROOT_PATH . "/uploads/extcal/index.html");
41 41
         }
42 42
 
43 43
         // Create who's not going table to fix bug. If the table exist, the query will faile
44
-        $sql = "CREATE TABLE `".$xoopsDB->prefix('extcal_eventnotmember')."` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
44
+        $sql = "CREATE TABLE `" . $xoopsDB->prefix('extcal_eventnotmember') . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
45 45
         $xoopsDB->query($sql);
46 46
 
47 47
 }
Please login to merge, or discard this patch.
htdocs/modules/extcal/versions/extcal_2_15.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,27 +31,27 @@
 block discarded – undo
31 31
 global $xoopsDB;
32 32
 
33 33
         //$xoopsDB =& Database::getInstance();
34
-        $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
34
+        $xoopsDB = & XoopsDatabaseFactory::getDatabaseConnection();
35 35
 
36
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
36
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
37 37
         $xoopsDB->query($sql);
38 38
 
39
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;";
39
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;";
40 40
         $xoopsDB->query($sql);
41 41
 
42
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ";
42
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ";
43 43
         $xoopsDB->query($sql);
44 44
 
45
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;";
45
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;";
46 46
         $xoopsDB->query($sql);
47 47
 
48
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;";
48
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;";
49 49
         $xoopsDB->query($sql);
50 50
 
51
-        $sql = "CREATE TABLE `".$xoopsDB->prefix('extcal_event')."` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
51
+        $sql = "CREATE TABLE `" . $xoopsDB->prefix('extcal_event') . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
52 52
         $xoopsDB->query($sql);
53 53
 
54
-        $sql = "CREATE TABLE `".$xoopsDB->prefix('extcal_file')."` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
54
+        $sql = "CREATE TABLE `" . $xoopsDB->prefix('extcal_file') . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
55 55
         $xoopsDB->query($sql);
56 56
 
57 57
 }
Please login to merge, or discard this patch.
htdocs/modules/extcal/versions/extcal_2_04.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 {
31 31
 global $xoopsDB;
32 32
 
33
-        $sql = "ALTER TABLE `".$xoopsDB->prefix('extcal_event')."` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;";
33
+        $sql = "ALTER TABLE `" . $xoopsDB->prefix('extcal_event') . "` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;";
34 34
         $xoopsDB->query($sql);
35 35
 
36 36
 }
Please login to merge, or discard this patch.
htdocs/modules/extcal/event.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $permHandler           = ExtcalPerm::getHandler();
23 23
 include_once XOOPS_ROOT_PATH . "/modules/extcal/class/etablissement.php";
24 24
 include_once XOOPS_ROOT_PATH . "/modules/extcal/include/functions.php";
25
-$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
25
+$myts = & MyTextSanitizer::getInstance(); // MyTextSanitizer object
26 26
 
27 27
 if (!function_exists('clear_unicodeslashes')) {
28 28
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 $event = $eventHandler->objectToArray($eventObj, array('cat_id', 'event_submitter'));
51 51
 $eventHandler->serverTimeToUserTime($event);
52 52
 
53
-$configHandler =& xoops_gethandler('config');
53
+$configHandler = & xoops_gethandler('config');
54 54
 $extcalConfig  = $configHandler->getConfigList($module->getVar("mid"));
55 55
 
56 56
 // Adding formated date for start and end event
Please login to merge, or discard this patch.
htdocs/modules/extcal/include/constantes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     $name = '';
50 50
 }
51 51
 
52
-$moduleHandler =& xoops_gethandler('module');
52
+$moduleHandler = & xoops_gethandler('module');
53 53
 $module        = $moduleHandler->getByDirname('extcal');
54 54
 
55 55
 if ($name == 'extcal' || is_object($module)) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $extcalConfig = $xoopsModuleConfig;
58 58
 
59 59
     } else {
60
-        $configHandler =& xoops_gethandler('config');
60
+        $configHandler = & xoops_gethandler('config');
61 61
         $extcalConfig  = $configHandler->getConfigList($module->getVar("mid"));
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
htdocs/modules/extcal/include/install_function.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     }
22 22
 
23 23
     $moduleId               = $xoopsModule->getVar('mid');
24
-    $groupPermissionHandler =& xoops_gethandler('groupperm');
25
-    $configHandler          =& xoops_gethandler('config');
24
+    $groupPermissionHandler = & xoops_gethandler('groupperm');
25
+    $configHandler          = & xoops_gethandler('config');
26 26
 
27 27
     /**
28 28
      * Default public category permission mask
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/event.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false);
51 51
         $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false);
52 52
 
53
-        $this->externalKey['cat_id']          = array(
53
+        $this->externalKey['cat_id'] = array(
54 54
             'className'      => 'cat',
55 55
             'getMethodeName' => 'getCat',
56 56
             'keyName'        => 'cat',
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
     {
385 385
         //ext_echoArray($criteres);
386 386
         global $extcalConfig;
387
-        $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
387
+        $myts = & MyTextSanitizer::getInstance(); // MyTextSanitizer object
388 388
 
389 389
         $eventsU = $this->getEventsUniques($criteres);
390 390
         $eventsR = $this->getEventsRecurents($criteres);
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
                         $year
571 571
                     ),
572 572
                     $this->_extcalTime->_getUserTimeZone($user)
573
-                );;
573
+                ); ;
574 574
                 //$criteriaCompo->add(new Criteria('event_start', $end, '<='));
575 575
 
576 576
                 break;
@@ -2562,7 +2562,7 @@  discard block
 block discarded – undo
2562 2562
                 'te.event_address',
2563 2563
                 'tc.cat_name'
2564 2564
             );
2565
-            $t       = array();
2565
+            $t = array();
2566 2566
             for (
2567 2567
                 $i = 0, $count = count($queryarray); $i < $count; ++$i
2568 2568
             ) {
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/cat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $catId = $this->getInsertId();
58 58
 
59 59
         // Retriving permission mask
60
-        $groupPermissionHandler =& xoops_gethandler('groupperm');
60
+        $groupPermissionHandler = & xoops_gethandler('groupperm');
61 61
         $moduleId               = $GLOBALS['xoopsModule']->getVar('mid');
62 62
 
63 63
         $criteria = new CriteriaCompo();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $permMask = $groupPermissionHandler->getObjects($criteria);
67 67
 
68 68
         // Retriving group list
69
-        $memberHandler =& xoops_gethandler('member');
69
+        $memberHandler = & xoops_gethandler('member');
70 70
         $glist         = $memberHandler->getGroupList();
71 71
 
72 72
         // Applying permission mask
Please login to merge, or discard this patch.