Completed
Branch master (0881bb)
by Michael
04:14
created
xoops_trust_path/libs/altsys/class/MyBlocksAdminForXCL21.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $
3 3
 
4
-require_once dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
4
+require_once dirname(__FILE__).'/MyBlocksAdmin.class.php';
5 5
 
6 6
 class MyBlocksAdminForXCL21 extends MyBlocksAdmin
7 7
 {
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     static $instance;
19 19
     if (!isset($instance)) {
20 20
         $instance = new MyBlocksAdminForXCL21();
21
-        $instance->construct() ;
21
+        $instance->construct();
22 22
     }
23 23
     return $instance;
24 24
 }
@@ -29,24 +29,24 @@  discard block
 block discarded – undo
29 29
 public function renderCell4BlockOptions($block_data)
30 30
 {
31 31
     if ($this->target_dirname && substr($this->target_dirname, 0, 1) != '_') {
32
-        $langman =& D3LanguageManager::getInstance() ;
33
-        $langman->read('admin.php', $this->target_dirname) ;
32
+        $langman = & D3LanguageManager::getInstance();
33
+        $langman->read('admin.php', $this->target_dirname);
34 34
     }
35 35
 
36
-    $bid = intval($block_data['bid']) ;
36
+    $bid = intval($block_data['bid']);
37 37
 
38 38
 //HACK by domifara
39 39
 //	$block = new XoopsBlock( $bid ) ;
40
-    $handler =& xoops_gethandler('block');
41
-    $block =& $handler->create(false) ;
42
-    $block->load($bid) ;
40
+    $handler = & xoops_gethandler('block');
41
+    $block = & $handler->create(false);
42
+    $block->load($bid);
43 43
 
44
-    $legacy_block =& Legacy_Utils::createBlockProcedure($block) ;
45
-    return $legacy_block->getOptionForm() ;
44
+    $legacy_block = & Legacy_Utils::createBlockProcedure($block);
45
+    return $legacy_block->getOptionForm();
46 46
 }
47 47
 
48 48
     public function checkFck()
