@@ -62,12 +62,12 @@ |
||
62 | 62 | $option_ids = []; |
63 | 63 | foreach (array_keys($this->_optionTree) as $id) { |
64 | 64 | if (!empty($id)) { |
65 | - $option_ids[] = '\'' . $ele_name . '[groups][' . $this->_groupId . '][' . $id . ']' . '\''; |
|
65 | + $option_ids[] = '\''.$ele_name.'[groups]['.$this->_groupId.']['.$id.']'.'\''; |
|
66 | 66 | } |
67 | 67 | } |
68 | - $checkallbtn_id = $ele_name . '[checkallbtn][' . $this->_groupId . ']'; |
|
68 | + $checkallbtn_id = $ele_name.'[checkallbtn]['.$this->_groupId.']'; |
|
69 | 69 | $option_ids_str = implode(', ', $option_ids); |
70 | - echo _ALL . ' <input id="' . $checkallbtn_id . '" type="checkbox" value="" onclick="var optionids = new Array(' . $option_ids_str . "); xoopsCheckAllElements(optionids, '" . $checkallbtn_id . '\');">'; |
|
70 | + echo _ALL.' <input id="'.$checkallbtn_id.'" type="checkbox" value="" onclick="var optionids = new Array('.$option_ids_str."); xoopsCheckAllElements(optionids, '".$checkallbtn_id.'\');">'; |
|
71 | 71 | echo '</td></tr></table>'; |
72 | 72 | } |
73 | 73 | } |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | $dstdir = $this->uploadDir; |
96 | - $dstname = $dstdir . '/juvar.' . session_id(); |
|
97 | - $tmpname = $dstdir . '/juvar.tmp' . session_id(); |
|
96 | + $dstname = $dstdir.'/juvar.'.session_id(); |
|
97 | + $tmpname = $dstdir.'/juvar.tmp'.session_id(); |
|
98 | 98 | |
99 | 99 | if (!move_uploaded_file($file['tmp_name'], $tmpname)) { |
100 | 100 | $this->abort('Unable to move uploaded file'); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | if ($jupart) { |
106 | 106 | // got a chunk of a multi-part upload |
107 | - $len = filesize($tmpname); |
|
107 | + $len = filesize($tmpname); |
|
108 | 108 | $_SESSION['juvar.tmpsize'] += $len; |
109 | 109 | if ($len > 0) { |
110 | 110 | $src = fopen($tmpname, 'rb'); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | public function _saveFile($tmpDestination, $fileName) |
185 | 185 | { |
186 | 186 | $this->savedFilename = $fileName; |
187 | - $this->savedDestination = $this->uploadDir . $fileName; |
|
187 | + $this->savedDestination = $this->uploadDir.$fileName; |
|
188 | 188 | |
189 | 189 | if (!$this->_checkFile($tmpDestination)) { |
190 | 190 | return false; |
@@ -61,23 +61,23 @@ |
||
61 | 61 | if (version_compare(mysqli_get_server_info($XoopsDB->conn), '4.1.0', 'ge')): |
62 | 62 | |
63 | 63 | $sql = " DELETE FROM {$linkHandler->table}" |
64 | - . ' WHERE ' |
|
65 | - . " tag_modid = {$mid}" |
|
66 | - . ' AND ' |
|
67 | - . ' ( tag_itemid NOT IN ' |
|
68 | - . " ( SELECT DISTINCT {$itemHandler->keyName} " |
|
69 | - . " FROM {$itemHandler->table} " |
|
70 | - . " WHERE {$itemHandler->table}.photo_approved > 0" |
|
71 | - . ' ) ' |
|
72 | - . ' )'; else: |
|
64 | + . ' WHERE ' |
|
65 | + . " tag_modid = {$mid}" |
|
66 | + . ' AND ' |
|
67 | + . ' ( tag_itemid NOT IN ' |
|
68 | + . " ( SELECT DISTINCT {$itemHandler->keyName} " |
|
69 | + . " FROM {$itemHandler->table} " |
|
70 | + . " WHERE {$itemHandler->table}.photo_approved > 0" |
|
71 | + . ' ) ' |
|
72 | + . ' )'; else: |
|
73 | 73 | $sql = " DELETE {$linkHandler->table} FROM {$linkHandler->table}" |
74 | - . " LEFT JOIN {$itemHandler->table} AS aa ON {$linkHandler->table}.tag_itemid = aa.{$itemHandler->keyName} " |
|
75 | - . ' WHERE ' |
|
76 | - . " tag_modid = {$mid}" |
|
77 | - . ' AND ' |
|
78 | - . " ( aa.{$itemHandler->keyName} IS NULL" |
|
79 | - . ' OR aa.photo_approved < 1' |
|
80 | - . ' )'; |
|
74 | + . " LEFT JOIN {$itemHandler->table} AS aa ON {$linkHandler->table}.tag_itemid = aa.{$itemHandler->keyName} " |
|
75 | + . ' WHERE ' |
|
76 | + . " tag_modid = {$mid}" |
|
77 | + . ' AND ' |
|
78 | + . " ( aa.{$itemHandler->keyName} IS NULL" |
|
79 | + . ' OR aa.photo_approved < 1' |
|
80 | + . ' )'; |
|
81 | 81 | endif; |
82 | 82 | if (!$result = $linkHandler->db->queryF($sql)) { |
83 | 83 | //xoops_error($linkHandler->db->error()); |
@@ -24,12 +24,12 @@ |
||
24 | 24 | |
25 | 25 | /** @var Extgallery\PublicPhotoHandler $itemHandler */ |
26 | 26 | $itemHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto'); |
27 | - $items_obj = $itemHandler->getObjects(new \Criteria('photo_id', '(' . implode(', ', $items_id) . ')', 'IN'), true); |
|
27 | + $items_obj = $itemHandler->getObjects(new \Criteria('photo_id', '('.implode(', ', $items_id).')', 'IN'), true); |
|
28 | 28 | |
29 | 29 | foreach (array_keys($items) as $cat_id) { |
30 | 30 | foreach (array_keys($items[$cat_id]) as $item_id) { |
31 | 31 | if (isset($items_obj[$item_id])) { |
32 | - $item_obj =& $items_obj[$item_id]; |
|
32 | + $item_obj = & $items_obj[$item_id]; |
|
33 | 33 | $items[$cat_id][$item_id] = [ |
34 | 34 | 'title' => $item_obj->getVar('photo_title'), |
35 | 35 | 'uid' => $item_obj->getVar('uid'), |
@@ -69,7 +69,8 @@ discard block |
||
69 | 69 | . " FROM {$itemHandler->table} " |
70 | 70 | . " WHERE {$itemHandler->table}.photo_approved > 0" |
71 | 71 | . ' ) ' |
72 | - . ' )'; else: |
|
72 | + . ' )'; else { |
|
73 | + : |
|
73 | 74 | $sql = " DELETE {$linkHandler->table} FROM {$linkHandler->table}" |
74 | 75 | . " LEFT JOIN {$itemHandler->table} AS aa ON {$linkHandler->table}.tag_itemid = aa.{$itemHandler->keyName} " |
75 | 76 | . ' WHERE ' |
@@ -78,6 +79,7 @@ discard block |
||
78 | 79 | . " ( aa.{$itemHandler->keyName} IS NULL" |
79 | 80 | . ' OR aa.photo_approved < 1' |
80 | 81 | . ' )'; |
82 | + } |
|
81 | 83 | endif; |
82 | 84 | if (!$result = $linkHandler->db->queryF($sql)) { |
83 | 85 | //xoops_error($linkHandler->db->error()); |
@@ -16,5 +16,5 @@ |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | //todo: check this file |
19 | -include __DIR__ . '/header.php'; |
|
20 | -require_once XOOPS_ROOT_PATH . '/modules/tag/view.tag.php'; |
|
19 | +include __DIR__.'/header.php'; |
|
20 | +require_once XOOPS_ROOT_PATH.'/modules/tag/view.tag.php'; |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extgallery; |
21 | 21 | |
22 | -include __DIR__ . '/header.php'; |
|
23 | -require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php'; |
|
22 | +include __DIR__.'/header.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/modules/extgallery/class/publicPerm.php'; |
|
24 | 24 | |
25 | 25 | $photoId = \Xmf\Request::getInt('id', 0, 'GET'); |
26 | 26 | |
@@ -51,16 +51,16 @@ discard block |
||
51 | 51 | // If require image don't exist |
52 | 52 | if (0 == $photo->getVar('cat_id')) { |
53 | 53 | header('Content-type: image/jpeg'); |
54 | - readfile(XOOPS_ROOT_PATH . '/modules/extgallery/assets/images/dont-exist.jpg'); |
|
54 | + readfile(XOOPS_ROOT_PATH.'/modules/extgallery/assets/images/dont-exist.jpg'); |
|
55 | 55 | |
56 | 56 | // If user is allowed to view this picture |
57 | 57 | } elseif ($permHandler->isAllowed($xoopsUser, 'public_access', $photo->getVar('cat_id'))) { |
58 | 58 | $photo = $photoHandler->objectToArray($photo); |
59 | - header('Content-type: ' . $type . ''); |
|
60 | - readfile(XOOPS_ROOT_PATH . '/uploads/extgallery/public-photo/medium/' . $photo['photo_name']); |
|
59 | + header('Content-type: '.$type.''); |
|
60 | + readfile(XOOPS_ROOT_PATH.'/uploads/extgallery/public-photo/medium/'.$photo['photo_name']); |
|
61 | 61 | |
62 | 62 | // If user isn't allowed to view this picture |
63 | 63 | } else { |
64 | 64 | header('Content-type: image/jpeg'); |
65 | - readfile(XOOPS_ROOT_PATH . '/modules/extgallery/assets/images/not-allowed.jpg'); |
|
65 | + readfile(XOOPS_ROOT_PATH.'/modules/extgallery/assets/images/not-allowed.jpg'); |
|
66 | 66 | } |
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | |
19 | 19 | use XoopsModules\Extgallery; |
20 | 20 | |
21 | -include __DIR__ . '/header.php'; |
|
22 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
21 | +include __DIR__.'/header.php'; |
|
22 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
23 | 23 | //require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php'; |
24 | 24 | |
25 | 25 | /** @var Extgallery\Helper $helper */ |
26 | 26 | $helper = Extgallery\Helper::getInstance(); |
27 | 27 | |
28 | 28 | $GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-album.tpl'; |
29 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
29 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
30 | 30 | |
31 | 31 | if (!isset($_GET['id'])) { |
32 | 32 | $catId = 0; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $orderby = $GLOBALS['xoopsModuleConfig']['display_set_order']; |
59 | 59 | } |
60 | 60 | |
61 | -$SortbyOrderby = $sortby . ' ' . $orderby; |
|
61 | +$SortbyOrderby = $sortby.' '.$orderby; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * @param $SortbyOrderby |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $catObj = $catHandler->getCat($catId); |
116 | 116 | |
117 | 117 | if (null === $catObj) { |
118 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
118 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
119 | 119 | exit; |
120 | 120 | } |
121 | 121 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $xoopsTpl->assign('photos', $photos); |
158 | 158 | /** @var xos_opal_Theme $xoTheme */ |
159 | 159 | |
160 | -$pageNav = new \XoopsPageNav($photoHandler->getAlbumCount($catId), $helper->getConfig('nb_column') * $helper->getConfig('nb_line'), $start, 'start', 'id=' . $catId . '&orderby=' . $orderby . '&sortby=' . $sortby); //xoops - blueteen - tri de l'affichage |
|
160 | +$pageNav = new \XoopsPageNav($photoHandler->getAlbumCount($catId), $helper->getConfig('nb_column') * $helper->getConfig('nb_line'), $start, 'start', 'id='.$catId.'&orderby='.$orderby.'&sortby='.$sortby); //xoops - blueteen - tri de l'affichage |
|
161 | 161 | $xoopsTpl->assign('pageNav', $pageNav->renderNav()); |
162 | 162 | if (isset($catObj)) { |
163 | 163 | $xoopsTpl->assign('xoops_pagetitle', $catObj->getVar('cat_name')); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $attributes['rel'] = $rel; |
202 | 202 | $attributes['type'] = 'application/rss+xml'; |
203 | 203 | $attributes['title'] = _MD_EXTGALLERY_RSS; |
204 | -$attributes['href'] = XOOPS_URL . '/modules/extgallery/public-rss.php'; |
|
204 | +$attributes['href'] = XOOPS_URL.'/modules/extgallery/public-rss.php'; |
|
205 | 205 | $xoTheme->addMeta('link', $rel, $attributes); |
206 | 206 | $xoTheme->addStylesheet('modules/extgallery/assets/css/style.css'); |
207 | 207 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | |
221 | 221 | $xoopsTpl->assign('extgalleryID', $catId); //xoops - blueteen - tri de l'affichage |
222 | 222 | $xoopsTpl->assign('extgalleryStart', $start); //xoops -blueteen - tri de l'affichage |
223 | -$xoopsTpl->assign('extgallerySortbyOrderby', _MD_EXTGALLERY_ORDERBY . convertorderbytrans($SortbyOrderby)); //xoops - blueteen - tri de l'affichage |
|
223 | +$xoopsTpl->assign('extgallerySortbyOrderby', _MD_EXTGALLERY_ORDERBY.convertorderbytrans($SortbyOrderby)); //xoops - blueteen - tri de l'affichage |
|
224 | 224 | |
225 | 225 | //DNPROSSI - VOLTAN - added preferences option |
226 | 226 | // enable_info, enable_submitter_lnk, enable_photo_hits |
@@ -268,4 +268,4 @@ discard block |
||
268 | 268 | $xoopsTpl->assign('album_prettyphoto_slidspeed', $helper->getConfig('album_prettyphoto_slidspe')); |
269 | 269 | $xoopsTpl->assign('album_prettyphoto_autoplay', $helper->getConfig('album_prettyphoto_autopla')); |
270 | 270 | |
271 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
271 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | use Xmf\Request; |
19 | 19 | use XoopsModules\Extgallery; |
20 | 20 | |
21 | -include __DIR__ . '/header.php'; |
|
21 | +include __DIR__.'/header.php'; |
|
22 | 22 | |
23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-photo.tpl'; |
24 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
24 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
25 | 25 | |
26 | 26 | /** @var Extgallery\Helper $helper */ |
27 | 27 | $helper = Extgallery\Helper::getInstance(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // Don't update counter if user come from rating page |
58 | -if (null !== (Request::getString('HTTP_REFERER', '', 'SERVER')) && basename(Request::getString('HTTP_REFERER', '', 'SERVER')) != 'public-rating.php?photoId=' . $photoId) { |
|
58 | +if (null !== (Request::getString('HTTP_REFERER', '', 'SERVER')) && basename(Request::getString('HTTP_REFERER', '', 'SERVER')) != 'public-rating.php?photoId='.$photoId) { |
|
59 | 59 | $photoHandler->updateHits($photoId); |
60 | 60 | } |
61 | 61 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | $xoopsTpl->assign('totalPhoto', $nbPhoto); |
99 | 99 | |
100 | 100 | //DNPROSSI - changed photo_desc to photo_title |
101 | -$xoopsTpl->assign('xoops_pagetitle', $photo['photo_title'] . ' - ' . $cat['cat_name']); |
|
102 | -$xoTheme->addMeta('meta', 'description', $photo['photo_title'] . ' - ' . $cat['cat_desc']); |
|
101 | +$xoopsTpl->assign('xoops_pagetitle', $photo['photo_title'].' - '.$cat['cat_name']); |
|
102 | +$xoTheme->addMeta('meta', 'description', $photo['photo_title'].' - '.$cat['cat_desc']); |
|
103 | 103 | |
104 | 104 | $rel = 'alternate'; |
105 | 105 | $attributes['rel'] = $rel; |
106 | 106 | $attributes['type'] = 'application/rss+xml'; |
107 | 107 | $attributes['title'] = _MD_EXTGALLERY_RSS; |
108 | -$attributes['href'] = XOOPS_URL . '/modules/extgallery/public-rss.php'; |
|
108 | +$attributes['href'] = XOOPS_URL.'/modules/extgallery/public-rss.php'; |
|
109 | 109 | $xoTheme->addMeta('link', $rel, $attributes); |
110 | 110 | $xoTheme->addStylesheet('modules/extgallery/assets/css/style.css'); |
111 | 111 | |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | |
180 | 180 | // For xoops tag |
181 | 181 | if ((1 == $helper->getConfig('usetag')) && is_dir('../tag')) { |
182 | - require_once XOOPS_ROOT_PATH . '/modules/tag/include/tagbar.php'; |
|
182 | + require_once XOOPS_ROOT_PATH.'/modules/tag/include/tagbar.php'; |
|
183 | 183 | $xoopsTpl->assign('tagbar', tagBar($photo['photo_id'], $catid = 0)); |
184 | 184 | $xoopsTpl->assign('tags', true); |
185 | 185 | } else { |
186 | 186 | $xoopsTpl->assign('tags', false); |
187 | 187 | } |
188 | 188 | |
189 | -include XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
190 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
189 | +include XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
190 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | use XoopsModules\Extgallery; |
19 | 19 | |
20 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
20 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
21 | 21 | |
22 | 22 | $com_itemid = \Xmf\Request::getInt('com_itemid', 0, 'GET'); |
23 | 23 | if ($com_itemid > 0) { |
@@ -31,5 +31,5 @@ discard block |
||
31 | 31 | $title = $photo->getVar('photo_desc'); |
32 | 32 | } |
33 | 33 | $com_replytitle = $title; |
34 | - require_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
34 | + require_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
|
35 | 35 | } |
@@ -32,21 +32,21 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | switch (strtolower(strrchr($photo->getVar('photo_name'), '.'))) { |
35 | - case '.png': |
|
36 | - $type = 'image/png'; |
|
37 | - break; |
|
38 | - case '.gif': |
|
39 | - $type = 'image/gif'; |
|
40 | - break; |
|
41 | - case '.jpg': |
|
42 | - $type = 'image/jpeg'; |
|
43 | - break; |
|
44 | - case '.jpeg': |
|
45 | - $type = 'image/jpeg'; |
|
46 | - break; |
|
47 | - default: |
|
48 | - $type = 'application/octet-stream'; |
|
49 | - break; |
|
35 | + case '.png': |
|
36 | + $type = 'image/png'; |
|
37 | + break; |
|
38 | + case '.gif': |
|
39 | + $type = 'image/gif'; |
|
40 | + break; |
|
41 | + case '.jpg': |
|
42 | + $type = 'image/jpeg'; |
|
43 | + break; |
|
44 | + case '.jpeg': |
|
45 | + $type = 'image/jpeg'; |
|
46 | + break; |
|
47 | + default: |
|
48 | + $type = 'application/octet-stream'; |
|
49 | + break; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | header('Content-Type: ' . $type . ''); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | use XoopsModules\Extgallery; |
19 | 19 | |
20 | -include __DIR__ . '/header.php'; |
|
20 | +include __DIR__.'/header.php'; |
|
21 | 21 | //require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php'; |
22 | 22 | |
23 | 23 | $photoId = \Xmf\Request::getInt('id', 0, 'GET'); |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | break; |
50 | 50 | } |
51 | 51 | |
52 | -header('Content-Type: ' . $type . ''); |
|
53 | -header('Content-Disposition: attachment; filename="' . $photo->getVar('photo_name') . '"'); |
|
52 | +header('Content-Type: '.$type.''); |
|
53 | +header('Content-Disposition: attachment; filename="'.$photo->getVar('photo_name').'"'); |
|
54 | 54 | |
55 | 55 | //if ($photo->getVar('photo_havelarge')) { |
56 | 56 | // if ($permHandler->isAllowed($GLOBALS['xoopsUser'], 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") { |
@@ -64,19 +64,19 @@ discard block |
||
64 | 64 | |
65 | 65 | if ($permHandler->isAllowed($GLOBALS['xoopsUser'], 'public_download_original', $photo->getVar('cat_id')) |
66 | 66 | && '' != $photo->getVar('photo_orig_name')) { |
67 | - $photoName = 'original/' . $photo->getVar('photo_orig_name'); |
|
67 | + $photoName = 'original/'.$photo->getVar('photo_orig_name'); |
|
68 | 68 | } else { |
69 | 69 | if ($photo->getVar('photo_havelarge')) { |
70 | - $photoName = 'large/large_' . $photo->getVar('photo_name'); |
|
70 | + $photoName = 'large/large_'.$photo->getVar('photo_name'); |
|
71 | 71 | } else { |
72 | - $photoName = 'medium/' . $photo->getVar('photo_name'); |
|
72 | + $photoName = 'medium/'.$photo->getVar('photo_name'); |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | 76 | $photoHandler->updateDownload($photoId); |
77 | 77 | |
78 | 78 | if ('' == $photo->getVar('photo_serveur')) { |
79 | - readfile(XOOPS_ROOT_PATH . '/uploads/extgallery/public-photo/' . $photoName); |
|
79 | + readfile(XOOPS_ROOT_PATH.'/uploads/extgallery/public-photo/'.$photoName); |
|
80 | 80 | } else { |
81 | - readfile($photo->getVar('photo_serveur') . $photoName); |
|
81 | + readfile($photo->getVar('photo_serveur').$photoName); |
|
82 | 82 | } |