@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function wggithub_block_addCatSelect($cats) |
30 | 30 | { |
31 | - $cat_sql = '('; |
|
32 | - if (\is_array($cats)) { |
|
33 | - $cat_sql .= current($cats); |
|
34 | - array_shift($cats); |
|
35 | - foreach ($cats as $cat) { |
|
36 | - $cat_sql .= ',' . $cat; |
|
37 | - } |
|
38 | - } |
|
39 | - $cat_sql .= ')'; |
|
40 | - return $cat_sql; |
|
31 | + $cat_sql = '('; |
|
32 | + if (\is_array($cats)) { |
|
33 | + $cat_sql .= current($cats); |
|
34 | + array_shift($cats); |
|
35 | + foreach ($cats as $cat) { |
|
36 | + $cat_sql .= ',' . $cat; |
|
37 | + } |
|
38 | + } |
|
39 | + $cat_sql .= ')'; |
|
40 | + return $cat_sql; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | */ |
50 | 50 | function wggithubGetMyItemIds($permtype, $dirname) |
51 | 51 | { |
52 | - global $xoopsUser; |
|
53 | - static $permissions = []; |
|
54 | - if (\is_array($permissions) && \array_key_exists($permtype, $permissions)) { |
|
55 | - return $permissions[$permtype]; |
|
56 | - } |
|
57 | - $moduleHandler = \xoops_getHandler('module'); |
|
58 | - $wggithubModule = $moduleHandler->getByDirname($dirname); |
|
59 | - $groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; |
|
60 | - $grouppermHandler = \xoops_getHandler('groupperm'); |
|
61 | - $itemIds = $grouppermHandler->getItemIds($permtype, $groups, $wggithubModule->getVar('mid')); |
|
62 | - return $itemIds; |
|
52 | + global $xoopsUser; |
|
53 | + static $permissions = []; |
|
54 | + if (\is_array($permissions) && \array_key_exists($permtype, $permissions)) { |
|
55 | + return $permissions[$permtype]; |
|
56 | + } |
|
57 | + $moduleHandler = \xoops_getHandler('module'); |
|
58 | + $wggithubModule = $moduleHandler->getByDirname($dirname); |
|
59 | + $groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; |
|
60 | + $grouppermHandler = \xoops_getHandler('groupperm'); |
|
61 | + $itemIds = $grouppermHandler->getItemIds($permtype, $groups, $wggithubModule->getVar('mid')); |
|
62 | + return $itemIds; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | case 'none': |
135 | 135 | if($topic_name) { |
136 | - $topic_name = 'topic=' . $topic_name . '&'; |
|
136 | + $topic_name = 'topic=' . $topic_name . '&'; |
|
137 | 137 | } |
138 | 138 | $rewrite_base = '/modules/'; |
139 | 139 | $page = 'page=' . $array['content_alias']; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $id . $page . $rewrite_ext; |
164 | 164 | break; |
165 | 165 | |
166 | - case 'short': |
|
166 | + case 'short': |
|
167 | 167 | if($topic_name) { |
168 | 168 | $topic_name .= '/'; |
169 | 169 | } |
@@ -47,38 +47,38 @@ |
||
47 | 47 | $GLOBALS['xoopsTpl']->assign('showItem', $dirId > 0); |
48 | 48 | |
49 | 49 | switch ($op) { |
50 | - case 'show': |
|
51 | - case 'list': |
|
52 | - default: |
|
53 | - $crDirectories = new \CriteriaCompo(); |
|
54 | - if ($dirId > 0) { |
|
55 | - $crDirectories->add(new \Criteria('dir_id', $dirId)); |
|
56 | - } |
|
57 | - $directoriesCount = $directoriesHandler->getCount($crDirectories); |
|
58 | - $GLOBALS['xoopsTpl']->assign('directoriesCount', $directoriesCount); |
|
59 | - $crDirectories->setStart($start); |
|
60 | - $crDirectories->setLimit($limit); |
|
61 | - $directoriesAll = $directoriesHandler->getAll($crDirectories); |
|
62 | - if ($directoriesCount > 0) { |
|
63 | - $directories = []; |
|
64 | - // Get All Directories |
|
65 | - foreach (\array_keys($directoriesAll) as $i) { |
|
66 | - $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
|
67 | - $keywords[$i] = $directoriesAll[$i]->getVar('dir_name'); |
|
68 | - } |
|
69 | - $GLOBALS['xoopsTpl']->assign('directories', $directories); |
|
70 | - unset($directories); |
|
71 | - // Display Navigation |
|
72 | - if ($directoriesCount > $limit) { |
|
73 | - include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
75 | - $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | - } |
|
77 | - $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | - $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | - $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | - } |
|
81 | - break; |
|
50 | + case 'show': |
|
51 | + case 'list': |
|
52 | + default: |
|
53 | + $crDirectories = new \CriteriaCompo(); |
|
54 | + if ($dirId > 0) { |
|
55 | + $crDirectories->add(new \Criteria('dir_id', $dirId)); |
|
56 | + } |
|
57 | + $directoriesCount = $directoriesHandler->getCount($crDirectories); |
|
58 | + $GLOBALS['xoopsTpl']->assign('directoriesCount', $directoriesCount); |
|
59 | + $crDirectories->setStart($start); |
|
60 | + $crDirectories->setLimit($limit); |
|
61 | + $directoriesAll = $directoriesHandler->getAll($crDirectories); |
|
62 | + if ($directoriesCount > 0) { |
|
63 | + $directories = []; |
|
64 | + // Get All Directories |
|
65 | + foreach (\array_keys($directoriesAll) as $i) { |
|
66 | + $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
|
67 | + $keywords[$i] = $directoriesAll[$i]->getVar('dir_name'); |
|
68 | + } |
|
69 | + $GLOBALS['xoopsTpl']->assign('directories', $directories); |
|
70 | + unset($directories); |
|
71 | + // Display Navigation |
|
72 | + if ($directoriesCount > $limit) { |
|
73 | + include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
75 | + $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | + } |
|
77 | + $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | + $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | + $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | + } |
|
81 | + break; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | // Breadcrumbs |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
21 | 21 | */ |
22 | 22 | if (\count($xoBreadcrumbs) > 1) { |
23 | - $GLOBALS['xoopsTpl']->assign('xoBreadcrumbs', $xoBreadcrumbs); |
|
23 | + $GLOBALS['xoopsTpl']->assign('xoBreadcrumbs', $xoBreadcrumbs); |
|
24 | 24 | } |
25 | 25 | $GLOBALS['xoopsTpl']->assign('adv', $helper->getConfig('advertise')); |
26 | 26 | // |
@@ -47,38 +47,38 @@ |
||
47 | 47 | $GLOBALS['xoopsTpl']->assign('showItem', $repoId > 0); |
48 | 48 | |
49 | 49 | switch ($op) { |
50 | - case 'show': |
|
51 | - case 'list': |
|
52 | - default: |
|
53 | - $crRepositories = new \CriteriaCompo(); |
|
54 | - if ($repoId > 0) { |
|
55 | - $crRepositories->add(new \Criteria('repo_id', $repoId)); |
|
56 | - } |
|
57 | - $repositoriesCount = $repositoriesHandler->getCount($crRepositories); |
|
58 | - $GLOBALS['xoopsTpl']->assign('repositoriesCount', $repositoriesCount); |
|
59 | - $crRepositories->setStart($start); |
|
60 | - $crRepositories->setLimit($limit); |
|
61 | - $repositoriesAll = $repositoriesHandler->getAll($crRepositories); |
|
62 | - if ($repositoriesCount > 0) { |
|
63 | - $repositories = []; |
|
64 | - // Get All Repositories |
|
65 | - foreach (\array_keys($repositoriesAll) as $i) { |
|
66 | - $repositories[$i] = $repositoriesAll[$i]->getValuesRepositories(); |
|
67 | - $keywords[$i] = $repositoriesAll[$i]->getVar('repo_name'); |
|
68 | - } |
|
69 | - $GLOBALS['xoopsTpl']->assign('repositories', $repositories); |
|
70 | - unset($repositories); |
|
71 | - // Display Navigation |
|
72 | - if ($repositoriesCount > $limit) { |
|
73 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | - $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
75 | - $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | - } |
|
77 | - $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | - $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | - $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | - } |
|
81 | - break; |
|
50 | + case 'show': |
|
51 | + case 'list': |
|
52 | + default: |
|
53 | + $crRepositories = new \CriteriaCompo(); |
|
54 | + if ($repoId > 0) { |
|
55 | + $crRepositories->add(new \Criteria('repo_id', $repoId)); |
|
56 | + } |
|
57 | + $repositoriesCount = $repositoriesHandler->getCount($crRepositories); |
|
58 | + $GLOBALS['xoopsTpl']->assign('repositoriesCount', $repositoriesCount); |
|
59 | + $crRepositories->setStart($start); |
|
60 | + $crRepositories->setLimit($limit); |
|
61 | + $repositoriesAll = $repositoriesHandler->getAll($crRepositories); |
|
62 | + if ($repositoriesCount > 0) { |
|
63 | + $repositories = []; |
|
64 | + // Get All Repositories |
|
65 | + foreach (\array_keys($repositoriesAll) as $i) { |
|
66 | + $repositories[$i] = $repositoriesAll[$i]->getValuesRepositories(); |
|
67 | + $keywords[$i] = $repositoriesAll[$i]->getVar('repo_name'); |
|
68 | + } |
|
69 | + $GLOBALS['xoopsTpl']->assign('repositories', $repositories); |
|
70 | + unset($repositories); |
|
71 | + // Display Navigation |
|
72 | + if ($repositoriesCount > $limit) { |
|
73 | + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | + $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
75 | + $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | + } |
|
77 | + $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | + $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | + $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | + } |
|
81 | + break; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | // Breadcrumbs |
@@ -32,119 +32,119 @@ |
||
32 | 32 | */ |
33 | 33 | class Settings extends \XoopsObject |
34 | 34 | { |
35 | - /** |
|
36 | - * Constructor |
|
37 | - * |
|
38 | - * @param null |
|
39 | - */ |
|
40 | - public function __construct() |
|
41 | - { |
|
42 | - $this->initVar('set_id', XOBJ_DTYPE_INT); |
|
43 | - $this->initVar('set_username', XOBJ_DTYPE_TXTBOX); |
|
44 | - $this->initVar('set_token', XOBJ_DTYPE_TXTBOX); |
|
45 | - $this->initVar('set_options', XOBJ_DTYPE_TXTAREA); |
|
46 | - $this->initVar('set_primary', XOBJ_DTYPE_INT); |
|
47 | - $this->initVar('set_date', XOBJ_DTYPE_INT); |
|
48 | - $this->initVar('set_submitter', XOBJ_DTYPE_INT); |
|
49 | - } |
|
35 | + /** |
|
36 | + * Constructor |
|
37 | + * |
|
38 | + * @param null |
|
39 | + */ |
|
40 | + public function __construct() |
|
41 | + { |
|
42 | + $this->initVar('set_id', XOBJ_DTYPE_INT); |
|
43 | + $this->initVar('set_username', XOBJ_DTYPE_TXTBOX); |
|
44 | + $this->initVar('set_token', XOBJ_DTYPE_TXTBOX); |
|
45 | + $this->initVar('set_options', XOBJ_DTYPE_TXTAREA); |
|
46 | + $this->initVar('set_primary', XOBJ_DTYPE_INT); |
|
47 | + $this->initVar('set_date', XOBJ_DTYPE_INT); |
|
48 | + $this->initVar('set_submitter', XOBJ_DTYPE_INT); |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * @static function &getInstance |
|
53 | - * |
|
54 | - * @param null |
|
55 | - */ |
|
56 | - public static function getInstance() |
|
57 | - { |
|
58 | - static $instance = false; |
|
59 | - if (!$instance) { |
|
60 | - $instance = new self(); |
|
61 | - } |
|
62 | - } |
|
51 | + /** |
|
52 | + * @static function &getInstance |
|
53 | + * |
|
54 | + * @param null |
|
55 | + */ |
|
56 | + public static function getInstance() |
|
57 | + { |
|
58 | + static $instance = false; |
|
59 | + if (!$instance) { |
|
60 | + $instance = new self(); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * The new inserted $Id |
|
66 | - * @return inserted id |
|
67 | - */ |
|
68 | - public function getNewInsertedIdSettings() |
|
69 | - { |
|
70 | - $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
71 | - return $newInsertedId; |
|
72 | - } |
|
64 | + /** |
|
65 | + * The new inserted $Id |
|
66 | + * @return inserted id |
|
67 | + */ |
|
68 | + public function getNewInsertedIdSettings() |
|
69 | + { |
|
70 | + $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
71 | + return $newInsertedId; |
|
72 | + } |
|
73 | 73 | |
74 | - /** |
|
75 | - * @public function getForm |
|
76 | - * @param bool $action |
|
77 | - * @return \XoopsThemeForm |
|
78 | - */ |
|
79 | - public function getFormSettings($action = false) |
|
80 | - { |
|
81 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
82 | - if (!$action) { |
|
83 | - $action = $_SERVER['REQUEST_URI']; |
|
84 | - } |
|
85 | - $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()); |
|
86 | - // Title |
|
87 | - $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_SETTING_ADD) : \sprintf(_AM_WGGITHUB_SETTING_EDIT); |
|
88 | - // Get Theme Form |
|
89 | - \xoops_load('XoopsFormLoader'); |
|
90 | - $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
91 | - $form->setExtra('enctype="multipart/form-data"'); |
|
92 | - // Form Text setUsername |
|
93 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_USERNAME, 'set_username', 50, 255, $this->getVar('set_username')), true); |
|
94 | - // Form Text setToken |
|
95 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_TOKEN, 'set_token', 50, 255, $this->getVar('set_token')), true); |
|
96 | - // Form Editor TextArea setOptions |
|
97 | - $form->addElement(new \XoopsFormTextArea(_AM_WGGITHUB_SETTING_OPTIONS, 'set_options', $this->getVar('set_options', 'e'), 4, 47)); |
|
98 | - // Form Radio Yes/No setPrimary |
|
99 | - $setPrimary = $this->isNew() ?: $this->getVar('set_primary'); |
|
100 | - $form->addElement(new \XoopsFormRadioYN(_AM_WGGITHUB_SETTING_PRIMARY, 'set_primary', $setPrimary)); |
|
101 | - // Form Text Date Select setDate |
|
102 | - $setDate = $this->isNew() ?: $this->getVar('set_date'); |
|
103 | - $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_SETTING_DATE, 'set_date', '', $setDate)); |
|
104 | - // Form Select User setSubmitter |
|
105 | - $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_SETTING_SUBMITTER, 'set_submitter', false, $this->getVar('set_submitter'))); |
|
106 | - // To Save |
|
107 | - $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
108 | - $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
109 | - return $form; |
|
110 | - } |
|
74 | + /** |
|
75 | + * @public function getForm |
|
76 | + * @param bool $action |
|
77 | + * @return \XoopsThemeForm |
|
78 | + */ |
|
79 | + public function getFormSettings($action = false) |
|
80 | + { |
|
81 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
82 | + if (!$action) { |
|
83 | + $action = $_SERVER['REQUEST_URI']; |
|
84 | + } |
|
85 | + $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()); |
|
86 | + // Title |
|
87 | + $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_SETTING_ADD) : \sprintf(_AM_WGGITHUB_SETTING_EDIT); |
|
88 | + // Get Theme Form |
|
89 | + \xoops_load('XoopsFormLoader'); |
|
90 | + $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
91 | + $form->setExtra('enctype="multipart/form-data"'); |
|
92 | + // Form Text setUsername |
|
93 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_USERNAME, 'set_username', 50, 255, $this->getVar('set_username')), true); |
|
94 | + // Form Text setToken |
|
95 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_TOKEN, 'set_token', 50, 255, $this->getVar('set_token')), true); |
|
96 | + // Form Editor TextArea setOptions |
|
97 | + $form->addElement(new \XoopsFormTextArea(_AM_WGGITHUB_SETTING_OPTIONS, 'set_options', $this->getVar('set_options', 'e'), 4, 47)); |
|
98 | + // Form Radio Yes/No setPrimary |
|
99 | + $setPrimary = $this->isNew() ?: $this->getVar('set_primary'); |
|
100 | + $form->addElement(new \XoopsFormRadioYN(_AM_WGGITHUB_SETTING_PRIMARY, 'set_primary', $setPrimary)); |
|
101 | + // Form Text Date Select setDate |
|
102 | + $setDate = $this->isNew() ?: $this->getVar('set_date'); |
|
103 | + $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_SETTING_DATE, 'set_date', '', $setDate)); |
|
104 | + // Form Select User setSubmitter |
|
105 | + $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_SETTING_SUBMITTER, 'set_submitter', false, $this->getVar('set_submitter'))); |
|
106 | + // To Save |
|
107 | + $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
108 | + $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
109 | + return $form; |
|
110 | + } |
|
111 | 111 | |
112 | - /** |
|
113 | - * Get Values |
|
114 | - * @param null $keys |
|
115 | - * @param null $format |
|
116 | - * @param null $maxDepth |
|
117 | - * @return array |
|
118 | - */ |
|
119 | - public function getValuesSettings($keys = null, $format = null, $maxDepth = null) |
|
120 | - { |
|
121 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
122 | - $utility = new \XoopsModules\Wggithub\Utility(); |
|
123 | - $ret = $this->getValues($keys, $format, $maxDepth); |
|
124 | - $ret['id'] = $this->getVar('set_id'); |
|
125 | - $ret['username'] = $this->getVar('set_username'); |
|
126 | - $ret['token'] = $this->getVar('set_token'); |
|
127 | - $ret['options'] = \strip_tags($this->getVar('set_options', 'e')); |
|
128 | - $editorMaxchar = $helper->getConfig('editor_maxchar'); |
|
129 | - $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
|
130 | - $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO; |
|
131 | - $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's'); |
|
132 | - $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter')); |
|
133 | - return $ret; |
|
134 | - } |
|
112 | + /** |
|
113 | + * Get Values |
|
114 | + * @param null $keys |
|
115 | + * @param null $format |
|
116 | + * @param null $maxDepth |
|
117 | + * @return array |
|
118 | + */ |
|
119 | + public function getValuesSettings($keys = null, $format = null, $maxDepth = null) |
|
120 | + { |
|
121 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
122 | + $utility = new \XoopsModules\Wggithub\Utility(); |
|
123 | + $ret = $this->getValues($keys, $format, $maxDepth); |
|
124 | + $ret['id'] = $this->getVar('set_id'); |
|
125 | + $ret['username'] = $this->getVar('set_username'); |
|
126 | + $ret['token'] = $this->getVar('set_token'); |
|
127 | + $ret['options'] = \strip_tags($this->getVar('set_options', 'e')); |
|
128 | + $editorMaxchar = $helper->getConfig('editor_maxchar'); |
|
129 | + $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
|
130 | + $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO; |
|
131 | + $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's'); |
|
132 | + $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter')); |
|
133 | + return $ret; |
|
134 | + } |
|
135 | 135 | |
136 | - /** |
|
137 | - * Returns an array representation of the object |
|
138 | - * |
|
139 | - * @return array |
|
140 | - */ |
|
141 | - public function toArraySettings() |
|
142 | - { |
|
143 | - $ret = []; |
|
144 | - $vars = $this->getVars(); |
|
145 | - foreach (\array_keys($vars) as $var) { |
|
146 | - $ret[$var] = $this->getVar('"{$var}"'); |
|
147 | - } |
|
148 | - return $ret; |
|
149 | - } |
|
136 | + /** |
|
137 | + * Returns an array representation of the object |
|
138 | + * |
|
139 | + * @return array |
|
140 | + */ |
|
141 | + public function toArraySettings() |
|
142 | + { |
|
143 | + $ret = []; |
|
144 | + $vars = $this->getVars(); |
|
145 | + foreach (\array_keys($vars) as $var) { |
|
146 | + $ret[$var] = $this->getVar('"{$var}"'); |
|
147 | + } |
|
148 | + return $ret; |
|
149 | + } |
|
150 | 150 | } |
@@ -65,8 +65,8 @@ |
||
65 | 65 | |
66 | 66 | if ($width > $this->maxWidth || $height > $this->maxHeight) { |
67 | 67 | // recalc image size based on this->maxWidth/this->maxHeight |
68 | - $new_width = 0; |
|
69 | - $new_height = 0; |
|
68 | + $new_width = 0; |
|
69 | + $new_height = 0; |
|
70 | 70 | if ($width > $height) { |
71 | 71 | if ($width < $this->maxWidth) { |
72 | 72 | $new_width = $width; |
@@ -1991,8 +1991,8 @@ |
||
1991 | 1991 | 'q', 'rt', 'ins', 'font', 'strong', |
1992 | 1992 | 's', 'tt', 'kbd', 'mark', |
1993 | 1993 | 'u', 'xm', 'sub', 'nobr', |
1994 | - 'sup', 'ruby', |
|
1995 | - 'var', 'span', |
|
1996 | - 'wbr', 'time', |
|
1994 | + 'sup', 'ruby', |
|
1995 | + 'var', 'span', |
|
1996 | + 'wbr', 'time', |
|
1997 | 1997 | ); |
1998 | 1998 | } |
@@ -31,96 +31,96 @@ |
||
31 | 31 | */ |
32 | 32 | class ReleasesHandler extends \XoopsPersistableObjectHandler |
33 | 33 | { |
34 | - /** |
|
35 | - * Constructor |
|
36 | - * |
|
37 | - * @param \XoopsDatabase $db |
|
38 | - */ |
|
39 | - public function __construct(\XoopsDatabase $db) |
|
40 | - { |
|
41 | - parent::__construct($db, 'wggithub_releases', Releases::class, 'rel_id', 'rel_name'); |
|
42 | - } |
|
34 | + /** |
|
35 | + * Constructor |
|
36 | + * |
|
37 | + * @param \XoopsDatabase $db |
|
38 | + */ |
|
39 | + public function __construct(\XoopsDatabase $db) |
|
40 | + { |
|
41 | + parent::__construct($db, 'wggithub_releases', Releases::class, 'rel_id', 'rel_name'); |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @param bool $isNew |
|
46 | - * |
|
47 | - * @return object |
|
48 | - */ |
|
49 | - public function create($isNew = true) |
|
50 | - { |
|
51 | - return parent::create($isNew); |
|
52 | - } |
|
44 | + /** |
|
45 | + * @param bool $isNew |
|
46 | + * |
|
47 | + * @return object |
|
48 | + */ |
|
49 | + public function create($isNew = true) |
|
50 | + { |
|
51 | + return parent::create($isNew); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * retrieve a field |
|
56 | - * |
|
57 | - * @param int $i field id |
|
58 | - * @param null fields |
|
59 | - * @return mixed reference to the {@link Get} object |
|
60 | - */ |
|
61 | - public function get($i = null, $fields = null) |
|
62 | - { |
|
63 | - return parent::get($i, $fields); |
|
64 | - } |
|
54 | + /** |
|
55 | + * retrieve a field |
|
56 | + * |
|
57 | + * @param int $i field id |
|
58 | + * @param null fields |
|
59 | + * @return mixed reference to the {@link Get} object |
|
60 | + */ |
|
61 | + public function get($i = null, $fields = null) |
|
62 | + { |
|
63 | + return parent::get($i, $fields); |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * get inserted id |
|
68 | - * |
|
69 | - * @param null |
|
70 | - * @return int reference to the {@link Get} object |
|
71 | - */ |
|
72 | - public function getInsertId() |
|
73 | - { |
|
74 | - return $this->db->getInsertId(); |
|
75 | - } |
|
66 | + /** |
|
67 | + * get inserted id |
|
68 | + * |
|
69 | + * @param null |
|
70 | + * @return int reference to the {@link Get} object |
|
71 | + */ |
|
72 | + public function getInsertId() |
|
73 | + { |
|
74 | + return $this->db->getInsertId(); |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * Get Count Releases in the database |
|
79 | - * @param int $start |
|
80 | - * @param int $limit |
|
81 | - * @param string $sort |
|
82 | - * @param string $order |
|
83 | - * @return int |
|
84 | - */ |
|
85 | - public function getCountReleases($start = 0, $limit = 0, $sort = 'rel_id ASC, rel_name', $order = 'ASC') |
|
86 | - { |
|
87 | - $crCountReleases = new \CriteriaCompo(); |
|
88 | - $crCountReleases = $this->getReleasesCriteria($crCountReleases, $start, $limit, $sort, $order); |
|
89 | - return $this->getCount($crCountReleases); |
|
90 | - } |
|
77 | + /** |
|
78 | + * Get Count Releases in the database |
|
79 | + * @param int $start |
|
80 | + * @param int $limit |
|
81 | + * @param string $sort |
|
82 | + * @param string $order |
|
83 | + * @return int |
|
84 | + */ |
|
85 | + public function getCountReleases($start = 0, $limit = 0, $sort = 'rel_id ASC, rel_name', $order = 'ASC') |
|
86 | + { |
|
87 | + $crCountReleases = new \CriteriaCompo(); |
|
88 | + $crCountReleases = $this->getReleasesCriteria($crCountReleases, $start, $limit, $sort, $order); |
|
89 | + return $this->getCount($crCountReleases); |
|
90 | + } |
|
91 | 91 | |
92 | - /** |
|
93 | - * Get All Releases in the database |
|
94 | - * @param int $start |
|
95 | - * @param int $limit |
|
96 | - * @param string $sort |
|
97 | - * @param string $order |
|
98 | - * @return array |
|
99 | - */ |
|
100 | - public function getAllReleases($start = 0, $limit = 0, $sort = 'rel_id ASC, rel_name', $order = 'ASC') |
|
101 | - { |
|
102 | - $crAllReleases = new \CriteriaCompo(); |
|
103 | - $crAllReleases = $this->getReleasesCriteria($crAllReleases, $start, $limit, $sort, $order); |
|
104 | - return $this->getAll($crAllReleases); |
|
105 | - } |
|
92 | + /** |
|
93 | + * Get All Releases in the database |
|
94 | + * @param int $start |
|
95 | + * @param int $limit |
|
96 | + * @param string $sort |
|
97 | + * @param string $order |
|
98 | + * @return array |
|
99 | + */ |
|
100 | + public function getAllReleases($start = 0, $limit = 0, $sort = 'rel_id ASC, rel_name', $order = 'ASC') |
|
101 | + { |
|
102 | + $crAllReleases = new \CriteriaCompo(); |
|
103 | + $crAllReleases = $this->getReleasesCriteria($crAllReleases, $start, $limit, $sort, $order); |
|
104 | + return $this->getAll($crAllReleases); |
|
105 | + } |
|
106 | 106 | |
107 | - /** |
|
108 | - * Get Criteria Releases |
|
109 | - * @param $crReleases |
|
110 | - * @param int $start |
|
111 | - * @param int $limit |
|
112 | - * @param string $sort |
|
113 | - * @param string $order |
|
114 | - * @return int |
|
115 | - */ |
|
116 | - private function getReleasesCriteria($crReleases, $start, $limit, $sort, $order) |
|
117 | - { |
|
118 | - $crReleases->setStart($start); |
|
119 | - $crReleases->setLimit($limit); |
|
120 | - $crReleases->setSort($sort); |
|
121 | - $crReleases->setOrder($order); |
|
122 | - return $crReleases; |
|
123 | - } |
|
107 | + /** |
|
108 | + * Get Criteria Releases |
|
109 | + * @param $crReleases |
|
110 | + * @param int $start |
|
111 | + * @param int $limit |
|
112 | + * @param string $sort |
|
113 | + * @param string $order |
|
114 | + * @return int |
|
115 | + */ |
|
116 | + private function getReleasesCriteria($crReleases, $start, $limit, $sort, $order) |
|
117 | + { |
|
118 | + $crReleases->setStart($start); |
|
119 | + $crReleases->setLimit($limit); |
|
120 | + $crReleases->setSort($sort); |
|
121 | + $crReleases->setOrder($order); |
|
122 | + return $crReleases; |
|
123 | + } |
|
124 | 124 | |
125 | 125 | /** |
126 | 126 | * Update table requests |
@@ -32,135 +32,135 @@ |
||
32 | 32 | */ |
33 | 33 | class Releases extends \XoopsObject |
34 | 34 | { |
35 | - /** |
|
36 | - * Constructor |
|
37 | - * |
|
38 | - * @param null |
|
39 | - */ |
|
40 | - public function __construct() |
|
41 | - { |
|
42 | - $this->initVar('rel_id', XOBJ_DTYPE_INT); |
|
35 | + /** |
|
36 | + * Constructor |
|
37 | + * |
|
38 | + * @param null |
|
39 | + */ |
|
40 | + public function __construct() |
|
41 | + { |
|
42 | + $this->initVar('rel_id', XOBJ_DTYPE_INT); |
|
43 | 43 | $this->initVar('rel_repoid', XOBJ_DTYPE_INT); |
44 | - $this->initVar('rel_type', XOBJ_DTYPE_INT); |
|
45 | - $this->initVar('rel_name', XOBJ_DTYPE_TXTBOX); |
|
46 | - $this->initVar('rel_prerelease', XOBJ_DTYPE_INT); |
|
44 | + $this->initVar('rel_type', XOBJ_DTYPE_INT); |
|
45 | + $this->initVar('rel_name', XOBJ_DTYPE_TXTBOX); |
|
46 | + $this->initVar('rel_prerelease', XOBJ_DTYPE_INT); |
|
47 | 47 | $this->initVar('rel_publishedat', XOBJ_DTYPE_INT); |
48 | - $this->initVar('rel_tarballurl', XOBJ_DTYPE_TXTBOX); |
|
49 | - $this->initVar('rel_zipballurl', XOBJ_DTYPE_TXTBOX); |
|
50 | - $this->initVar('rel_datecreated', XOBJ_DTYPE_INT); |
|
51 | - $this->initVar('rel_submitter', XOBJ_DTYPE_INT); |
|
52 | - } |
|
48 | + $this->initVar('rel_tarballurl', XOBJ_DTYPE_TXTBOX); |
|
49 | + $this->initVar('rel_zipballurl', XOBJ_DTYPE_TXTBOX); |
|
50 | + $this->initVar('rel_datecreated', XOBJ_DTYPE_INT); |
|
51 | + $this->initVar('rel_submitter', XOBJ_DTYPE_INT); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * @static function &getInstance |
|
56 | - * |
|
57 | - * @param null |
|
58 | - */ |
|
59 | - public static function getInstance() |
|
60 | - { |
|
61 | - static $instance = false; |
|
62 | - if (!$instance) { |
|
63 | - $instance = new self(); |
|
64 | - } |
|
65 | - } |
|
54 | + /** |
|
55 | + * @static function &getInstance |
|
56 | + * |
|
57 | + * @param null |
|
58 | + */ |
|
59 | + public static function getInstance() |
|
60 | + { |
|
61 | + static $instance = false; |
|
62 | + if (!$instance) { |
|
63 | + $instance = new self(); |
|
64 | + } |
|
65 | + } |
|
66 | 66 | |
67 | - /** |
|
68 | - * The new inserted $Id |
|
69 | - * @return inserted id |
|
70 | - */ |
|
71 | - public function getNewInsertedIdReleases() |
|
72 | - { |
|
73 | - $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
74 | - return $newInsertedId; |
|
75 | - } |
|
67 | + /** |
|
68 | + * The new inserted $Id |
|
69 | + * @return inserted id |
|
70 | + */ |
|
71 | + public function getNewInsertedIdReleases() |
|
72 | + { |
|
73 | + $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
74 | + return $newInsertedId; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * @public function getForm |
|
79 | - * @param bool $action |
|
80 | - * @return \XoopsThemeForm |
|
81 | - */ |
|
82 | - public function getFormReleases($action = false) |
|
83 | - { |
|
84 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
85 | - if (!$action) { |
|
86 | - $action = $_SERVER['REQUEST_URI']; |
|
87 | - } |
|
88 | - // Title |
|
89 | - $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_RELEASE_ADD) : \sprintf(_AM_WGGITHUB_RELEASE_EDIT); |
|
90 | - // Get Theme Form |
|
91 | - \xoops_load('XoopsFormLoader'); |
|
92 | - $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
93 | - $form->setExtra('enctype="multipart/form-data"'); |
|
77 | + /** |
|
78 | + * @public function getForm |
|
79 | + * @param bool $action |
|
80 | + * @return \XoopsThemeForm |
|
81 | + */ |
|
82 | + public function getFormReleases($action = false) |
|
83 | + { |
|
84 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
85 | + if (!$action) { |
|
86 | + $action = $_SERVER['REQUEST_URI']; |
|
87 | + } |
|
88 | + // Title |
|
89 | + $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_RELEASE_ADD) : \sprintf(_AM_WGGITHUB_RELEASE_EDIT); |
|
90 | + // Get Theme Form |
|
91 | + \xoops_load('XoopsFormLoader'); |
|
92 | + $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
93 | + $form->setExtra('enctype="multipart/form-data"'); |
|
94 | 94 | // Form Table repositories |
95 | 95 | $repositoriesHandler = $helper->getHandler('Repositories'); |
96 | 96 | $rmRepoidSelect = new \XoopsFormSelect(_AM_WGGITHUB_README_REPOID, 'rel_repoid', $this->getVar('rel_repoid')); |
97 | 97 | $rmRepoidSelect->addOptionArray($repositoriesHandler->getList()); |
98 | 98 | $form->addElement($rmRepoidSelect); |
99 | - // Form Select relType |
|
100 | - $relTypeSelect = new \XoopsFormSelect(_AM_WGGITHUB_RELEASE_TYPE, 'rel_type', $this->getVar('rel_type')); |
|
101 | - $relTypeSelect->addOption('file'); |
|
102 | - $form->addElement($relTypeSelect); |
|
103 | - // Form Text relName |
|
104 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_NAME, 'rel_name', 50, 255, $this->getVar('rel_name')), true); |
|
99 | + // Form Select relType |
|
100 | + $relTypeSelect = new \XoopsFormSelect(_AM_WGGITHUB_RELEASE_TYPE, 'rel_type', $this->getVar('rel_type')); |
|
101 | + $relTypeSelect->addOption('file'); |
|
102 | + $form->addElement($relTypeSelect); |
|
103 | + // Form Text relName |
|
104 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_NAME, 'rel_name', 50, 255, $this->getVar('rel_name')), true); |
|
105 | 105 | // Form Radio Yes/No relPrerelease |
106 | 106 | $relPrerelease = $this->isNew() ?: $this->getVar('rel_prerelease'); |
107 | 107 | $form->addElement(new \XoopsFormRadioYN(_AM_WGGITHUB_RELEASE_PRERELEASE, 'rel_prerelease', $relPrerelease)); |
108 | - // Form Text Date Select relPublishedat |
|
109 | - $relPublishedat = $this->isNew() ?: $this->getVar('rel_publishedat'); |
|
110 | - $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_RELEASE_PUBLISHEDAT, 'rel_publishedat', '', $relPublishedat)); |
|
111 | - // Form Text relTarballurl |
|
112 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_TARBALLURL, 'rel_tarballurl', 50, 255, $this->getVar('rel_tarballurl'))); |
|
113 | - // Form Text relZipballurl |
|
114 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_ZIPBALLURL, 'rel_zipballurl', 50, 255, $this->getVar('rel_zipballurl'))); |
|
115 | - // Form Text Date Select relDatecreated |
|
116 | - $relDatecreated = $this->isNew() ?: $this->getVar('rel_datecreated'); |
|
117 | - $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_RELEASE_DATECREATED, 'rel_datecreated', '', $relDatecreated)); |
|
118 | - // Form Select User relSubmitter |
|
119 | - $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_RELEASE_SUBMITTER, 'rel_submitter', false, $this->getVar('rel_submitter'))); |
|
120 | - // To Save |
|
121 | - $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
122 | - $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
123 | - return $form; |
|
124 | - } |
|
108 | + // Form Text Date Select relPublishedat |
|
109 | + $relPublishedat = $this->isNew() ?: $this->getVar('rel_publishedat'); |
|
110 | + $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_RELEASE_PUBLISHEDAT, 'rel_publishedat', '', $relPublishedat)); |
|
111 | + // Form Text relTarballurl |
|
112 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_TARBALLURL, 'rel_tarballurl', 50, 255, $this->getVar('rel_tarballurl'))); |
|
113 | + // Form Text relZipballurl |
|
114 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_RELEASE_ZIPBALLURL, 'rel_zipballurl', 50, 255, $this->getVar('rel_zipballurl'))); |
|
115 | + // Form Text Date Select relDatecreated |
|
116 | + $relDatecreated = $this->isNew() ?: $this->getVar('rel_datecreated'); |
|
117 | + $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_RELEASE_DATECREATED, 'rel_datecreated', '', $relDatecreated)); |
|
118 | + // Form Select User relSubmitter |
|
119 | + $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_RELEASE_SUBMITTER, 'rel_submitter', false, $this->getVar('rel_submitter'))); |
|
120 | + // To Save |
|
121 | + $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
122 | + $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
123 | + return $form; |
|
124 | + } |
|
125 | 125 | |
126 | - /** |
|
127 | - * Get Values |
|
128 | - * @param null $keys |
|
129 | - * @param null $format |
|
130 | - * @param null $maxDepth |
|
131 | - * @return array |
|
132 | - */ |
|
133 | - public function getValuesReleases($keys = null, $format = null, $maxDepth = null) |
|
134 | - { |
|
126 | + /** |
|
127 | + * Get Values |
|
128 | + * @param null $keys |
|
129 | + * @param null $format |
|
130 | + * @param null $maxDepth |
|
131 | + * @return array |
|
132 | + */ |
|
133 | + public function getValuesReleases($keys = null, $format = null, $maxDepth = null) |
|
134 | + { |
|
135 | 135 | $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
136 | - $ret = $this->getValues($keys, $format, $maxDepth); |
|
137 | - $ret['id'] = $this->getVar('rel_id'); |
|
136 | + $ret = $this->getValues($keys, $format, $maxDepth); |
|
137 | + $ret['id'] = $this->getVar('rel_id'); |
|
138 | 138 | $repositoriesHandler = $helper->getHandler('Repositories'); |
139 | 139 | $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid')); |
140 | 140 | $ret['repoid'] = $repositoriesObj->getVar('repo_name'); |
141 | - $ret['type'] = $this->getVar('rel_type'); |
|
142 | - $ret['name'] = $this->getVar('rel_name'); |
|
141 | + $ret['type'] = $this->getVar('rel_type'); |
|
142 | + $ret['name'] = $this->getVar('rel_name'); |
|
143 | 143 | $ret['prerelease'] = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
144 | - $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm'); |
|
145 | - $ret['tarballurl'] = $this->getVar('rel_tarballurl'); |
|
146 | - $ret['zipballurl'] = $this->getVar('rel_zipballurl'); |
|
147 | - $ret['datecreated'] = \formatTimestamp($this->getVar('rel_datecreated'), 'm'); |
|
148 | - $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('rel_submitter')); |
|
149 | - return $ret; |
|
150 | - } |
|
144 | + $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm'); |
|
145 | + $ret['tarballurl'] = $this->getVar('rel_tarballurl'); |
|
146 | + $ret['zipballurl'] = $this->getVar('rel_zipballurl'); |
|
147 | + $ret['datecreated'] = \formatTimestamp($this->getVar('rel_datecreated'), 'm'); |
|
148 | + $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('rel_submitter')); |
|
149 | + return $ret; |
|
150 | + } |
|
151 | 151 | |
152 | - /** |
|
153 | - * Returns an array representation of the object |
|
154 | - * |
|
155 | - * @return array |
|
156 | - */ |
|
157 | - public function toArrayReleases() |
|
158 | - { |
|
159 | - $ret = []; |
|
160 | - $vars = $this->getVars(); |
|
161 | - foreach (\array_keys($vars) as $var) { |
|
162 | - $ret[$var] = $this->getVar('"{$var}"'); |
|
163 | - } |
|
164 | - return $ret; |
|
165 | - } |
|
152 | + /** |
|
153 | + * Returns an array representation of the object |
|
154 | + * |
|
155 | + * @return array |
|
156 | + */ |
|
157 | + public function toArrayReleases() |
|
158 | + { |
|
159 | + $ret = []; |
|
160 | + $vars = $this->getVars(); |
|
161 | + foreach (\array_keys($vars) as $var) { |
|
162 | + $ret[$var] = $this->getVar('"{$var}"'); |
|
163 | + } |
|
164 | + return $ret; |
|
165 | + } |
|
166 | 166 | } |