49 49
     {
50
-        return (! altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
50
+        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3Tpl.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once XOOPS_ROOT_PATH.'/class/template.php' ;
4
-require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ;
3
+require_once XOOPS_ROOT_PATH.'/class/template.php';
4
+require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
5 5
 
6 6
 class D3Tpl extends XoopsTpl
7 7
 {
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 //	public function D3Tpl()
11 11
     public function __construct()
12 12
     {
13
-        parent::__construct() ;
14
-        if (in_array(altsys_get_core_type(), array( ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P ))) {
15
-            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins') ;
13
+        parent::__construct();
14
+        if (in_array(altsys_get_core_type(), array(ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P))) {
15
+            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins');
16 16
         }
17 17
 
18 18
         // for RTL users
19
-        @define('_GLOBAL_LEFT', @_ADM_USE_RTL == 1 ? 'right' : 'left') ;
20
-        @define('_GLOBAL_RIGHT', @_ADM_USE_RTL == 1 ? 'left' : 'right') ;
19
+        @define('_GLOBAL_LEFT', @_ADM_USE_RTL == 1 ? 'right' : 'left');
20
+        @define('_GLOBAL_RIGHT', @_ADM_USE_RTL == 1 ? 'left' : 'right');
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX22.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
3
+require_once dirname(__FILE__).'/MyBlocksAdmin.class.php';
4 4
 
5 5
 class MyBlocksAdminForX22 extends MyBlocksAdmin
6 6
 {
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function construct()
14 14
     {
15
-        parent::construct() ;
15
+        parent::construct();
16 16
 
17
-        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ;
17
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
18 18
     }
19 19
 
20 20
 //HACK by domifara for php5.3+
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     static $instance;
25 25
     if (!isset($instance)) {
26 26
         $instance = new MyBlocksAdminForX22();
27
-        $instance->construct() ;
27
+        $instance->construct();
28 28
     }
29 29
     return $instance;
30 30
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 class AltsysBreadcrumbs
5 5
 {
6 6
 
7
-    public $paths = array() ;
7
+    public $paths = array();
8 8
 
9 9
     public function AltsysBreadcrumbs()
10 10
     {
@@ -13,29 +13,29 @@  discard block
 block discarded – undo
13 13
 //function &getInstance()
14 14
 public static function &getInstance()
15 15
 {
16
-    static $instance ;
17
-    if (! isset($instance)) {
18
-        $instance = new AltsysBreadcrumbs() ;
16
+    static $instance;
17
+    if (!isset($instance)) {
18
+        $instance = new AltsysBreadcrumbs();
19 19
     }
20
-    return $instance ;
20
+    return $instance;
21 21
 }
22 22
 
23 23
     public function getXoopsBreadcrumbs()
24 24
     {
25
-        $ret = array() ;
25
+        $ret = array();
26 26
         foreach ($this->paths as $val) {
27 27
             // delayed language constant
28 28
         if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) {
29 29
             $ret[] = array(
30
-                'url' => $val['url'] ,
31
-                'name' => constant($val['name']) ,
32
-            ) ;
30
+                'url' => $val['url'],
31
+                'name' => constant($val['name']),
32
+            );
33 33
         } else {
34
-            $ret[] = $val ;
34
+            $ret[] = $val;
35 35
         }
36 36
         }
37
-        unset($ret[ sizeof($ret) - 1 ]['url']) ;
38
-        return $ret ;
37
+        unset($ret[sizeof($ret) - 1]['url']);
38
+        return $ret;
39 39
     }
40 40
 
41 41
 // all data should be escaped
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
     if (is_array($url_or_path)) {
45 45
         if (empty($url_or_path['name'])) {
46 46
             // multiple paths
47
-            $this->paths = array_merge($this->paths, $url_or_path) ;
47
+            $this->paths = array_merge($this->paths, $url_or_path);
48 48
         } else {
49 49
             // array format (just a path)
50
-            $this->paths[] = $url_or_path ;
50
+            $this->paths[] = $url_or_path;
51 51
         }
52 52
     } else {
53 53
         // separate format
54
-        $this->paths[] = array( 'url' => $url_or_path , 'name' => $name ) ;
54
+        $this->paths[] = array('url' => $url_or_path, 'name' => $name);
55 55
     }
56 56
 }
57 57
 
58 58
     public function hasPaths()
59 59
     {
60
-        return ! empty($this->paths) ;
60
+        return !empty($this->paths);
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // notification handler for D3 modules
4 4
 
5
-require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
5
+require_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
6 6
 
7 7
 class D3NotificationHandler
8 8
 {
@@ -10,68 +10,68 @@  discard block
 block discarded – undo
10 10
 //function &getInstance( $conn = null )
11 11
 public static function &getInstance($conn = null)
12 12
 {
13
-    static $instance ;
14
-    if (! isset($instance)) {
15
-        $instance = new D3NotificationHandler() ;
13
+    static $instance;
14
+    if (!isset($instance)) {
15
+        $instance = new D3NotificationHandler();
16 16
     }
17
-    return $instance ;
17
+    return $instance;
18 18
 }
19 19
 
20 20
 
21 21
     public function getMailTemplateDir($mydirname, $mytrustdirname = '')
22 22
     {
23
-        global $xoopsConfig ;
23
+        global $xoopsConfig;
24 24
 
25
-        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname ;
26
-        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname ;
27
-        $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ;
25
+        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname;
26
+        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname;
27
+        $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
28 28
 
29 29
         $search_paths = array(
30
-        "$mydirpath/language/$language/mail_template/" ,
31
-        "$mytrustdirpath/language/$language/mail_template/" ,
32
-        "$mydirpath/language/english/mail_template/" ,
33
-        "$mytrustdirpath/language/english/mail_template/" ,
34
-    ) ;
30
+        "$mydirpath/language/$language/mail_template/",
31
+        "$mytrustdirpath/language/$language/mail_template/",
32
+        "$mydirpath/language/english/mail_template/",
33
+        "$mytrustdirpath/language/english/mail_template/",
34
+    );
35 35
 
36
-        $mail_template_dir = "$mytrustdirpath/language/english/mail_template/" ;
36
+        $mail_template_dir = "$mytrustdirpath/language/english/mail_template/";
37 37
         foreach ($search_paths as $path) {
38 38
             if (file_exists($path)) {
39
-                $mail_template_dir = $path ;
40
-                break ;
39
+                $mail_template_dir = $path;
40
+                break;
41 41
             }
42 42
         }
43 43
 
44
-        return $mail_template_dir ;
44
+        return $mail_template_dir;
45 45
     }
46 46
 
47 47
 
48
-    public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null)
48
+    public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags = array(), $user_list = array(), $omit_user_id = null)
49 49
     {
50
-        $module_hanlder =& xoops_gethandler('module') ;
51
-        $module =& $module_hanlder->getByDirname($mydirname) ;
50
+        $module_hanlder = & xoops_gethandler('module');
51
+        $module = & $module_hanlder->getByDirname($mydirname);
52 52
 
53
-        $notification_handler =& xoops_gethandler('notification') ;
54
-        $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname) ;
53
+        $notification_handler = & xoops_gethandler('notification');
54
+        $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname);
55 55
 
56 56
     // calling a delegate before
57 57
     if (class_exists('XCube_DelegateUtils')) {
58
-        $force_return = false ;
59
-        XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname) ;
58
+        $force_return = false;
59
+        XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname);
60 60
         if ($force_return) {
61
-            return ;
61
+            return;
62 62
         }
63 63
     }
64 64
 
65
-        $mid = $module->getVar('mid') ;
65
+        $mid = $module->getVar('mid');
66 66
 
67 67
     // Check if event is enabled
68
-    $config_handler =& xoops_gethandler('config');
69
-        $mod_config =& $config_handler->getConfigsByCat(0, $mid);
68
+    $config_handler = & xoops_gethandler('config');
69
+        $mod_config = & $config_handler->getConfigsByCat(0, $mid);
70 70
         if (empty($mod_config['notification_enabled'])) {
71 71
             return false;
72 72
         }
73
-        $category_info =& notificationCategoryInfo($category, $mid);
74
-        $event_info =& notificationEventInfo($category, $event, $mid);
73
+        $category_info = & notificationCategoryInfo($category, $mid);
74
+        $event_info = & notificationEventInfo($category, $event, $mid);
75 75
         if (!in_array(notificationGenerateConfig($category_info, $event_info, 'option_name'), $mod_config['notification_events']) && empty($event_info['invisible'])) {
76 76
             return false;
77 77
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE), 'OR');
95 95
         $mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT), 'OR');
