@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
22 | 22 | |
23 | -require_once XOOPS_ROOT_PATH . '/class/mail/xoopsmultimailer.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/class/mail/xoopsmultimailer.php'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Class Extgallery\Mailer |
@@ -53,25 +53,25 @@ discard block |
||
53 | 53 | public function imageIncluded() |
54 | 54 | { |
55 | 55 | if ('' === $this->photo->getVar('photo_serveur')) { |
56 | - $photoPath = XOOPS_ROOT_PATH . '/uploads/extgallery/public-photo/medium/' . $this->photo->getVar('photo_name'); |
|
56 | + $photoPath = XOOPS_ROOT_PATH.'/uploads/extgallery/public-photo/medium/'.$this->photo->getVar('photo_name'); |
|
57 | 57 | } else { |
58 | - $photoPath = $this->photo->getVar('photo_serveur') . $this->photo->getVar('photo_name'); |
|
58 | + $photoPath = $this->photo->getVar('photo_serveur').$this->photo->getVar('photo_name'); |
|
59 | 59 | } |
60 | 60 | $this->tags['PHOTO_SRC'] = 'cid:photo'; |
61 | 61 | $this->tags['STAMP_SRC'] = 'cid:stamp'; |
62 | 62 | $this->mailer->addEmbeddedImage($photoPath, 'photo'); |
63 | - $this->mailer->addEmbeddedImage(XOOPS_ROOT_PATH . '/modules/extgallery/assets/images/stamp.gif', 'stamp'); |
|
63 | + $this->mailer->addEmbeddedImage(XOOPS_ROOT_PATH.'/modules/extgallery/assets/images/stamp.gif', 'stamp'); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function imageLinked() |
67 | 67 | { |
68 | 68 | if ('' == $this->photo->getVar('photo_serveur')) { |
69 | - $photoUrl = XOOPS_URL . '/uploads/extgallery/public-photo/medium/' . $this->photo->getVar('photo_name'); |
|
69 | + $photoUrl = XOOPS_URL.'/uploads/extgallery/public-photo/medium/'.$this->photo->getVar('photo_name'); |
|
70 | 70 | } else { |
71 | - $photoUrl = $this->photo->getVar('photo_serveur') . $this->photo->getVar('photo_name'); |
|
71 | + $photoUrl = $this->photo->getVar('photo_serveur').$this->photo->getVar('photo_name'); |
|
72 | 72 | } |
73 | 73 | $this->tags['PHOTO_SRC'] = $photoUrl; |
74 | - $this->tags['STAMP_SRC'] = XOOPS_URL . '/modules/extgallery/assets/images/stamp.gif'; |
|
74 | + $this->tags['STAMP_SRC'] = XOOPS_URL.'/modules/extgallery/assets/images/stamp.gif'; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | public function send() |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | |
100 | 100 | public function assignTags() |
101 | 101 | { |
102 | - $this->tags['ECARD_LINK'] = XOOPS_URL . '/modules/extgallery/public-viewecard.php?id=' . $this->ecardId; |
|
102 | + $this->tags['ECARD_LINK'] = XOOPS_URL.'/modules/extgallery/public-viewecard.php?id='.$this->ecardId; |
|
103 | 103 | $this->tags['EXP_EMAIL'] = $this->fromEmail; |
104 | 104 | $this->tags['EXP_NAME'] = $this->fromName; |
105 | 105 | $this->tags['REC_NAME'] = $this->toName; |
106 | 106 | $this->tags['GREETINGS'] = $this->greetings; |
107 | 107 | $this->tags['DESCRIPTION'] = $this->description; |
108 | - $this->tags['MODULE_LINK'] = XOOPS_URL . '/modules/extgallery/'; |
|
108 | + $this->tags['MODULE_LINK'] = XOOPS_URL.'/modules/extgallery/'; |
|
109 | 109 | $this->tags['SITE_NAME'] = $GLOBALS['xoopsConfig']['sitename']; |
110 | 110 | $this->tags['SITE_URL'] = XOOPS_URL; |
111 | 111 | } |
@@ -119,16 +119,16 @@ discard block |
||
119 | 119 | { |
120 | 120 | global $xoopsConfig; |
121 | 121 | |
122 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/extgallery/language/' . $xoopsConfig['language'] . '/mail_template/' . $name)) { |
|
123 | - $path = XOOPS_ROOT_PATH . '/modules/extgallery/language/' . $xoopsConfig['language'] . '/mail_template/' . $name; |
|
122 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/extgallery/language/'.$xoopsConfig['language'].'/mail_template/'.$name)) { |
|
123 | + $path = XOOPS_ROOT_PATH.'/modules/extgallery/language/'.$xoopsConfig['language'].'/mail_template/'.$name; |
|
124 | 124 | } else { |
125 | - $path = XOOPS_ROOT_PATH . '/modules/extgallery/language/english/mail_template/' . $name; |
|
125 | + $path = XOOPS_ROOT_PATH.'/modules/extgallery/language/english/mail_template/'.$name; |
|
126 | 126 | } |
127 | 127 | $fd = @fopen($path, 'rb'); |
128 | 128 | $body = fread($fd, filesize($path)); |
129 | 129 | // replace tags with actual values |
130 | 130 | foreach ($this->tags as $k => $v) { |
131 | - $body = str_replace('{' . $k . '}', $v, $body); |
|
131 | + $body = str_replace('{'.$k.'}', $v, $body); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | return $body; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $glist = $memberHandler->getGroupList(); |
81 | 81 | |
82 | 82 | // Applying permission mask |
83 | - $permArray = include XOOPS_ROOT_PATH . '/modules/extgallery/include/perm.php'; |
|
83 | + $permArray = include XOOPS_ROOT_PATH.'/modules/extgallery/include/perm.php'; |
|
84 | 84 | $modulePermArray = $permArray['modulePerm']; |
85 | 85 | $pluginPermArray = $permArray['pluginPerm']; |
86 | 86 |
@@ -272,7 +272,7 @@ |
||
272 | 272 | { |
273 | 273 | $query = sprintf('SELECT count(*) AS num_leef FROM `%s` WHERE nright - nleft = 1', $this->table); |
274 | 274 | if (0 != $id) { |
275 | - $node = $this->getNode($id); |
|
275 | + $node = $this->getNode($id); |
|
276 | 276 | $query .= sprintf(' AND nleft > %d AND nright < %d', $node['nleft'], $node['nright']); |
277 | 277 | } |
278 | 278 | $result = $this->db->query($query); |
@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) |
102 | 102 | { |
103 | - $open_tags = []; |
|
103 | + $open_tags = []; |
|
104 | 104 | if ($considerHtml) { |
105 | 105 | // if the plain text is shorter than the maximum length, return the whole text |
106 | - if (strlen(preg_replace('/<.*?' . '>/', '', $text)) <= $length) { |
|
106 | + if (strlen(preg_replace('/<.*?'.'>/', '', $text)) <= $length) { |
|
107 | 107 | return $text; |
108 | 108 | } |
109 | 109 | // splits all html-tags to scanable lines |
110 | - preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
110 | + preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
111 | 111 | $total_length = strlen($ending); |
112 | 112 | $truncate = ''; |
113 | 113 | foreach ($lines as $line_matchings) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | unset($open_tags[$pos]); |
125 | 125 | } |
126 | 126 | // if tag is an opening tag |
127 | - } elseif (preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) { |
|
127 | + } elseif (preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) { |
|
128 | 128 | // add tag to the beginning of $open_tags list |
129 | 129 | array_unshift($open_tags, strtolower($tag_matchings[1])); |
130 | 130 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | if ($considerHtml) { |
184 | 184 | // close all unclosed html-tags |
185 | 185 | foreach ($open_tags as $tag) { |
186 | - $truncate .= '</' . $tag . '>'; |
|
186 | + $truncate .= '</'.$tag.'>'; |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function triggerEvent($event, &$param) |
42 | 42 | { |
43 | - include XOOPS_ROOT_PATH . '/modules/extgallery/plugin/plugin.php'; |
|
43 | + include XOOPS_ROOT_PATH.'/modules/extgallery/plugin/plugin.php'; |
|
44 | 44 | |
45 | 45 | foreach ($extgalleryPlugin as $plugin => $status) { |
46 | 46 | if (!$status) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | // require_once XOOPS_ROOT_PATH . "/modules/extgallery/plugin/$plugin/$plugin.php"; |
51 | 51 | |
52 | - $class = 'Extgallery' . ucfirst($plugin); |
|
52 | + $class = 'Extgallery'.ucfirst($plugin); |
|
53 | 53 | |
54 | 54 | $pluginObj = new $class(); |
55 | 55 | $pluginObj->$event($param); |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | |
59 | 59 | public function includeLangFile() |
60 | 60 | { |
61 | - include XOOPS_ROOT_PATH . '/modules/extgallery/plugin/plugin.php'; |
|
61 | + include XOOPS_ROOT_PATH.'/modules/extgallery/plugin/plugin.php'; |
|
62 | 62 | |
63 | 63 | foreach ($extgalleryPlugin as $plugin => $status) { |
64 | 64 | if (!$status) { |
65 | 65 | continue; |
66 | 66 | } |
67 | 67 | |
68 | - require_once XOOPS_ROOT_PATH . "/modules/extgallery/plugin/$plugin/language/english/main.php"; |
|
68 | + require_once XOOPS_ROOT_PATH."/modules/extgallery/plugin/$plugin/language/english/main.php"; |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | } |
@@ -141,7 +141,7 @@ |
||
141 | 141 | global $g_pcl_error_string; |
142 | 142 | global $g_pcl_error_code; |
143 | 143 | |
144 | - return ($g_pcl_error_string . " [code $g_pcl_error_code]"); |
|
144 | + return ($g_pcl_error_string." [code $g_pcl_error_code]"); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | // -------------------------------------------------------------------------------- |
@@ -70,7 +70,7 @@ |
||
70 | 70 | require_once $GLOBALS['xoops']->path('class/template.php'); |
71 | 71 | $breadcrumbTpl = new \XoopsTpl(); |
72 | 72 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
73 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
73 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
74 | 74 | unset($breadcrumbTpl); |
75 | 75 | |
76 | 76 | return $html; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | 'keyName' => 'cat', |
67 | 67 | 'core' => false |
68 | 68 | ]; |
69 | - $this->externalKey['uid'] = [ |
|
69 | + $this->externalKey['uid'] = [ |
|
70 | 70 | 'className' => 'User', |
71 | 71 | 'getMethodeName' => 'get', |
72 | 72 | 'keyName' => 'user', |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function __construct(\XoopsDatabase $db, $type) |
36 | 36 | { |
37 | - parent::__construct($db, 'extgallery_' . $type . 'cat', ucfirst($type) . 'Category', 'cat_id'); |
|
37 | + parent::__construct($db, 'extgallery_'.$type.'cat', ucfirst($type).'Category', 'cat_id'); |
|
38 | 38 | //$this->_nestedTree = new NestedTree($db, 'extgallery_'.$type.'cat', 'cat_id', 'cat_pid', 'cat_id'); |
39 | - $this->_photoHandler = Extgallery\Helper::getInstance()->getHandler(ucfirst($type) . 'Photo'); |
|
39 | + $this->_photoHandler = Extgallery\Helper::getInstance()->getHandler(ucfirst($type).'Photo'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function makeSelect($cats, $name, $selectMode, $addEmpty, $selected, $extra, $displayWeight) |
339 | 339 | { |
340 | - $ret = '<select name="' . $name . '" id="' . $name . '"' . $extra . '>'; |
|
340 | + $ret = '<select name="'.$name.'" id="'.$name.'"'.$extra.'>'; |
|
341 | 341 | if ($addEmpty) { |
342 | 342 | $ret .= '<option value="0">-----</option>'; |
343 | 343 | } |
@@ -364,12 +364,12 @@ discard block |
||
364 | 364 | for ($i = 0; $i < $cat->getVar('nlevel') - 1; ++$i) { |
365 | 365 | $prefix .= '--'; |
366 | 366 | } |
367 | - $catName = $prefix . ' ' . $cat->getVar('cat_name'); |
|
367 | + $catName = $prefix.' '.$cat->getVar('cat_name'); |
|
368 | 368 | if ($displayWeight) { |
369 | - $catName .= ' [' . $cat->getVar('cat_weight') . ']'; |
|
369 | + $catName .= ' ['.$cat->getVar('cat_weight').']'; |
|
370 | 370 | } |
371 | 371 | |
372 | - $ret .= '<option value="' . $cat->getVar('cat_id') . '"' . $selectedOption . '' . $disableOption . '>' . $catName . '</option>'; |
|
372 | + $ret .= '<option value="'.$cat->getVar('cat_id').'"'.$selectedOption.''.$disableOption.'>'.$catName.'</option>'; |
|
373 | 373 | } |
374 | 374 | $ret .= '</select>'; |
375 | 375 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | if ($allCat = in_array(0, $selected)) { |
390 | 390 | $selectedOption = ' selected'; |
391 | 391 | } |
392 | - $ret .= '<option value="0"' . $selectedOption . '>' . _MB_EXTGALLERY_ALL_CATEGORIES . '</option>'; |
|
392 | + $ret .= '<option value="0"'.$selectedOption.'>'._MB_EXTGALLERY_ALL_CATEGORIES.'</option>'; |
|
393 | 393 | foreach ($cats as $cat) { |
394 | 394 | $prefix = ''; |
395 | 395 | for ($i = 0; $i < $cat->getVar('nlevel') - 1; ++$i) { |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | $disableOption = ' disabled="disabled"'; |
407 | 407 | } |
408 | 408 | |
409 | - $ret .= '<option value="' . $cat->getVar('cat_id') . '"' . $selectedOption . '' . $disableOption . '>' . $prefix . ' ' . $cat->getVar('cat_name') . '</option>'; |
|
409 | + $ret .= '<option value="'.$cat->getVar('cat_id').'"'.$selectedOption.''.$disableOption.'>'.$prefix.' '.$cat->getVar('cat_name').'</option>'; |
|
410 | 410 | } |
411 | 411 | $ret .= '</select>'; |
412 | 412 | |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | if (0 != $nbPhoto) { |
499 | 499 | $upNbAlbum = 'cat_nb_album = cat_nb_album + 1, '; |
500 | 500 | } |
501 | - $sql = 'UPDATE `%s` SET ' . $upNbAlbum . 'cat_nb_photo = cat_nb_photo + %d WHERE nleft < %d AND nright > %d;'; |
|
501 | + $sql = 'UPDATE `%s` SET '.$upNbAlbum.'cat_nb_photo = cat_nb_photo + %d WHERE nleft < %d AND nright > %d;'; |
|
502 | 502 | $query = sprintf($sql, $this->table, $nbPhoto, $row['nleft'], $row['nright']); |
503 | 503 | $this->db->queryF($query); |
504 | 504 | |
@@ -557,12 +557,12 @@ discard block |
||
557 | 557 | |
558 | 558 | $count = count($allowedCategories); |
559 | 559 | if ($count > 0) { |
560 | - $in = '(' . $allowedCategories[0]; |
|
560 | + $in = '('.$allowedCategories[0]; |
|
561 | 561 | array_shift($allowedCategories); |
562 | 562 | foreach ($allowedCategories as $allowedCategory) { |
563 | - $in .= ',' . $allowedCategory; |
|
563 | + $in .= ','.$allowedCategory; |
|
564 | 564 | } |
565 | - $in .= ')'; |
|
565 | + $in .= ')'; |
|
566 | 566 | $criteria = new \Criteria('cat_id', $in, 'IN'); |
567 | 567 | } else { |
568 | 568 | $criteria = new \Criteria('cat_id', '(0)', 'IN'); |