96 96
         $criteria->add($mode_criteria);
97
-        $notifications =& $notification_handler->getObjects($criteria);
97
+        $notifications = & $notification_handler->getObjects($criteria);
98 98
         if (empty($notifications)) {
99 99
             return;
100 100
         }
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
     $tags = array();
104 104
     // {X_ITEM_NAME} {X_ITEM_URL} {X_ITEM_TYPE} from lookup_func are disabled
105 105
     $tags['X_MODULE'] = $module->getVar('name', 'n');
106
-        $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
106
+        $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/';
107 107
         $tags['X_NOTIFY_CATEGORY'] = $category;
108 108
         $tags['X_NOTIFY_EVENT'] = $event;
109 109
 
110
-        $template = $event_info['mail_template'] . '.tpl';
110
+        $template = $event_info['mail_template'].'.tpl';
111 111
         $subject = $event_info['mail_subject'];
112 112
 
113 113
         if ($user_list) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 // user-specific tags
122 122
             //$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
123 123
             // TODO: don't show unsubscribe link if it is 'one-time' ??
124
-            $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
124
+            $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php';
125 125
                 $tags = array_merge($tags, $extra_tags);
126 126
 
127 127
                 $notification->notifyUser($mail_template_dir, $template, $subject, $tags);
Please login to merge, or discard this patch.