@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $this->jsFolderUrl = ''; |
201 | 201 | $this->additionnalPagerParameters = array(); |
202 | 202 | $this->additionnalClearButtonParameters = array(); |
203 | - $this->sortFields = array(); // Les champs qui peuvent être utilisés pour trier |
|
203 | + $this->sortFields = array(); // Les champs qui peuvent être utilisés pour trier |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | private function getSortPlaceHolderNames() |
259 | 259 | { |
260 | - return array(self::PREFIX . 'sortFields', self::PREFIX . 'sortOrder'); |
|
260 | + return array(self::PREFIX.'sortFields', self::PREFIX.'sortOrder'); |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $sortFieldsHtml = references_utils::htmlSelect($sortNames[0], $this->sortFields, $this->sortField, false); |
272 | 272 | $sortOrderHtml = references_utils::htmlSelect($sortNames[1], array('asc' => _MD_REFERENCES_ASC, 'desc' => _MD_REFERENCES_DESC), $this->sortOrder, false); |
273 | 273 | |
274 | - return _MD_REFERENCES_SORT_BY . ' ' . $sortFieldsHtml . ' ' . $sortOrderHtml; |
|
274 | + return _MD_REFERENCES_SORT_BY.' '.$sortFieldsHtml.' '.$sortOrderHtml; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | private function getArrayValue($array, $index, $defaultValue = false) |
310 | 310 | { |
311 | 311 | if ($index === 'autoComplete' && isset($array[$index]) && isset($array[$index]) == true) { |
312 | - $this->hasAutoComplete = true; // On en profite pour vérifier si un champ utilise l'autocomplétion |
|
312 | + $this->hasAutoComplete = true; // On en profite pour vérifier si un champ utilise l'autocomplétion |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | return isset($array[$index]) ? $array[$index] : $defaultValue; |
@@ -333,14 +333,14 @@ discard block |
||
333 | 333 | if (isset($this->vars[$fieldName])) { // On vérifie que le champ demandé est bien en autocomplétion |
334 | 334 | if ($this->vars[$fieldName]['autoComplete'] == true) { |
335 | 335 | if ($this->vars[$fieldName]['dataType'] == self::FILTER_DATA_TEXT) { |
336 | - $criteria = new Criteria($fieldName, $query . '%', 'LIKE'); |
|
336 | + $criteria = new Criteria($fieldName, $query.'%', 'LIKE'); |
|
337 | 337 | } |
338 | - $criteria->setLimit((int)$limit); |
|
338 | + $criteria->setLimit((int) $limit); |
|
339 | 339 | $ret = $this->handler->getObjects($criteria); |
340 | 340 | |
341 | 341 | if (count($ret) > 0) { |
342 | 342 | foreach ($ret as $object) { |
343 | - $return .= $object->getVar($fieldName, 'n') . "\n"; |
|
343 | + $return .= $object->getVar($fieldName, 'n')."\n"; |
|
344 | 344 | } |
345 | 345 | } |
346 | 346 | } |
@@ -362,23 +362,23 @@ discard block |
||
362 | 362 | return $return; |
363 | 363 | } |
364 | 364 | $return = ''; |
365 | - $return .= "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" title=\"Style sheet\" href=\"" . $this->jsFolderUrl . "autocomplete/jquery.autocomplete.css\" />\n"; |
|
365 | + $return .= "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" title=\"Style sheet\" href=\"".$this->jsFolderUrl."autocomplete/jquery.autocomplete.css\" />\n"; |
|
366 | 366 | if (!$jqueryAlreadyLoaded) { |
367 | - $return .= "<script type=\"text/javascript\" src=\"" . $this->jsFolderUrl . "jquery/jquery.js\"></script>\n"; |
|
367 | + $return .= "<script type=\"text/javascript\" src=\"".$this->jsFolderUrl."jquery/jquery.js\"></script>\n"; |
|
368 | 368 | } |
369 | - $return .= "<script type=\"text/javascript\" src=\"" . $this->jsFolderUrl . "noconflict.js\"></script>\n"; |
|
370 | - $return .= "<script type=\"text/javascript\" src=\"" . $this->jsFolderUrl . "autocomplete/jquery.autocomplete.min.js\"></script>\n"; |
|
369 | + $return .= "<script type=\"text/javascript\" src=\"".$this->jsFolderUrl."noconflict.js\"></script>\n"; |
|
370 | + $return .= "<script type=\"text/javascript\" src=\"".$this->jsFolderUrl."autocomplete/jquery.autocomplete.min.js\"></script>\n"; |
|
371 | 371 | $return .= "<script type=\"text/javascript\">\n"; |
372 | 372 | $return .= "jQuery(function($) {\n"; |
373 | - $return .= "var url='" . $this->baseUrl . "';\n"; // TODO: Supprimer "var" car cela limite sa portée ! |
|
374 | - $return .= "var handlerName='" . $this->handler->className . "';\n"; |
|
373 | + $return .= "var url='".$this->baseUrl."';\n"; // TODO: Supprimer "var" car cela limite sa portée ! |
|
374 | + $return .= "var handlerName='".$this->handler->className."';\n"; |
|
375 | 375 | |
376 | 376 | foreach ($this->vars as $fieldName => $parameters) { |
377 | 377 | if ($parameters['autoComplete'] == true) { |
378 | - $field = self::PREFIX . $fieldName; |
|
379 | - $return .= "$('#" . $field . "').autocomplete(url, {\n"; |
|
378 | + $field = self::PREFIX.$fieldName; |
|
379 | + $return .= "$('#".$field."').autocomplete(url, {\n"; |
|
380 | 380 | $return .= "extraParams: {\n"; |
381 | - $return .= " field: '" . $fieldName . "',\n"; |
|
381 | + $return .= " field: '".$fieldName."',\n"; |
|
382 | 382 | $return .= " op: 'autocomplete',\n"; |
383 | 383 | $return .= " handler: handlerName\n"; |
384 | 384 | $return .= "}\n"; |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | */ |
432 | 432 | private function getSessionName() |
433 | 433 | { |
434 | - return self::MODULE_NAME . '_' . $this->handler->table; |
|
434 | + return self::MODULE_NAME.'_'.$this->handler->table; |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | */ |
442 | 442 | private function getStartSessionName() |
443 | 443 | { |
444 | - return $this->getSessionName() . '_start'; |
|
444 | + return $this->getSessionName().'_start'; |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | /** |
@@ -533,11 +533,11 @@ discard block |
||
533 | 533 | $sortField = $_REQUEST[$orderFieldsNames[0]]; |
534 | 534 | $sortOrder = $_REQUEST[$orderFieldsNames[1]]; |
535 | 535 | } else { |
536 | - if (isset($_SESSION[$cookieName . '_sortField'])) { |
|
537 | - $sortField = $_SESSION[$cookieName . '_sortField']; |
|
536 | + if (isset($_SESSION[$cookieName.'_sortField'])) { |
|
537 | + $sortField = $_SESSION[$cookieName.'_sortField']; |
|
538 | 538 | } |
539 | - if (isset($_SESSION[$cookieName . '_sortOrder'])) { |
|
540 | - $sortOrder = $_SESSION[$cookieName . '_sortOrder']; |
|
539 | + if (isset($_SESSION[$cookieName.'_sortOrder'])) { |
|
540 | + $sortOrder = $_SESSION[$cookieName.'_sortOrder']; |
|
541 | 541 | } |
542 | 542 | } |
543 | 543 | |
@@ -546,8 +546,8 @@ discard block |
||
546 | 546 | $this->sortOrder = $sortOrder; |
547 | 547 | } |
548 | 548 | if (trim($sortField) != '' && trim($sortOrder) != '') { |
549 | - $_SESSION[$cookieName . '_sortField'] = $sortField; |
|
550 | - $_SESSION[$cookieName . '_sortOrder'] = $sortOrder; |
|
549 | + $_SESSION[$cookieName.'_sortField'] = $sortField; |
|
550 | + $_SESSION[$cookieName.'_sortOrder'] = $sortOrder; |
|
551 | 551 | } |
552 | 552 | } |
553 | 553 | |
@@ -596,19 +596,19 @@ discard block |
||
596 | 596 | */ |
597 | 597 | public function filter() |
598 | 598 | { |
599 | - $this->setupFilter(); // Réinitialisations |
|
599 | + $this->setupFilter(); // Réinitialisations |
|
600 | 600 | $ts = MyTextSanitizer::getInstance(); |
601 | - $this->setSortFieldsFromRequest(); // On récupère la zone de tri éventuellement passée dans la requête |
|
601 | + $this->setSortFieldsFromRequest(); // On récupère la zone de tri éventuellement passée dans la requête |
|
602 | 602 | $this->isSetCleanFilter(); |
603 | 603 | |
604 | 604 | foreach ($this->vars as $fieldName => $fieldProperties) { |
605 | 605 | // On commence par récupérer toutes les valeurs |
606 | - $formFieldName = self::PREFIX . $fieldName; // "filter_website_id" par exemple |
|
607 | - $fieldProperties['data'] = null; // Valeur par défaut |
|
606 | + $formFieldName = self::PREFIX.$fieldName; // "filter_website_id" par exemple |
|
607 | + $fieldProperties['data'] = null; // Valeur par défaut |
|
608 | 608 | if (isset($_REQUEST[$formFieldName])) { |
609 | 609 | if ($fieldProperties['dataType'] == self::FILTER_DATA_NUMERIC) { // Zone numérique |
610 | - if ((int)$_REQUEST[$formFieldName] != 0) { |
|
611 | - $fieldProperties['data'] = (int)$_REQUEST[$formFieldName]; |
|
610 | + if ((int) $_REQUEST[$formFieldName] != 0) { |
|
611 | + $fieldProperties['data'] = (int) $_REQUEST[$formFieldName]; |
|
612 | 612 | if (!$fieldProperties['minusOne']) { |
613 | 613 | $this->criteria->add(new Criteria($fieldName, $fieldProperties['data'], $fieldProperties['operator'])); |
614 | 614 | } else { |
@@ -620,9 +620,9 @@ discard block |
||
620 | 620 | if (trim($_REQUEST[$formFieldName]) != '') { |
621 | 621 | $fieldProperties['data'] = $_REQUEST[$formFieldName]; |
622 | 622 | if (!REFERENCES_EXACT_SEARCH) { |
623 | - $this->criteria->add(new Criteria($fieldName, '%' . $ts->addSlashes($fieldProperties['data']) . '%', 'LIKE')); |
|
623 | + $this->criteria->add(new Criteria($fieldName, '%'.$ts->addSlashes($fieldProperties['data']).'%', 'LIKE')); |
|
624 | 624 | } else { |
625 | - $this->criteria->add(new Criteria($fieldName, $ts->addSlashes($fieldProperties['data']) . '%', 'LIKE')); |
|
625 | + $this->criteria->add(new Criteria($fieldName, $ts->addSlashes($fieldProperties['data']).'%', 'LIKE')); |
|
626 | 626 | } |
627 | 627 | $this->newFilter = true; |
628 | 628 | } |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | { |
687 | 687 | if ($this->keepStart) { |
688 | 688 | $startSessionName = $this->getStartSessionName(); |
689 | - $_SESSION[$startSessionName] = (int)$start; |
|
689 | + $_SESSION[$startSessionName] = (int) $start; |
|
690 | 690 | } |
691 | 691 | } |
692 | 692 | |
@@ -699,11 +699,11 @@ discard block |
||
699 | 699 | { |
700 | 700 | $start = 0; |
701 | 701 | if (isset($_REQUEST[$this->startName])) { |
702 | - $start = (int)$_REQUEST[$this->startName]; |
|
702 | + $start = (int) $_REQUEST[$this->startName]; |
|
703 | 703 | } elseif ($this->keepStart) { |
704 | 704 | $startSessionName = $this->getStartSessionName(); |
705 | 705 | if (isset($_SESSION[$startSessionName])) { |
706 | - $start = (int)$_SESSION[$startSessionName]; |
|
706 | + $start = (int) $_SESSION[$startSessionName]; |
|
707 | 707 | } |
708 | 708 | } |
709 | 709 | // Mise en session |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | if (!$this->isInitialized) { |
770 | 770 | $this->filter(); |
771 | 771 | } |
772 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
772 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
773 | 773 | $itemsCount = $this->getCount(); |
774 | 774 | $queryString = array(); |
775 | 775 | if (trim($this->op) != '') { |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | |
780 | 780 | if ($itemsCount > $this->limit) { |
781 | 781 | foreach ($this->vars as $fieldName => $fieldProperties) { |
782 | - $formFieldName = self::PREFIX . $fieldName; // "filter_website_id" par exemple |
|
782 | + $formFieldName = self::PREFIX.$fieldName; // "filter_website_id" par exemple |
|
783 | 783 | $queryString[$formFieldName] = $fieldProperties['data']; |
784 | 784 | } |
785 | 785 | // Ajout des paramètres supplémentaires éventuels |
@@ -839,15 +839,15 @@ discard block |
||
839 | 839 | return $html; |
840 | 840 | } |
841 | 841 | $fieldData = $this->vars[$fieldName]; |
842 | - $htmlFieldName = self::PREFIX . $fieldName; |
|
842 | + $htmlFieldName = self::PREFIX.$fieldName; |
|
843 | 843 | |
844 | 844 | switch ($fieldData['fieldType']) { |
845 | 845 | case self::FILTER_FIELD_TEXT: // Zone de texte |
846 | 846 | $ts = MyTextSanitizer::getInstance(); |
847 | - $html = "<input type='text' name='$htmlFieldName' id='$htmlFieldName' size='" . $fieldData['size'] . "' maxlength='" . $fieldData['maxLength'] . "' value='" . $ts->htmlSpecialChars($fieldData['data']) . "' />"; |
|
847 | + $html = "<input type='text' name='$htmlFieldName' id='$htmlFieldName' size='".$fieldData['size']."' maxlength='".$fieldData['maxLength']."' value='".$ts->htmlSpecialChars($fieldData['data'])."' />"; |
|
848 | 848 | break; |
849 | 849 | |
850 | - case self::FILTER_FIELD_SELECT; // Select |
|
850 | + case self::FILTER_FIELD_SELECT; // Select |
|
851 | 851 | $style = ''; |
852 | 852 | if (isset($fieldData['style']) && trim($fieldData['style']) != '') { |
853 | 853 | $style = $fieldData['style']; |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | $queryString['cleanFilter'] = '1'; |
901 | 901 | $baseurl = $this->baseUrl; |
902 | 902 | |
903 | - return " <a href='$baseurl?" . http_build_query($queryString) . "' title='" . _MD_REFERENCES_CLEAN_FILTER . "'><img align='top' src='../assets/images/clear_left.png' alt='" . _MD_REFERENCES_CLEAN_FILTER . "' /></a>"; |
|
903 | + return " <a href='$baseurl?".http_build_query($queryString)."' title='"._MD_REFERENCES_CLEAN_FILTER."'><img align='top' src='../assets/images/clear_left.png' alt='"._MD_REFERENCES_CLEAN_FILTER."' /></a>"; |
|
904 | 904 | } |
905 | 905 | |
906 | 906 | /** |
@@ -914,11 +914,11 @@ discard block |
||
914 | 914 | { |
915 | 915 | $html = ''; |
916 | 916 | if (trim($this->operationName) != '' && trim($this->op) != '') { |
917 | - $html .= "<input type='hidden' name='" . $this->operationName . "' id='" . $this->operationName . "' value='" . $this->op . "' />"; |
|
917 | + $html .= "<input type='hidden' name='".$this->operationName."' id='".$this->operationName."' value='".$this->op."' />"; |
|
918 | 918 | } |
919 | 919 | if (!is_null($additionnals)) { |
920 | 920 | foreach ($additionnals as $key => $value) { |
921 | - $html .= "<input type='hidden' name='" . $key . "' id='" . $key . "' value='" . $value . "' />"; |
|
921 | + $html .= "<input type='hidden' name='".$key."' id='".$key."' value='".$value."' />"; |
|
922 | 922 | } |
923 | 923 | } |
924 | 924 | $html .= "<input type='submit' name='btngo' id='btngo' value='$description' />"; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | $x23 = false; |
111 | 111 | $xv = str_replace('XOOPS ', '', XOOPS_VERSION); |
112 | - if ((int)substr($xv, 2, 1) >= 3) { |
|
112 | + if ((int) substr($xv, 2, 1) >= 3) { |
|
113 | 113 | $x23 = true; |
114 | 114 | } |
115 | 115 | |
@@ -149,15 +149,15 @@ discard block |
||
149 | 149 | // Only for Xoops 2.0.x |
150 | 150 | switch ($editor_option) { |
151 | 151 | case 'fckeditor': |
152 | - if (is_readable(XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php')) { |
|
153 | - require_once(XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php'); |
|
152 | + if (is_readable(XOOPS_ROOT_PATH.'/class/fckeditor/formfckeditor.php')) { |
|
153 | + require_once(XOOPS_ROOT_PATH.'/class/fckeditor/formfckeditor.php'); |
|
154 | 154 | $editor = new XoopsFormFckeditor($caption, $name, $value); |
155 | 155 | } |
156 | 156 | break; |
157 | 157 | |
158 | 158 | case 'htmlarea': |
159 | - if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) { |
|
160 | - require_once(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php'); |
|
159 | + if (is_readable(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')) { |
|
160 | + require_once(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php'); |
|
161 | 161 | $editor = new XoopsFormHtmlarea($caption, $name, $value); |
162 | 162 | } |
163 | 163 | break; |
@@ -172,15 +172,15 @@ discard block |
||
172 | 172 | |
173 | 173 | case 'tinyeditor': |
174 | 174 | case 'tinymce': |
175 | - if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php')) { |
|
176 | - require_once XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php'; |
|
175 | + if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php')) { |
|
176 | + require_once XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php'; |
|
177 | 177 | $editor = new XoopsFormTinyeditorTextArea(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '400px')); |
178 | 178 | } |
179 | 179 | break; |
180 | 180 | |
181 | 181 | case 'koivi': |
182 | - if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) { |
|
183 | - require_once(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php'); |
|
182 | + if (is_readable(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php')) { |
|
183 | + require_once(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php'); |
|
184 | 184 | $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, $width, $height, ''); |
185 | 185 | } |
186 | 186 | break; |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | public static function javascriptLinkConfirm($message, $form = false) |
203 | 203 | { |
204 | 204 | if (!$form) { |
205 | - return "onclick=\"javascript:return confirm('" . str_replace("'", ' ', $message) . "')\""; |
|
205 | + return "onclick=\"javascript:return confirm('".str_replace("'", ' ', $message)."')\""; |
|
206 | 206 | } else { |
207 | - return "onSubmit=\"javascript:return confirm('" . str_replace("'", ' ', $message) . "')\""; |
|
207 | + return "onSubmit=\"javascript:return confirm('".str_replace("'", ' ', $message)."')\""; |
|
208 | 208 | } |
209 | 209 | } |
210 | 210 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | public static function sendEmailFromTpl($tplName, $recipients, $subject, $variables) |
285 | 285 | { |
286 | 286 | global $xoopsConfig; |
287 | - require_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php'; |
|
287 | + require_once XOOPS_ROOT_PATH.'/class/xoopsmailer.php'; |
|
288 | 288 | if (!is_array($recipients)) { |
289 | 289 | if (trim($recipients) == '') { |
290 | 290 | return false; |
@@ -295,13 +295,13 @@ discard block |
||
295 | 295 | } |
296 | 296 | } |
297 | 297 | if (function_exists('xoops_getMailer')) { |
298 | - $xoopsMailer =& xoops_getMailer(); |
|
298 | + $xoopsMailer = & xoops_getMailer(); |
|
299 | 299 | } else { |
300 | - $xoopsMailer =& getMailer(); |
|
300 | + $xoopsMailer = & getMailer(); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | $xoopsMailer->useMail(); |
304 | - $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . self::MODULE_NAME . '/language/' . $xoopsConfig['language'] . '/mail_template'); |
|
304 | + $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/'.self::MODULE_NAME.'/language/'.$xoopsConfig['language'].'/mail_template'); |
|
305 | 305 | $xoopsMailer->setTemplate($tplName); |
306 | 306 | $xoopsMailer->setToEmails($recipients); |
307 | 307 | // TODO: Change ! |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | } |
314 | 314 | $res = $xoopsMailer->send(); |
315 | 315 | unset($xoopsMailer); |
316 | - $filename = XOOPS_UPLOAD_PATH . '/logmail_' . self::MODULE_NAME . '.php'; |
|
316 | + $filename = XOOPS_UPLOAD_PATH.'/logmail_'.self::MODULE_NAME.'.php'; |
|
317 | 317 | if (!file_exists($filename)) { |
318 | 318 | $fp = @fopen($filename, 'a'); |
319 | 319 | if ($fp) { |
@@ -324,16 +324,16 @@ discard block |
||
324 | 324 | $fp = @fopen($filename, 'a'); |
325 | 325 | |
326 | 326 | if ($fp) { |
327 | - fwrite($fp, str_repeat('-', 120) . "\n"); |
|
328 | - fwrite($fp, date('d/m/Y H:i:s') . "\n"); |
|
329 | - fwrite($fp, 'Template name : ' . $tplName . "\n"); |
|
330 | - fwrite($fp, 'Email subject : ' . $subject . "\n"); |
|
327 | + fwrite($fp, str_repeat('-', 120)."\n"); |
|
328 | + fwrite($fp, date('d/m/Y H:i:s')."\n"); |
|
329 | + fwrite($fp, 'Template name : '.$tplName."\n"); |
|
330 | + fwrite($fp, 'Email subject : '.$subject."\n"); |
|
331 | 331 | if (is_array($recipients)) { |
332 | - fwrite($fp, 'Recipient(s) : ' . implode(',', $recipients) . "\n"); |
|
332 | + fwrite($fp, 'Recipient(s) : '.implode(',', $recipients)."\n"); |
|
333 | 333 | } else { |
334 | - fwrite($fp, 'Recipient(s) : ' . $recipients . "\n"); |
|
334 | + fwrite($fp, 'Recipient(s) : '.$recipients."\n"); |
|
335 | 335 | } |
336 | - fwrite($fp, 'Transmited variables : ' . implode(',', $variables) . "\n"); |
|
336 | + fwrite($fp, 'Transmited variables : '.implode(',', $variables)."\n"); |
|
337 | 337 | fclose($fp); |
338 | 338 | } |
339 | 339 | |
@@ -348,17 +348,17 @@ discard block |
||
348 | 348 | global $xoopsModule; |
349 | 349 | $folder = $xoopsModule->getVar('dirname'); |
350 | 350 | $tpllist = array(); |
351 | - require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
352 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
351 | + require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
352 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
353 | 353 | $tplfile_handler = xoops_getHandler('tplfile'); |
354 | 354 | $tpllist = $tplfile_handler->find(null, null, null, $folder); |
355 | - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); // Clear module's blocks cache |
|
355 | + xoops_template_clear_module_cache($xoopsModule->getVar('mid')); // Clear module's blocks cache |
|
356 | 356 | |
357 | 357 | foreach ($tpllist as $onetemplate) { // Remove cache for each page. |
358 | 358 | if ($onetemplate->getVar('tpl_type') === 'module') { |
359 | 359 | // Note, I've been testing all the other methods (like the one of Smarty) and none of them run, that's why I have used this code |
360 | 360 | $files_del = array(); |
361 | - $files_del = glob(XOOPS_CACHE_PATH . '/*' . $onetemplate->getVar('tpl_file') . '*'); |
|
361 | + $files_del = glob(XOOPS_CACHE_PATH.'/*'.$onetemplate->getVar('tpl_file').'*'); |
|
362 | 362 | if (count($files_del) > 0 && is_array($files_del)) { |
363 | 363 | foreach ($files_del as $one_file) { |
364 | 364 | if (is_file($one_file)) { |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | if (!isset($mymodule)) { |
395 | 395 | global $xoopsModule; |
396 | 396 | if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') == REFERENCES_DIRNAME) { |
397 | - $mymodule =& $xoopsModule; |
|
397 | + $mymodule = & $xoopsModule; |
|
398 | 398 | } else { |
399 | 399 | $hModule = xoops_getHandler('module'); |
400 | 400 | $mymodule = $hModule->getByDirname(REFERENCES_DIRNAME); |
@@ -512,12 +512,12 @@ discard block |
||
512 | 512 | */ |
513 | 513 | public static function getCurrentSQLDate() |
514 | 514 | { |
515 | - return date('Y-m-d'); // 2007-05-02 |
|
515 | + return date('Y-m-d'); // 2007-05-02 |
|
516 | 516 | } |
517 | 517 | |
518 | 518 | public static function getCurrentSQLDateTime() |
519 | 519 | { |
520 | - return date('Y-m-d H:i:s'); // 2007-05-02 |
|
520 | + return date('Y-m-d H:i:s'); // 2007-05-02 |
|
521 | 521 | } |
522 | 522 | |
523 | 523 | /** |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | */ |
545 | 545 | public static function timestampToMysqlDate($timestamp) |
546 | 546 | { |
547 | - return date('Y-m-d', (int)$timestamp); |
|
547 | + return date('Y-m-d', (int) $timestamp); |
|
548 | 548 | } |
549 | 549 | |
550 | 550 | /** |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | } |
583 | 583 | if (strpos(strtolower(XOOPS_VERSION), 'legacy') === false) { |
584 | 584 | $xv = xoops_trim(str_replace('XOOPS ', '', XOOPS_VERSION)); |
585 | - if ((int)substr($xv, 4, 2) >= 17) { |
|
585 | + if ((int) substr($xv, 4, 2) >= 17) { |
|
586 | 586 | return false; |
587 | 587 | } |
588 | 588 | } |
@@ -645,25 +645,25 @@ discard block |
||
645 | 645 | } |
646 | 646 | $ext = basename($fileName); |
647 | 647 | $ext = explode('.', $ext); |
648 | - $ext = '.' . $ext[count($ext) - 1]; |
|
648 | + $ext = '.'.$ext[count($ext) - 1]; |
|
649 | 649 | $true = true; |
650 | 650 | while ($true) { |
651 | 651 | $ipbits = explode('.', $_SERVER['REMOTE_ADDR']); |
652 | 652 | list($usec, $sec) = explode(' ', microtime()); |
653 | - $usec = (integer)($usec * 65536); |
|
654 | - $sec = ((integer)$sec) & 0xFFFF; |
|
653 | + $usec = (integer) ($usec * 65536); |
|
654 | + $sec = ((integer) $sec)&0xFFFF; |
|
655 | 655 | |
656 | 656 | if ($trimName) { |
657 | - $uid = sprintf('%06x%04x%04x', ($ipbits[0] << 24) | ($ipbits[1] << 16) | ($ipbits[2] << 8) | $ipbits[3], $sec, $usec); |
|
657 | + $uid = sprintf('%06x%04x%04x', ($ipbits[0] << 24)|($ipbits[1] << 16)|($ipbits[2] << 8)|$ipbits[3], $sec, $usec); |
|
658 | 658 | } else { |
659 | - $uid = sprintf('%08x-%04x-%04x', ($ipbits[0] << 24) | ($ipbits[1] << 16) | ($ipbits[2] << 8) | $ipbits[3], $sec, $usec); |
|
659 | + $uid = sprintf('%08x-%04x-%04x', ($ipbits[0] << 24)|($ipbits[1] << 16)|($ipbits[2] << 8)|$ipbits[3], $sec, $usec); |
|
660 | 660 | } |
661 | - if (!file_exists($workingfolder . $uid . $ext)) { |
|
661 | + if (!file_exists($workingfolder.$uid.$ext)) { |
|
662 | 662 | $true = false; |
663 | 663 | } |
664 | 664 | } |
665 | 665 | |
666 | - return $uid . $ext; |
|
666 | + return $uid.$ext; |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | /** |
@@ -678,135 +678,135 @@ discard block |
||
678 | 678 | $chaine = html_entity_decode($chaine); |
679 | 679 | |
680 | 680 | for ($i = 0; $i <= 255; ++$i) { |
681 | - $search[] = '&#' . $i . ';'; |
|
681 | + $search[] = '&#'.$i.';'; |
|
682 | 682 | $replace[] = chr($i); |
683 | 683 | } |
684 | - $replace[]='...'; $search[]='…'; |
|
685 | - $replace[]="'"; $search[]='‘'; |
|
686 | - $replace[]="'"; $search[]= '’'; |
|
687 | - $replace[]='-'; $search[] = '•'; // $replace[] = '•'; |
|
688 | - $replace[]='—'; $search[]='—'; |
|
689 | - $replace[]='-'; $search[]='–'; |
|
690 | - $replace[]='-'; $search[]='­'; |
|
691 | - $replace[]='"'; $search[]='"'; |
|
692 | - $replace[]='&'; $search[]='&'; |
|
693 | - $replace[]='ˆ'; $search[]='ˆ'; |
|
694 | - $replace[]='¡'; $search[]='¡'; |
|
695 | - $replace[]='¦'; $search[]='¦'; |
|
696 | - $replace[]='¨'; $search[]='¨'; |
|
697 | - $replace[]='¯'; $search[]='¯'; |
|
698 | - $replace[]='´'; $search[]='´'; |
|
699 | - $replace[]='¸'; $search[]='¸'; |
|
700 | - $replace[]='¿'; $search[]='¿'; |
|
701 | - $replace[]='˜'; $search[]='˜'; |
|
702 | - $replace[]="'"; $search[]='‘'; // $replace[]='‘'; |
|
703 | - $replace[]="'"; $search[]='’'; // $replace[]='’'; |
|
704 | - $replace[]='‚'; $search[]='‚'; |
|
705 | - $replace[]="'"; $search[]='“'; // $replace[]='“'; |
|
706 | - $replace[]="'"; $search[]='”'; // $replace[]='”'; |
|
707 | - $replace[]='„'; $search[]='„'; |
|
708 | - $replace[]='‹'; $search[]='‹'; |
|
709 | - $replace[]='›'; $search[]='›'; |
|
710 | - $replace[]='<'; $search[]='<'; |
|
711 | - $replace[]='>'; $search[]='>'; |
|
712 | - $replace[]='±'; $search[]='±'; |
|
713 | - $replace[]='«'; $search[]='«'; |
|
714 | - $replace[]='»'; $search[]='»'; |
|
715 | - $replace[]='×'; $search[]='×'; |
|
716 | - $replace[]='÷'; $search[]='÷'; |
|
717 | - $replace[]='¢'; $search[]='¢'; |
|
718 | - $replace[]='£'; $search[]='£'; |
|
719 | - $replace[]='¤'; $search[]='¤'; |
|
720 | - $replace[]='¥'; $search[]='¥'; |
|
721 | - $replace[]='§'; $search[]='§'; |
|
722 | - $replace[]='©'; $search[]='©'; |
|
723 | - $replace[]='¬'; $search[]='¬'; |
|
724 | - $replace[]='®'; $search[]='®'; |
|
725 | - $replace[]='°'; $search[]='°'; |
|
726 | - $replace[]='µ'; $search[]='µ'; |
|
727 | - $replace[]='¶'; $search[]='¶'; |
|
728 | - $replace[]='·'; $search[]='·'; |
|
729 | - $replace[]='†'; $search[]='†'; |
|
730 | - $replace[]='‡'; $search[]='‡'; |
|
731 | - $replace[]='‰'; $search[]='‰'; |
|
732 | - $replace[]='Euro'; $search[]='€'; // $replace[]='€' |
|
733 | - $replace[]='¼'; $search[]='¼'; |
|
734 | - $replace[]='½'; $search[]='½'; |
|
735 | - $replace[]='¾'; $search[]='¾'; |
|
736 | - $replace[]='¹'; $search[]='¹'; |
|
737 | - $replace[]='²'; $search[]='²'; |
|
738 | - $replace[]='³'; $search[]='³'; |
|
739 | - $replace[]='á'; $search[]='á'; |
|
740 | - $replace[]='Á'; $search[]='Á'; |
|
741 | - $replace[]='â'; $search[]='â'; |
|
742 | - $replace[]='Â'; $search[]='Â'; |
|
743 | - $replace[]='à'; $search[]='à'; |
|
744 | - $replace[]='À'; $search[]='À'; |
|
745 | - $replace[]='å'; $search[]='å'; |
|
746 | - $replace[]='Å'; $search[]='Å'; |
|
747 | - $replace[]='ã'; $search[]='ã'; |
|
748 | - $replace[]='Ã'; $search[]='Ã'; |
|
749 | - $replace[]='ä'; $search[]='ä'; |
|
750 | - $replace[]='Ä'; $search[]='Ä'; |
|
751 | - $replace[]='ª'; $search[]='ª'; |
|
752 | - $replace[]='æ'; $search[]='æ'; |
|
753 | - $replace[]='Æ'; $search[]='Æ'; |
|
754 | - $replace[]='ç'; $search[]='ç'; |
|
755 | - $replace[]='Ç'; $search[]='Ç'; |
|
756 | - $replace[]='ð'; $search[]='ð'; |
|
757 | - $replace[]='Ð'; $search[]='Ð'; |
|
758 | - $replace[]='é'; $search[]='é'; |
|
759 | - $replace[]='É'; $search[]='É'; |
|
760 | - $replace[]='ê'; $search[]='ê'; |
|
761 | - $replace[]='Ê'; $search[]='Ê'; |
|
762 | - $replace[]='è'; $search[]='è'; |
|
763 | - $replace[]='È'; $search[]='È'; |
|
764 | - $replace[]='ë'; $search[]='ë'; |
|
765 | - $replace[]='Ë'; $search[]='Ë'; |
|
766 | - $replace[]='ƒ'; $search[]='ƒ'; |
|
767 | - $replace[]='í'; $search[]='í'; |
|
768 | - $replace[]='Í'; $search[]='Í'; |
|
769 | - $replace[]='î'; $search[]='î'; |
|
770 | - $replace[]='Î'; $search[]='Î'; |
|
771 | - $replace[]='ì'; $search[]='ì'; |
|
772 | - $replace[]='Ì'; $search[]='Ì'; |
|
773 | - $replace[]='ï'; $search[]='ï'; |
|
774 | - $replace[]='Ï'; $search[]='Ï'; |
|
775 | - $replace[]='ñ'; $search[]='ñ'; |
|
776 | - $replace[]='Ñ'; $search[]='Ñ'; |
|
777 | - $replace[]='ó'; $search[]='ó'; |
|
778 | - $replace[]='Ó'; $search[]='Ó'; |
|
779 | - $replace[]='ô'; $search[]='ô'; |
|
780 | - $replace[]='Ô'; $search[]='Ô'; |
|
781 | - $replace[]='ò'; $search[]='ò'; |
|
782 | - $replace[]='Ò'; $search[]='Ò'; |
|
783 | - $replace[]='º'; $search[]='º'; |
|
784 | - $replace[]='ø'; $search[]='ø'; |
|
785 | - $replace[]='Ø'; $search[]='Ø'; |
|
786 | - $replace[]='õ'; $search[]='õ'; |
|
787 | - $replace[]='Õ'; $search[]='Õ'; |
|
788 | - $replace[]='ö'; $search[]='ö'; |
|
789 | - $replace[]='Ö'; $search[]='Ö'; |
|
790 | - $replace[]='œ'; $search[]='œ'; |
|
791 | - $replace[]='Œ'; $search[]='Œ'; |
|
792 | - $replace[]='š'; $search[]='š'; |
|
793 | - $replace[]='Š'; $search[]='Š'; |
|
794 | - $replace[]='ß'; $search[]='ß'; |
|
795 | - $replace[]='þ'; $search[]='þ'; |
|
796 | - $replace[]='Þ'; $search[]='Þ'; |
|
797 | - $replace[]='ú'; $search[]='ú'; |
|
798 | - $replace[]='Ú'; $search[]='Ú'; |
|
799 | - $replace[]='û'; $search[]='û'; |
|
800 | - $replace[]='Û'; $search[]='Û'; |
|
801 | - $replace[]='ù'; $search[]='ù'; |
|
802 | - $replace[]='Ù'; $search[]='Ù'; |
|
803 | - $replace[]='ü'; $search[]='ü'; |
|
804 | - $replace[]='Ü'; $search[]='Ü'; |
|
805 | - $replace[]='ý'; $search[]='ý'; |
|
806 | - $replace[]='Ý'; $search[]='Ý'; |
|
807 | - $replace[]='ÿ'; $search[]='ÿ'; |
|
808 | - $replace[]='Ÿ'; $search[]='Ÿ'; |
|
809 | - $chaine = str_replace($search, $replace, $chaine); |
|
684 | + $replace[] = '...'; $search[] = '…'; |
|
685 | + $replace[] = "'"; $search[] = '‘'; |
|
686 | + $replace[] = "'"; $search[] = '’'; |
|
687 | + $replace[] = '-'; $search[] = '•'; // $replace[] = '•'; |
|
688 | + $replace[] = '—'; $search[] = '—'; |
|
689 | + $replace[] = '-'; $search[] = '–'; |
|
690 | + $replace[] = '-'; $search[] = '­'; |
|
691 | + $replace[] = '"'; $search[] = '"'; |
|
692 | + $replace[] = '&'; $search[] = '&'; |
|
693 | + $replace[] = 'ˆ'; $search[] = 'ˆ'; |
|
694 | + $replace[] = '¡'; $search[] = '¡'; |
|
695 | + $replace[] = '¦'; $search[] = '¦'; |
|
696 | + $replace[] = '¨'; $search[] = '¨'; |
|
697 | + $replace[] = '¯'; $search[] = '¯'; |
|
698 | + $replace[] = '´'; $search[] = '´'; |
|
699 | + $replace[] = '¸'; $search[] = '¸'; |
|
700 | + $replace[] = '¿'; $search[] = '¿'; |
|
701 | + $replace[] = '˜'; $search[] = '˜'; |
|
702 | + $replace[] = "'"; $search[] = '‘'; // $replace[]='‘'; |
|
703 | + $replace[] = "'"; $search[] = '’'; // $replace[]='’'; |
|
704 | + $replace[] = '‚'; $search[] = '‚'; |
|
705 | + $replace[] = "'"; $search[] = '“'; // $replace[]='“'; |
|
706 | + $replace[] = "'"; $search[] = '”'; // $replace[]='”'; |
|
707 | + $replace[] = '„'; $search[] = '„'; |
|
708 | + $replace[] = '‹'; $search[] = '‹'; |
|
709 | + $replace[] = '›'; $search[] = '›'; |
|
710 | + $replace[] = '<'; $search[] = '<'; |
|
711 | + $replace[] = '>'; $search[] = '>'; |
|
712 | + $replace[] = '±'; $search[] = '±'; |
|
713 | + $replace[] = '«'; $search[] = '«'; |
|
714 | + $replace[] = '»'; $search[] = '»'; |
|
715 | + $replace[] = '×'; $search[] = '×'; |
|
716 | + $replace[] = '÷'; $search[] = '÷'; |
|
717 | + $replace[] = '¢'; $search[] = '¢'; |
|
718 | + $replace[] = '£'; $search[] = '£'; |
|
719 | + $replace[] = '¤'; $search[] = '¤'; |
|
720 | + $replace[] = '¥'; $search[] = '¥'; |
|
721 | + $replace[] = '§'; $search[] = '§'; |
|
722 | + $replace[] = '©'; $search[] = '©'; |
|
723 | + $replace[] = '¬'; $search[] = '¬'; |
|
724 | + $replace[] = '®'; $search[] = '®'; |
|
725 | + $replace[] = '°'; $search[] = '°'; |
|
726 | + $replace[] = 'µ'; $search[] = 'µ'; |
|
727 | + $replace[] = '¶'; $search[] = '¶'; |
|
728 | + $replace[] = '·'; $search[] = '·'; |
|
729 | + $replace[] = '†'; $search[] = '†'; |
|
730 | + $replace[] = '‡'; $search[] = '‡'; |
|
731 | + $replace[] = '‰'; $search[] = '‰'; |
|
732 | + $replace[] = 'Euro'; $search[] = '€'; // $replace[]='€' |
|
733 | + $replace[] = '¼'; $search[] = '¼'; |
|
734 | + $replace[] = '½'; $search[] = '½'; |
|
735 | + $replace[] = '¾'; $search[] = '¾'; |
|
736 | + $replace[] = '¹'; $search[] = '¹'; |
|
737 | + $replace[] = '²'; $search[] = '²'; |
|
738 | + $replace[] = '³'; $search[] = '³'; |
|
739 | + $replace[] = 'á'; $search[] = 'á'; |
|
740 | + $replace[] = 'Á'; $search[] = 'Á'; |
|
741 | + $replace[] = 'â'; $search[] = 'â'; |
|
742 | + $replace[] = 'Â'; $search[] = 'Â'; |
|
743 | + $replace[] = 'à'; $search[] = 'à'; |
|
744 | + $replace[] = 'À'; $search[] = 'À'; |
|
745 | + $replace[] = 'å'; $search[] = 'å'; |
|
746 | + $replace[] = 'Å'; $search[] = 'Å'; |
|
747 | + $replace[] = 'ã'; $search[] = 'ã'; |
|
748 | + $replace[] = 'Ã'; $search[] = 'Ã'; |
|
749 | + $replace[] = 'ä'; $search[] = 'ä'; |
|
750 | + $replace[] = 'Ä'; $search[] = 'Ä'; |
|
751 | + $replace[] = 'ª'; $search[] = 'ª'; |
|
752 | + $replace[] = 'æ'; $search[] = 'æ'; |
|
753 | + $replace[] = 'Æ'; $search[] = 'Æ'; |
|
754 | + $replace[] = 'ç'; $search[] = 'ç'; |
|
755 | + $replace[] = 'Ç'; $search[] = 'Ç'; |
|
756 | + $replace[] = 'ð'; $search[] = 'ð'; |
|
757 | + $replace[] = 'Ð'; $search[] = 'Ð'; |
|
758 | + $replace[] = 'é'; $search[] = 'é'; |
|
759 | + $replace[] = 'É'; $search[] = 'É'; |
|
760 | + $replace[] = 'ê'; $search[] = 'ê'; |
|
761 | + $replace[] = 'Ê'; $search[] = 'Ê'; |
|
762 | + $replace[] = 'è'; $search[] = 'è'; |
|
763 | + $replace[] = 'È'; $search[] = 'È'; |
|
764 | + $replace[] = 'ë'; $search[] = 'ë'; |
|
765 | + $replace[] = 'Ë'; $search[] = 'Ë'; |
|
766 | + $replace[] = 'ƒ'; $search[] = 'ƒ'; |
|
767 | + $replace[] = 'í'; $search[] = 'í'; |
|
768 | + $replace[] = 'Í'; $search[] = 'Í'; |
|
769 | + $replace[] = 'î'; $search[] = 'î'; |
|
770 | + $replace[] = 'Î'; $search[] = 'Î'; |
|
771 | + $replace[] = 'ì'; $search[] = 'ì'; |
|
772 | + $replace[] = 'Ì'; $search[] = 'Ì'; |
|
773 | + $replace[] = 'ï'; $search[] = 'ï'; |
|
774 | + $replace[] = 'Ï'; $search[] = 'Ï'; |
|
775 | + $replace[] = 'ñ'; $search[] = 'ñ'; |
|
776 | + $replace[] = 'Ñ'; $search[] = 'Ñ'; |
|
777 | + $replace[] = 'ó'; $search[] = 'ó'; |
|
778 | + $replace[] = 'Ó'; $search[] = 'Ó'; |
|
779 | + $replace[] = 'ô'; $search[] = 'ô'; |
|
780 | + $replace[] = 'Ô'; $search[] = 'Ô'; |
|
781 | + $replace[] = 'ò'; $search[] = 'ò'; |
|
782 | + $replace[] = 'Ò'; $search[] = 'Ò'; |
|
783 | + $replace[] = 'º'; $search[] = 'º'; |
|
784 | + $replace[] = 'ø'; $search[] = 'ø'; |
|
785 | + $replace[] = 'Ø'; $search[] = 'Ø'; |
|
786 | + $replace[] = 'õ'; $search[] = 'õ'; |
|
787 | + $replace[] = 'Õ'; $search[] = 'Õ'; |
|
788 | + $replace[] = 'ö'; $search[] = 'ö'; |
|
789 | + $replace[] = 'Ö'; $search[] = 'Ö'; |
|
790 | + $replace[] = 'œ'; $search[] = 'œ'; |
|
791 | + $replace[] = 'Œ'; $search[] = 'Œ'; |
|
792 | + $replace[] = 'š'; $search[] = 'š'; |
|
793 | + $replace[] = 'Š'; $search[] = 'Š'; |
|
794 | + $replace[] = 'ß'; $search[] = 'ß'; |
|
795 | + $replace[] = 'þ'; $search[] = 'þ'; |
|
796 | + $replace[] = 'Þ'; $search[] = 'Þ'; |
|
797 | + $replace[] = 'ú'; $search[] = 'ú'; |
|
798 | + $replace[] = 'Ú'; $search[] = 'Ú'; |
|
799 | + $replace[] = 'û'; $search[] = 'û'; |
|
800 | + $replace[] = 'Û'; $search[] = 'Û'; |
|
801 | + $replace[] = 'ù'; $search[] = 'ù'; |
|
802 | + $replace[] = 'Ù'; $search[] = 'Ù'; |
|
803 | + $replace[] = 'ü'; $search[] = 'ü'; |
|
804 | + $replace[] = 'Ü'; $search[] = 'Ü'; |
|
805 | + $replace[] = 'ý'; $search[] = 'ý'; |
|
806 | + $replace[] = 'Ý'; $search[] = 'Ý'; |
|
807 | + $replace[] = 'ÿ'; $search[] = 'ÿ'; |
|
808 | + $replace[] = 'Ÿ'; $search[] = 'Ÿ'; |
|
809 | + $chaine = str_replace($search, $replace, $chaine); |
|
810 | 810 | |
811 | 811 | return $chaine; |
812 | 812 | } |
@@ -823,11 +823,11 @@ discard block |
||
823 | 823 | { |
824 | 824 | $s = "ÀÁÂÃÄÅÒÓÔÕÖØÈÉÊËÇÌÍÎÏÙÚÛÜŸÑàáâãäåòóôõöøèéêëçìíîïùúûüÿñ '()"; |
825 | 825 | $r = 'AAAAAAOOOOOOEEEECIIIIUUUUYNaaaaaaooooooeeeeciiiiuuuuyn----'; |
826 | - $content = self::unhtml($content); // First, remove html entities |
|
826 | + $content = self::unhtml($content); // First, remove html entities |
|
827 | 827 | $content = strtr($content, $s, $r); |
828 | 828 | $content = strip_tags($content); |
829 | 829 | $content = strtolower($content); |
830 | - $content = htmlentities($content); // TODO: Vérifier |
|
830 | + $content = htmlentities($content); // TODO: Vérifier |
|
831 | 831 | $content = preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde);/', '$1', $content); |
832 | 832 | $content = html_entity_decode($content); |
833 | 833 | $content = eregi_replace('quot', ' ', $content); |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | $keywords = ''; |
843 | 843 | foreach ($words as $word) { |
844 | 844 | if (strlen($word) >= $urw) { |
845 | - $keywords .= '-' . trim($word); |
|
845 | + $keywords .= '-'.trim($word); |
|
846 | 846 | } |
847 | 847 | } |
848 | 848 | if (!$keywords) { |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | $limit = $_SESSION['references_keywords_limit']; |
878 | 878 | } else { |
879 | 879 | $config_handler = xoops_getHandler('config'); |
880 | - $xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH); |
|
880 | + $xoopsConfigSearch = & $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH); |
|
881 | 881 | $limit = $xoopsConfigSearch['keyword_min']; |
882 | 882 | $_SESSION['references_keywords_limit'] = $limit; |
883 | 883 | } |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | if (!isset($config_handler) || !is_object($config_handler)) { |
926 | 926 | $config_handler = xoops_getHandler('config'); |
927 | 927 | } |
928 | - $xoopsConfigMetaFooter =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER); |
|
928 | + $xoopsConfigMetaFooter = & $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER); |
|
929 | 929 | if (isset($xoopsConfigMetaFooter['meta_keywords'])) { |
930 | 930 | return $xoopsConfigMetaFooter['meta_keywords']; |
931 | 931 | } else { |
@@ -947,10 +947,10 @@ discard block |
||
947 | 947 | */ |
948 | 948 | public static function uploadFile($indice, $dstpath = XOOPS_UPLOAD_PATH, $mimeTypes = null, $uploadMaxSize = null, $maxWidth = null, $maxHeight = null) |
949 | 949 | { |
950 | - require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
950 | + require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
951 | 951 | global $destname; |
952 | 952 | if (isset($_POST['xoops_upload_file'])) { |
953 | - require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
953 | + require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
954 | 954 | $fldname = ''; |
955 | 955 | $fldname = $_FILES[$_POST['xoops_upload_file'][$indice]]; |
956 | 956 | $fldname = get_magic_quotes_gpc() ? stripslashes($fldname['name']) : $fldname['name']; |
@@ -974,7 +974,7 @@ discard block |
||
974 | 974 | if ($uploader->upload()) { |
975 | 975 | return true; |
976 | 976 | } else { |
977 | - return _ERRORS . ' ' . htmlentities($uploader->getErrors()); |
|
977 | + return _ERRORS.' '.htmlentities($uploader->getErrors()); |
|
978 | 978 | } |
979 | 979 | } else { |
980 | 980 | return htmlentities($uploader->getErrors()); |
@@ -1057,9 +1057,9 @@ discard block |
||
1057 | 1057 | $workingBreadcrumb = array(); |
1058 | 1058 | if (is_array($path)) { |
1059 | 1059 | $moduleName = self::getModuleName(); |
1060 | - $workingBreadcrumb[] = "<a href='" . REFERENCES_URL . "' title='" . self::makeHrefTitle($moduleName) . "'>" . $moduleName . '</a>'; |
|
1060 | + $workingBreadcrumb[] = "<a href='".REFERENCES_URL."' title='".self::makeHrefTitle($moduleName)."'>".$moduleName.'</a>'; |
|
1061 | 1061 | foreach ($path as $url => $title) { |
1062 | - $workingBreadcrumb[] = "<a href='" . $url . "'>" . $title . '</a>'; |
|
1062 | + $workingBreadcrumb[] = "<a href='".$url."'>".$title.'</a>'; |
|
1063 | 1063 | } |
1064 | 1064 | $cnt = count($workingBreadcrumb); |
1065 | 1065 | for ($i = 0; $i < $cnt; ++$i) { |
@@ -1098,7 +1098,7 @@ discard block |
||
1098 | 1098 | |
1099 | 1099 | $complete_tags = array_reverse($complete_tags); |
1100 | 1100 | for ($i = 0; $i < count($complete_tags); ++$i) { |
1101 | - $string .= '</' . $complete_tags[$i] . '>'; |
|
1101 | + $string .= '</'.$complete_tags[$i].'>'; |
|
1102 | 1102 | } |
1103 | 1103 | } |
1104 | 1104 | |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | $string = self::close_tags($string); |
1120 | 1120 | } |
1121 | 1121 | |
1122 | - return $string . $etc; |
|
1122 | + return $string.$etc; |
|
1123 | 1123 | } else { |
1124 | 1124 | return $string; |
1125 | 1125 | } |
@@ -1151,7 +1151,7 @@ discard block |
||
1151 | 1151 | public static function getMimeType($filename) |
1152 | 1152 | { |
1153 | 1153 | if (function_exists('finfo_open')) { |
1154 | - $pathToMagic = REFERENCES_PATH . 'mime/magic'; |
|
1154 | + $pathToMagic = REFERENCES_PATH.'mime/magic'; |
|
1155 | 1155 | $finfo = new finfo(FILEINFO_MIME, $pathToMagic); |
1156 | 1156 | $mimetype = $finfo->file($filename); |
1157 | 1157 | finfo_close($finfo); |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | sort($xoopsUsersIDs); |
1182 | 1182 | if (count($xoopsUsersIDs) > 0) { |
1183 | 1183 | $member_handler = xoops_getHandler('user'); |
1184 | - $criteria = new Criteria('uid', '(' . implode(',', $xoopsUsersIDs) . ')', 'IN'); |
|
1184 | + $criteria = new Criteria('uid', '('.implode(',', $xoopsUsersIDs).')', 'IN'); |
|
1185 | 1185 | $criteria->setSort('uid'); |
1186 | 1186 | $users = $member_handler->getObjects($criteria, true); |
1187 | 1187 | } |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | } else { |
1220 | 1220 | if ($uid > 0) { |
1221 | 1221 | $member_handler = xoops_getHandler('member'); |
1222 | - $buffer[$uid] = $member_handler->getGroupsByUser($uid, false); // Renvoie un tableau d'ID (de groupes) |
|
1222 | + $buffer[$uid] = $member_handler->getGroupsByUser($uid, false); // Renvoie un tableau d'ID (de groupes) |
|
1223 | 1223 | } else { |
1224 | 1224 | $buffer[$uid] = array(XOOPS_GROUP_ANONYMOUS); |
1225 | 1225 | } |
@@ -1246,7 +1246,7 @@ discard block |
||
1246 | 1246 | $retval = $buffer[$group]; |
1247 | 1247 | } else { |
1248 | 1248 | $member_handler = xoops_getHandler('member'); |
1249 | - $groups = $member_handler->getGroupsByUser($uid, false); // Renvoie un tableau d'ID (de groupes) |
|
1249 | + $groups = $member_handler->getGroupsByUser($uid, false); // Renvoie un tableau d'ID (de groupes) |
|
1250 | 1250 | $retval = in_array($group, $groups); |
1251 | 1251 | $buffer[$group] = $retval; |
1252 | 1252 | } |
@@ -1286,7 +1286,7 @@ discard block |
||
1286 | 1286 | static $cache = -1; |
1287 | 1287 | if ($cache == -1) { |
1288 | 1288 | global $xoopsDB; |
1289 | - $sql = 'SELECT COUNT(*) FROM ' . $xoopsDB->prefix('groups'); |
|
1289 | + $sql = 'SELECT COUNT(*) FROM '.$xoopsDB->prefix('groups'); |
|
1290 | 1290 | $result = $xoopsDB->query($sql); |
1291 | 1291 | if (!$result) { |
1292 | 1292 | return false; |
@@ -1307,7 +1307,7 @@ discard block |
||
1307 | 1307 | { |
1308 | 1308 | if (!is_dir($folder)) { |
1309 | 1309 | mkdir($folder, 0777); |
1310 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
1310 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
1311 | 1311 | } else { |
1312 | 1312 | if (!is_writable($folder)) { |
1313 | 1313 | chmod($folder, 0777); |
@@ -1328,10 +1328,10 @@ discard block |
||
1328 | 1328 | if (strstr($languageFile, $defaultExtension) === false) { |
1329 | 1329 | $languageFile .= $defaultExtension; |
1330 | 1330 | } |
1331 | - if (file_exists($root . 'language' . DIRECTORY_SEPARATOR . $xoopsConfig['language'] . DIRECTORY_SEPARATOR . $languageFile)) { |
|
1332 | - require_once $root . 'language' . DIRECTORY_SEPARATOR . $xoopsConfig['language'] . DIRECTORY_SEPARATOR . $languageFile; |
|
1331 | + if (file_exists($root.'language'.DIRECTORY_SEPARATOR.$xoopsConfig['language'].DIRECTORY_SEPARATOR.$languageFile)) { |
|
1332 | + require_once $root.'language'.DIRECTORY_SEPARATOR.$xoopsConfig['language'].DIRECTORY_SEPARATOR.$languageFile; |
|
1333 | 1333 | } else { // Fallback |
1334 | - require_once $root . 'language' . DIRECTORY_SEPARATOR . 'english' . DIRECTORY_SEPARATOR . $languageFile; |
|
1334 | + require_once $root.'language'.DIRECTORY_SEPARATOR.'english'.DIRECTORY_SEPARATOR.$languageFile; |
|
1335 | 1335 | } |
1336 | 1336 | } |
1337 | 1337 | |
@@ -1369,10 +1369,10 @@ discard block |
||
1369 | 1369 | $left = $top = 0; |
1370 | 1370 | if (is_array($pictureDimensions)) { |
1371 | 1371 | if ($pictureWidth > $param_width) { |
1372 | - $left = (int)(($pictureWidth / 2) - ($param_width / 2)); |
|
1372 | + $left = (int) (($pictureWidth / 2) - ($param_width / 2)); |
|
1373 | 1373 | } |
1374 | 1374 | if ($pictureHeight > $param_height) { |
1375 | - $top = (int)(($pictureHeight / 2) - ($param_height / 2)); |
|
1375 | + $top = (int) (($pictureHeight / 2) - ($param_height / 2)); |
|
1376 | 1376 | } |
1377 | 1377 | } |
1378 | 1378 | $result = $img->crop($left, $top, $param_width, $param_height); |
@@ -1412,7 +1412,7 @@ discard block |
||
1412 | 1412 | $selected = " selected = 'selected'"; |
1413 | 1413 | } |
1414 | 1414 | } |
1415 | - $ret[] = '<option value=0' . $selected . '>---</option>'; |
|
1415 | + $ret[] = '<option value=0'.$selected.'>---</option>'; |
|
1416 | 1416 | } |
1417 | 1417 | |
1418 | 1418 | foreach ($array as $index => $label) { |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | $selected = " selected = 'selected'"; |
1427 | 1427 | } |
1428 | 1428 | } |
1429 | - $ret[] = "<option value=\"" . $index . "\"" . $selected . '>' . $label . '</option>'; |
|
1429 | + $ret[] = "<option value=\"".$index."\"".$selected.'>'.$label.'</option>'; |
|
1430 | 1430 | } |
1431 | 1431 | |
1432 | 1432 | return implode("\n", $ret); |
@@ -1448,14 +1448,14 @@ discard block |
||
1448 | 1448 | public static function htmlSelect($selectName, $array, $default, $withNull = true, $style = '', $multiple = false, $size = 1, $extra = '') |
1449 | 1449 | { |
1450 | 1450 | $ret = ''; |
1451 | - $ret .= "<select name='" . $selectName . "' id='" . $selectName . "'"; |
|
1451 | + $ret .= "<select name='".$selectName."' id='".$selectName."'"; |
|
1452 | 1452 | if (xoops_trim($style) != '') { |
1453 | - $ret .= " style='" . $style . "' "; |
|
1453 | + $ret .= " style='".$style."' "; |
|
1454 | 1454 | } |
1455 | 1455 | if (xoops_trim($multiple) != '') { |
1456 | - $ret .= " multiple = 'multiple' size='" . $size . "' "; |
|
1456 | + $ret .= " multiple = 'multiple' size='".$size."' "; |
|
1457 | 1457 | } |
1458 | - $ret .= $extra . ">\n"; |
|
1458 | + $ret .= $extra.">\n"; |
|
1459 | 1459 | $ret .= self::htmlSelectOptions($array, $default, $withNull); |
1460 | 1460 | $ret .= "</select>\n"; |
1461 | 1461 | |
@@ -1530,16 +1530,16 @@ discard block |
||
1530 | 1530 | { |
1531 | 1531 | global $xoopsDB; |
1532 | 1532 | define('REFERENCES_MAINTAIN', true); |
1533 | - require self::MODULE_PATH . 'xoops_version.php'; |
|
1533 | + require self::MODULE_PATH.'xoops_version.php'; |
|
1534 | 1534 | $tables = array(); |
1535 | 1535 | foreach ($modversion['tables'] as $table) { |
1536 | 1536 | $tables[] = $xoopsDB->prefix($table); |
1537 | 1537 | } |
1538 | 1538 | if (count($tables) > 0) { |
1539 | 1539 | $list = implode(',', $tables); |
1540 | - $xoopsDB->queryF('CHECK TABLE ' . $list); |
|
1541 | - $xoopsDB->queryF('ANALYZE TABLE ' . $list); |
|
1542 | - $xoopsDB->queryF('OPTIMIZE TABLE ' . $list); |
|
1540 | + $xoopsDB->queryF('CHECK TABLE '.$list); |
|
1541 | + $xoopsDB->queryF('ANALYZE TABLE '.$list); |
|
1542 | + $xoopsDB->queryF('OPTIMIZE TABLE '.$list); |
|
1543 | 1543 | } |
1544 | 1544 | self::updateCache(); |
1545 | 1545 | $handlers = references_handler::getInstance(); |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | * Priorités des plugins |
60 | 60 | * @var constant |
61 | 61 | */ |
62 | - const EVENT_PRIORITY_1 = 1; // Priorité la plus haute |
|
62 | + const EVENT_PRIORITY_1 = 1; // Priorité la plus haute |
|
63 | 63 | const EVENT_PRIORITY_2 = 2; |
64 | 64 | const EVENT_PRIORITY_3 = 3; |
65 | 65 | const EVENT_PRIORITY_4 = 4; |
66 | - const EVENT_PRIORITY_5 = 5; // Priorité la plus basse |
|
66 | + const EVENT_PRIORITY_5 = 5; // Priorité la plus basse |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Utilisé pour construire le nom de la classe |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function loadPlugins() |
125 | 125 | { |
126 | - $this->loadPluginsFiles(REFERENCES_PLUGINS_PATH . $this->pluginsTypesFolder[self::PLUGIN_ACTION], self::PLUGIN_ACTION); |
|
127 | - $this->loadPluginsFiles(REFERENCES_PLUGINS_PATH . $this->pluginsTypesFolder[self::PLUGIN_FILTER], self::PLUGIN_FILTER); |
|
126 | + $this->loadPluginsFiles(REFERENCES_PLUGINS_PATH.$this->pluginsTypesFolder[self::PLUGIN_ACTION], self::PLUGIN_ACTION); |
|
127 | + $this->loadPluginsFiles(REFERENCES_PLUGINS_PATH.$this->pluginsTypesFolder[self::PLUGIN_FILTER], self::PLUGIN_FILTER); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | { |
139 | 139 | require_once $fullPathName; |
140 | 140 | // Du style referencesRegionalizationFilter |
141 | - $className = self::MODULE_DIRNAME . ucfirst(strtolower($pluginFolder)) . $this->pluginsTypeLabel[$type]; |
|
141 | + $className = self::MODULE_DIRNAME.ucfirst(strtolower($pluginFolder)).$this->pluginsTypeLabel[$type]; |
|
142 | 142 | if (class_exists($className) && get_parent_class($className) == $this->pluginsClassName[$type]) { |
143 | 143 | // TODO: Vérifier que l'évènement n'est pas déjà en mémoire |
144 | 144 | $events = call_user_func(array($className, self::PLUGIN_DESCRIBE_METHOD)); |
145 | 145 | foreach ($events as $event) { |
146 | 146 | $eventName = $event[0]; |
147 | 147 | $eventPriority = $event[1]; |
148 | - $fileToInclude = REFERENCES_PLUGINS_PATH . $this->pluginsTypesFolder[$type] . DIRECTORY_SEPARATOR . $pluginFolder . DIRECTORY_SEPARATOR . $event[2]; |
|
148 | + $fileToInclude = REFERENCES_PLUGINS_PATH.$this->pluginsTypesFolder[$type].DIRECTORY_SEPARATOR.$pluginFolder.DIRECTORY_SEPARATOR.$event[2]; |
|
149 | 149 | $classToCall = $event[3]; |
150 | 150 | $methodToCall = $event[4]; |
151 | 151 | $this->events[$type][$eventName][$eventPriority][] = array('fullPathName' => $fileToInclude, 'className' => $classToCall, 'method' => $methodToCall); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $objects = new DirectoryIterator($path); |
166 | 166 | foreach ($objects as $object) { |
167 | 167 | if ($object->isDir() && !$object->isDot()) { |
168 | - $file = $path . DIRECTORY_SEPARATOR . $object->current() . DIRECTORY_SEPARATOR . self::PLUGIN_SCRIPT_NAME; |
|
168 | + $file = $path.DIRECTORY_SEPARATOR.$object->current().DIRECTORY_SEPARATOR.self::PLUGIN_SCRIPT_NAME; |
|
169 | 169 | if (file_exists($file)) { |
170 | 170 | $this->loadClass($file, $type, $object->current()); |
171 | 171 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | return $this; |
189 | 189 | } |
190 | - ksort($this->events[self::PLUGIN_ACTION][$eventToFire]); // Tri par priorit� |
|
190 | + ksort($this->events[self::PLUGIN_ACTION][$eventToFire]); // Tri par priorit� |
|
191 | 191 | foreach ($this->events[self::PLUGIN_ACTION][$eventToFire] as $priority => $events) { |
192 | 192 | foreach ($events as $event) { |
193 | 193 | if ($this->isUnplug(self::PLUGIN_ACTION, $eventToFire, $event['fullPathName'], $event['className'], $event['method'])) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | |
223 | 223 | return $this; |
224 | 224 | } |
225 | - ksort($this->events[self::PLUGIN_FILTER][$eventToFire]); // Tri par priorité |
|
225 | + ksort($this->events[self::PLUGIN_FILTER][$eventToFire]); // Tri par priorité |
|
226 | 226 | foreach ($this->events[self::PLUGIN_FILTER][$eventToFire] as $priority => $events) { |
227 | 227 | foreach ($events as $event) { |
228 | 228 | if ($this->isUnplug(self::PLUGIN_FILTER, $eventToFire, $event['fullPathName'], $event['className'], $event['method'])) { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | 'pearErrorMode' |
315 | 315 | ); |
316 | 316 | if (in_array($name, $availableOptions)) { |
317 | - $property = '_' . $name; |
|
317 | + $property = '_'.$name; |
|
318 | 318 | $this->$property = $value; |
319 | 319 | } |
320 | 320 | } |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | 'counter' => $this->_memoryCachingCounter, |
512 | 512 | 'array' => $this->_memoryCachingArray |
513 | 513 | ); |
514 | - $data = serialize($array); |
|
514 | + $data = serialize($array); |
|
515 | 515 | $this->save($data, $id, $group); |
516 | 516 | } |
517 | 517 | } |
@@ -623,9 +623,9 @@ discard block |
||
623 | 623 | public function _cleanDir($dir, $group = false, $mode = 'ingroup') |
624 | 624 | { |
625 | 625 | if ($this->_fileNameProtection) { |
626 | - $motif = $group ? 'cache_' . md5($group) . '_' : 'cache_'; |
|
626 | + $motif = $group ? 'cache_'.md5($group).'_' : 'cache_'; |
|
627 | 627 | } else { |
628 | - $motif = $group ? 'cache_' . $group . '_' : 'cache_'; |
|
628 | + $motif = $group ? 'cache_'.$group.'_' : 'cache_'; |
|
629 | 629 | } |
630 | 630 | if ($this->_memoryCaching) { |
631 | 631 | foreach ($this->_memoryCachingArray as $key => $v) { |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | while ($file = readdir($dh)) { |
646 | 646 | if (($file !== '.') && ($file !== '..')) { |
647 | 647 | if (substr($file, 0, 6) === 'cache_') { |
648 | - $file2 = $dir . $file; |
|
648 | + $file2 = $dir.$file; |
|
649 | 649 | if (is_file($file2)) { |
650 | 650 | switch (substr($mode, 0, 9)) { |
651 | 651 | case 'old': |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | } |
677 | 677 | } |
678 | 678 | if (is_dir($file2) and ($this->_hashedDirectoryLevel > 0)) { |
679 | - $result = ($result and $this->_cleanDir($file2 . '/', $group, $mode)); |
|
679 | + $result = ($result and $this->_cleanDir($file2.'/', $group, $mode)); |
|
680 | 680 | } |
681 | 681 | } |
682 | 682 | } |
@@ -712,19 +712,19 @@ discard block |
||
712 | 712 | public function _setFileName($id, $group) |
713 | 713 | { |
714 | 714 | if ($this->_fileNameProtection) { |
715 | - $suffix = 'cache_' . md5($group) . '_' . md5($id); |
|
715 | + $suffix = 'cache_'.md5($group).'_'.md5($id); |
|
716 | 716 | } else { |
717 | - $suffix = 'cache_' . $group . '_' . $id; |
|
717 | + $suffix = 'cache_'.$group.'_'.$id; |
|
718 | 718 | } |
719 | 719 | $root = $this->_cacheDir; |
720 | 720 | if ($this->_hashedDirectoryLevel > 0) { |
721 | 721 | $hash = md5($suffix); |
722 | 722 | for ($i = 0; $i < $this->_hashedDirectoryLevel; ++$i) { |
723 | - $root = $root . 'cache_' . substr($hash, 0, $i + 1) . '/'; |
|
723 | + $root = $root.'cache_'.substr($hash, 0, $i + 1).'/'; |
|
724 | 724 | } |
725 | 725 | } |
726 | 726 | $this->_fileName = $suffix; |
727 | - $this->_file = $root . $suffix; |
|
727 | + $this->_file = $root.$suffix; |
|
728 | 728 | } |
729 | 729 | |
730 | 730 | /** |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | $hash = md5($this->_fileName); |
791 | 791 | $root = $this->_cacheDir; |
792 | 792 | for ($i = 0; $i < $this->_hashedDirectoryLevel; ++$i) { |
793 | - $root = $root . 'cache_' . substr($hash, 0, $i + 1) . '/'; |
|
793 | + $root = $root.'cache_'.substr($hash, 0, $i + 1).'/'; |
|
794 | 794 | if (!(@is_dir($root))) { |
795 | 795 | @mkdir($root, $this->_hashedDirectoryUmask); |
796 | 796 | } |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | return true; |
817 | 817 | } |
818 | 818 | |
819 | - return $this->raiseError('Cache_Lite : Unable to write cache file : ' . $this->_file, -1); |
|
819 | + return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1); |
|
820 | 820 | } |
821 | 821 | |
822 | 822 | /** |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | die('XOOPS root path not defined'); |
23 | 23 | } |
24 | 24 | |
25 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
25 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
26 | 26 | if (!class_exists('references_XoopsPersistableObjectHandler')) { |
27 | - require_once XOOPS_ROOT_PATH . '/modules/references/class/PersistableObjectHandler.php'; |
|
27 | + require_once XOOPS_ROOT_PATH.'/modules/references/class/PersistableObjectHandler.php'; |
|
28 | 28 | } |
29 | 29 | |
30 | -define('REFERENCES_STATUS_ONLINE', 1); // Articles en ligne |
|
31 | -define('REFERENCES_STATUS_OFFLINE', 0); // Articles hors ligne |
|
30 | +define('REFERENCES_STATUS_ONLINE', 1); // Articles en ligne |
|
31 | +define('REFERENCES_STATUS_OFFLINE', 0); // Articles hors ligne |
|
32 | 32 | |
33 | 33 | class references_articles extends references_Object |
34 | 34 | { |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | public function getOnlinePicture() |
90 | 90 | { |
91 | 91 | if ($this->isArticleOnline()) { |
92 | - return REFERENCES_IMAGES_URL . 'status_online.png'; |
|
92 | + return REFERENCES_IMAGES_URL.'status_online.png'; |
|
93 | 93 | } else { |
94 | - return REFERENCES_IMAGES_URL . 'status_offline.png'; |
|
94 | + return REFERENCES_IMAGES_URL.'status_offline.png'; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | public function pictureExists($indice) |
115 | 115 | { |
116 | 116 | $return = false; |
117 | - $fieldName = 'article_picture' . $indice; |
|
118 | - if (xoops_trim($this->getVar($fieldName)) != '' && file_exists(references_utils::getModuleOption('images_path') . DIRECTORY_SEPARATOR . $this->getVar($fieldName))) { |
|
117 | + $fieldName = 'article_picture'.$indice; |
|
118 | + if (xoops_trim($this->getVar($fieldName)) != '' && file_exists(references_utils::getModuleOption('images_path').DIRECTORY_SEPARATOR.$this->getVar($fieldName))) { |
|
119 | 119 | $return = true; |
120 | 120 | } |
121 | 121 | |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function deletePicture($indice) |
132 | 132 | { |
133 | - $fieldName = 'article_picture' . $indice; |
|
133 | + $fieldName = 'article_picture'.$indice; |
|
134 | 134 | if ($this->pictureExists($indice)) { |
135 | - @unlink(references_utils::getModuleOption('images_path') . references_utils::getModuleOption('images_path') . $this->getVar($fieldName)); |
|
135 | + @unlink(references_utils::getModuleOption('images_path').references_utils::getModuleOption('images_path').$this->getVar($fieldName)); |
|
136 | 136 | } |
137 | 137 | $this->setVar($fieldName, ''); |
138 | 138 | } |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function getPictureUrl($indice) |
147 | 147 | { |
148 | - $fieldName = 'article_picture' . $indice; |
|
148 | + $fieldName = 'article_picture'.$indice; |
|
149 | 149 | if (xoops_trim($this->getVar($fieldName)) != '' && $this->pictureExists($indice)) { |
150 | - return references_utils::getModuleOption('images_url') . '/' . $this->getVar($fieldName); |
|
150 | + return references_utils::getModuleOption('images_url').'/'.$this->getVar($fieldName); |
|
151 | 151 | } else { |
152 | - return REFERENCES_IMAGES_URL . 'blank.gif'; |
|
152 | + return REFERENCES_IMAGES_URL.'blank.gif'; |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function getPicturePath($indice) |
163 | 163 | { |
164 | - $fieldName = 'article_picture' . $indice; |
|
164 | + $fieldName = 'article_picture'.$indice; |
|
165 | 165 | if (xoops_trim($this->getVar($fieldName)) != '') { |
166 | - return references_utils::getModuleOption('images_path') . DIRECTORY_SEPARATOR . $this->getVar($fieldName); |
|
166 | + return references_utils::getModuleOption('images_path').DIRECTORY_SEPARATOR.$this->getVar($fieldName); |
|
167 | 167 | } else { |
168 | 168 | return ''; |
169 | 169 | } |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function thumbExists($indice) |
179 | 179 | { |
180 | - $fieldName = 'article_picture' . $indice; |
|
180 | + $fieldName = 'article_picture'.$indice; |
|
181 | 181 | $return = false; |
182 | - if (xoops_trim($this->getVar($fieldName)) != '' && file_exists(references_utils::getModuleOption('images_path') . DIRECTORY_SEPARATOR . REFERENCES_THUMBS_PREFIX . $this->getVar($fieldName))) { |
|
182 | + if (xoops_trim($this->getVar($fieldName)) != '' && file_exists(references_utils::getModuleOption('images_path').DIRECTORY_SEPARATOR.REFERENCES_THUMBS_PREFIX.$this->getVar($fieldName))) { |
|
183 | 183 | $return = true; |
184 | 184 | } |
185 | 185 | |
@@ -194,11 +194,11 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function getThumbUrl($indice) |
196 | 196 | { |
197 | - $fieldName = 'article_picture' . $indice; |
|
197 | + $fieldName = 'article_picture'.$indice; |
|
198 | 198 | if (xoops_trim($this->getVar($fieldName)) != '') { |
199 | - return references_utils::getModuleOption('images_url') . '/' . REFERENCES_THUMBS_PREFIX . $this->getVar($fieldName); |
|
199 | + return references_utils::getModuleOption('images_url').'/'.REFERENCES_THUMBS_PREFIX.$this->getVar($fieldName); |
|
200 | 200 | } else { |
201 | - return REFERENCES_IMAGES_URL . 'blank.gif'; |
|
201 | + return REFERENCES_IMAGES_URL.'blank.gif'; |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | |
@@ -210,9 +210,9 @@ discard block |
||
210 | 210 | */ |
211 | 211 | public function getThumbPath($indice) |
212 | 212 | { |
213 | - $fieldName = 'article_picture' . $indice; |
|
213 | + $fieldName = 'article_picture'.$indice; |
|
214 | 214 | if (xoops_trim($this->getVar($fieldName)) != '') { |
215 | - return references_utils::getModuleOption('images_path') . DIRECTORY_SEPARATOR . REFERENCES_THUMBS_PREFIX . $this->getVar($fieldName); |
|
215 | + return references_utils::getModuleOption('images_path').DIRECTORY_SEPARATOR.REFERENCES_THUMBS_PREFIX.$this->getVar($fieldName); |
|
216 | 216 | } else { |
217 | 217 | return ''; |
218 | 218 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | public function attachmentExists() |
227 | 227 | { |
228 | 228 | $return = false; |
229 | - if (xoops_trim($this->getVar('article_attached_file')) != '' && file_exists(references_utils::getModuleOption('attached_path') . DIRECTORY_SEPARATOR . $this->getVar('article_attached_file'))) { |
|
229 | + if (xoops_trim($this->getVar('article_attached_file')) != '' && file_exists(references_utils::getModuleOption('attached_path').DIRECTORY_SEPARATOR.$this->getVar('article_attached_file'))) { |
|
230 | 230 | $return = true; |
231 | 231 | } |
232 | 232 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | public function getAttachmentUrl() |
242 | 242 | { |
243 | 243 | if (xoops_trim($this->getVar('article_attached_file')) != '' && $this->attachmentExists()) { |
244 | - return references_utils::getModuleOption('attached_url') . '/' . $this->getVar('article_attached_file'); |
|
244 | + return references_utils::getModuleOption('attached_url').'/'.$this->getVar('article_attached_file'); |
|
245 | 245 | } else { |
246 | 246 | return ''; |
247 | 247 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | public function getAttachmentPath() |
256 | 256 | { |
257 | 257 | if (xoops_trim($this->getVar('article_attached_file')) != '' && $this->attachmentExists()) { |
258 | - return references_utils::getModuleOption('attached_path') . DIRECTORY_SEPARATOR . $this->getVar('article_attached_file'); |
|
258 | + return references_utils::getModuleOption('attached_path').DIRECTORY_SEPARATOR.$this->getVar('article_attached_file'); |
|
259 | 259 | } else { |
260 | 260 | return ''; |
261 | 261 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | public function deleteAttachment() |
268 | 268 | { |
269 | 269 | if ($this->attachmentExists()) { |
270 | - @unlink(references_utils::getModuleOption('attached_path') . DIRECTORY_SEPARATOR . $this->getVar('article_attached_file')); |
|
270 | + @unlink(references_utils::getModuleOption('attached_path').DIRECTORY_SEPARATOR.$this->getVar('article_attached_file')); |
|
271 | 271 | } |
272 | 272 | $this->setVar('article_attached_file', ''); |
273 | 273 | } |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | */ |
281 | 281 | public function deleteThumb($indice) |
282 | 282 | { |
283 | - $fieldName = 'article_picture' . $indice; |
|
283 | + $fieldName = 'article_picture'.$indice; |
|
284 | 284 | if ($this->thumbExists($indice)) { |
285 | - @unlink(references_utils::getModuleOption('images_path') . DIRECTORY_SEPARATOR . REFERENCES_THUMBS_PREFIX . $this->getVar($fieldName)); |
|
285 | + @unlink(references_utils::getModuleOption('images_path').DIRECTORY_SEPARATOR.REFERENCES_THUMBS_PREFIX.$this->getVar($fieldName)); |
|
286 | 286 | } |
287 | 287 | } |
288 | 288 | |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | public function getUrl($shortVersion = false) |
351 | 351 | { |
352 | 352 | if (!$shortVersion) { |
353 | - return REFERENCES_URL . 'reference.php?article_id=' . $this->getVar('article_id'); |
|
353 | + return REFERENCES_URL.'reference.php?article_id='.$this->getVar('article_id'); |
|
354 | 354 | } else { |
355 | - return 'reference.php?article_id=' . $this->getVar('article_id'); |
|
355 | + return 'reference.php?article_id='.$this->getVar('article_id'); |
|
356 | 356 | } |
357 | 357 | } |
358 | 358 | |
@@ -375,11 +375,11 @@ discard block |
||
375 | 375 | $ret['article_picture_exists'] = true; |
376 | 376 | for ($i = 1; $i <= 10; ++$i) { |
377 | 377 | if ($this->pictureExists($i)) { |
378 | - $ret['article_picture_url' . $i] = $this->getPictureUrl($i); |
|
379 | - $ret['article_picture_path' . $i] = $this->getPicturePath($i); |
|
378 | + $ret['article_picture_url'.$i] = $this->getPictureUrl($i); |
|
379 | + $ret['article_picture_path'.$i] = $this->getPicturePath($i); |
|
380 | 380 | $ret['article_pictures_urls'][] = $this->getPictureUrl($i); |
381 | 381 | $ret['article_pictures_paths'][] = $this->getPicturePath($i); |
382 | - $fieldName = 'article_picture' . $i . '_text'; |
|
382 | + $fieldName = 'article_picture'.$i.'_text'; |
|
383 | 383 | if (xoops_trim($this->getVar($fieldName)) != '') { |
384 | 384 | $ret['article_pictures_texts'][] = references_utils::makeHrefTitle($this->getVar($fieldName)); |
385 | 385 | } else { |
@@ -404,8 +404,8 @@ discard block |
||
404 | 404 | $ret['article_thumb_exists'] = true; |
405 | 405 | for ($i = 1; $i <= 10; ++$i) { |
406 | 406 | if ($this->thumbExists($i)) { |
407 | - $ret['article_thumb_url' . $i] = $this->getThumbUrl($i); |
|
408 | - $ret['article_thumb_path' . $i] = $this->getThumbPath($i); |
|
407 | + $ret['article_thumb_url'.$i] = $this->getThumbUrl($i); |
|
408 | + $ret['article_thumb_path'.$i] = $this->getThumbPath($i); |
|
409 | 409 | $ret['article_thumbs_urls'][] = $this->getThumbUrl($i); |
410 | 410 | $ret['article_thumbs_paths'][] = $this->getThumbPath($i); |
411 | 411 | } |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $gperm_handler = xoops_getHandler('groupperm'); |
447 | 447 | $categories = $gperm_handler->getItemIds($permissionsType, $groups, $currentModule->getVar('mid')); |
448 | 448 | if (is_array($categories) && count($categories) > 0) { |
449 | - $permissions[$permissionsType] = new Criteria('article_category_id', '(' . implode(',', $categories) . ')', 'IN'); |
|
449 | + $permissions[$permissionsType] = new Criteria('article_category_id', '('.implode(',', $categories).')', 'IN'); |
|
450 | 450 | } else { // Ne peut rien voir |
451 | 451 | $permissions[$permissionsType] = new Criteria('article_category_id', '0', '='); |
452 | 452 | } |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | $criteria->add(new Criteria('article_online', REFERENCES_STATUS_ONLINE, '=')); |
475 | 475 | } |
476 | 476 | if (is_array($categoryId) && count($categoryId) > 0) { |
477 | - $criteria->add(new Criteria('article_category_id', '(' . implode(',', $categoryId) . ')', 'IN')); |
|
477 | + $criteria->add(new Criteria('article_category_id', '('.implode(',', $categoryId).')', 'IN')); |
|
478 | 478 | } elseif ($categoryId > 0) { |
479 | 479 | $criteria->add(new Criteria('article_category_id', $categoryId, '=')); |
480 | 480 | } |
@@ -531,8 +531,8 @@ discard block |
||
531 | 531 | public function getDistinctCategoriesIds() |
532 | 532 | { |
533 | 533 | $ret = array(); |
534 | - $sql = 'SELECT distinct(article_category_id) FROM ' . $this->table; |
|
535 | - $sql .= ' ' . $this->getPermissionsCategoriesCriteria()->renderWhere(); // Permissions |
|
534 | + $sql = 'SELECT distinct(article_category_id) FROM '.$this->table; |
|
535 | + $sql .= ' '.$this->getPermissionsCategoriesCriteria()->renderWhere(); // Permissions |
|
536 | 536 | $sql .= ' GROUP BY article_category_id ORDER BY article_category_id'; |
537 | 537 | $result = $this->db->query($sql); |
538 | 538 | if (!$result) { |
@@ -600,17 +600,17 @@ discard block |
||
600 | 600 | */ |
601 | 601 | public function moveUp($currentId, $currentOrder) |
602 | 602 | { |
603 | - $sql_plus = 'SELECT article_id FROM ' . $this->table . ' WHERE article_weight = ' . ((int)$currentOrder - 1); |
|
603 | + $sql_plus = 'SELECT article_id FROM '.$this->table.' WHERE article_weight = '.((int) $currentOrder - 1); |
|
604 | 604 | $res_plus = $this->db->query($sql_plus); |
605 | 605 | if ($this->db->getRowsNum($res_plus) == 0) { |
606 | 606 | return; |
607 | 607 | } |
608 | 608 | $row_plus = $this->db->fetchArray($res_plus); |
609 | 609 | |
610 | - $upd1 = 'UPDATE ' . $this->table . ' SET article_weight = (article_weight + 1) WHERE article_id = ' . $row_plus['article_id']; |
|
610 | + $upd1 = 'UPDATE '.$this->table.' SET article_weight = (article_weight + 1) WHERE article_id = '.$row_plus['article_id']; |
|
611 | 611 | $this->db->queryF($upd1); |
612 | 612 | |
613 | - $upd2 = 'UPDATE ' . $this->table . ' SET article_weight = (article_weight - 1) WHERE article_id = ' . (int)$currentId; |
|
613 | + $upd2 = 'UPDATE '.$this->table.' SET article_weight = (article_weight - 1) WHERE article_id = '.(int) $currentId; |
|
614 | 614 | $this->db->queryF($upd2); |
615 | 615 | $this->forceCacheClean(); |
616 | 616 | } |
@@ -624,17 +624,17 @@ discard block |
||
624 | 624 | */ |
625 | 625 | public function moveDown($currentId, $currentOrder) |
626 | 626 | { |
627 | - $sql_moins = 'SELECT article_id FROM ' . $this->table . ' WHERE article_weight = ' . ((int)$currentOrder + 1); |
|
627 | + $sql_moins = 'SELECT article_id FROM '.$this->table.' WHERE article_weight = '.((int) $currentOrder + 1); |
|
628 | 628 | $res_moins = $this->db->query($sql_moins); |
629 | 629 | if ($this->db->getRowsNum($res_moins) == 0) { |
630 | 630 | return; |
631 | 631 | } |
632 | 632 | |
633 | 633 | $row_moins = $this->db->fetchArray($res_moins); |
634 | - $upd1 = 'UPDATE ' . $this->table . ' SET article_weight = (article_weight - 1) WHERE article_id = ' . $row_moins['article_id']; |
|
634 | + $upd1 = 'UPDATE '.$this->table.' SET article_weight = (article_weight - 1) WHERE article_id = '.$row_moins['article_id']; |
|
635 | 635 | $this->db->queryF($upd1); |
636 | 636 | |
637 | - $upd2 = 'UPDATE ' . $this->table . ' SET article_weight =( article_weight + 1) WHERE article_id = ' . (int)$currentId; |
|
637 | + $upd2 = 'UPDATE '.$this->table.' SET article_weight =( article_weight + 1) WHERE article_id = '.(int) $currentId; |
|
638 | 638 | $this->db->queryF($upd2); |
639 | 639 | $this->forceCacheClean(); |
640 | 640 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | protected function _getIdForCache($query, $start, $limit) |
131 | 131 | { |
132 | - $id = md5($query . '-' . (string)$start . '-' . (string)$limit); |
|
132 | + $id = md5($query.'-'.(string) $start.'-'.(string) $limit); |
|
133 | 133 | |
134 | 134 | return $id; |
135 | 135 | } |
@@ -164,17 +164,17 @@ discard block |
||
164 | 164 | $criteria = new CriteriaCompo(); |
165 | 165 | $vnb = count($this->keyName); |
166 | 166 | for ($i = 0; $i < $vnb; ++$i) { |
167 | - $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i])); |
|
167 | + $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i])); |
|
168 | 168 | } |
169 | 169 | } else { |
170 | - $criteria = new Criteria($this->keyName, (int)$id); |
|
170 | + $criteria = new Criteria($this->keyName, (int) $id); |
|
171 | 171 | } |
172 | 172 | $criteria->setLimit(1); |
173 | - $obj_array =& $this->getObjects($criteria, false, $as_object); |
|
173 | + $obj_array = & $this->getObjects($criteria, false, $as_object); |
|
174 | 174 | if (count($obj_array) != 1) { |
175 | 175 | $ret = null; |
176 | 176 | } else { |
177 | - $ret =& $obj_array[0]; |
|
177 | + $ret = & $obj_array[0]; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | return $ret; |
@@ -193,19 +193,19 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function &getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true, $fields = '*', $autoSort = true) |
195 | 195 | { |
196 | - require_once __DIR__ . '/lite.php'; |
|
196 | + require_once __DIR__.'/lite.php'; |
|
197 | 197 | $ret = array(); |
198 | 198 | $limit = $start = 0; |
199 | - $sql = 'SELECT ' . $fields . ' FROM ' . $this->table; |
|
199 | + $sql = 'SELECT '.$fields.' FROM '.$this->table; |
|
200 | 200 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
201 | - $sql .= ' ' . $criteria->renderWhere(); |
|
201 | + $sql .= ' '.$criteria->renderWhere(); |
|
202 | 202 | if ($criteria->groupby != '') { |
203 | 203 | $sql .= $criteria->getGroupby(); |
204 | 204 | } |
205 | 205 | if ($criteria->getSort() != '') { |
206 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
206 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
207 | 207 | } elseif ($this->identifierName != '' && $autoSort) { |
208 | - $sql .= ' ORDER BY ' . $this->identifierName; |
|
208 | + $sql .= ' ORDER BY '.$this->identifierName; |
|
209 | 209 | } |
210 | 210 | $limit = $criteria->getLimit(); |
211 | 211 | $start = $criteria->getStart(); |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | { |
242 | 242 | $ret = array(); |
243 | 243 | while ($myrow = $this->db->fetchArray($result)) { |
244 | - $obj =& $this->create(false); |
|
244 | + $obj = & $this->create(false); |
|
245 | 245 | $obj->assignVars($myrow); |
246 | 246 | if (!$id_as_key) { |
247 | 247 | if ($as_object) { |
248 | - $ret[] =& $obj; |
|
248 | + $ret[] = & $obj; |
|
249 | 249 | } else { |
250 | 250 | $row = array(); |
251 | 251 | $vars = $obj->getVars(); |
@@ -258,9 +258,9 @@ discard block |
||
258 | 258 | } else { |
259 | 259 | if ($as_object) { |
260 | 260 | if ($fields === '*') { |
261 | - $ret[$myrow[$this->keyName]] =& $obj; |
|
261 | + $ret[$myrow[$this->keyName]] = & $obj; |
|
262 | 262 | } else { |
263 | - $ret[] =& $obj; |
|
263 | + $ret[] = & $obj; |
|
264 | 264 | } |
265 | 265 | } else { |
266 | 266 | $row = array(); |
@@ -286,20 +286,20 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function getIds($criteria = null) |
288 | 288 | { |
289 | - require_once __DIR__ . '/lite.php'; |
|
289 | + require_once __DIR__.'/lite.php'; |
|
290 | 290 | $limit = $start = 0; |
291 | 291 | |
292 | 292 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
293 | - $sql = 'SELECT ' . $this->keyName . ' FROM ' . $this->table; |
|
293 | + $sql = 'SELECT '.$this->keyName.' FROM '.$this->table; |
|
294 | 294 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
295 | - $sql .= ' ' . $criteria->renderWhere(); |
|
295 | + $sql .= ' '.$criteria->renderWhere(); |
|
296 | 296 | if ($criteria->groupby != '') { |
297 | 297 | $sql .= $criteria->getGroupby(); |
298 | 298 | } |
299 | 299 | if ($criteria->getSort() != '') { |
300 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
300 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
301 | 301 | } elseif ($this->identifierName != '') { |
302 | - $sql .= ' ORDER BY ' . $this->identifierName; |
|
302 | + $sql .= ' ORDER BY '.$this->identifierName; |
|
303 | 303 | } |
304 | 304 | $limit = $criteria->getLimit(); |
305 | 305 | $start = $criteria->getStart(); |
@@ -329,26 +329,26 @@ discard block |
||
329 | 329 | */ |
330 | 330 | public function getList($criteria = null) |
331 | 331 | { |
332 | - require_once __DIR__ . '/lite.php'; |
|
332 | + require_once __DIR__.'/lite.php'; |
|
333 | 333 | $limit = $start = 0; |
334 | 334 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
335 | 335 | |
336 | 336 | $ret = array(); |
337 | 337 | |
338 | - $sql = 'SELECT ' . $this->keyName; |
|
338 | + $sql = 'SELECT '.$this->keyName; |
|
339 | 339 | if (!empty($this->identifierName)) { |
340 | - $sql .= ', ' . $this->identifierName; |
|
340 | + $sql .= ', '.$this->identifierName; |
|
341 | 341 | } |
342 | - $sql .= ' FROM ' . $this->table; |
|
342 | + $sql .= ' FROM '.$this->table; |
|
343 | 343 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
344 | - $sql .= ' ' . $criteria->renderWhere(); |
|
344 | + $sql .= ' '.$criteria->renderWhere(); |
|
345 | 345 | if ($criteria->groupby != '') { |
346 | 346 | $sql .= $criteria->getGroupby(); |
347 | 347 | } |
348 | 348 | if ($criteria->getSort() != '') { |
349 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
349 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
350 | 350 | } elseif ($this->identifierName != '') { |
351 | - $sql .= ' ORDER BY ' . $this->identifierName; |
|
351 | + $sql .= ' ORDER BY '.$this->identifierName; |
|
352 | 352 | } |
353 | 353 | $limit = $criteria->getLimit(); |
354 | 354 | $start = $criteria->getStart(); |
@@ -389,11 +389,11 @@ discard block |
||
389 | 389 | $ret = array(); |
390 | 390 | if (is_array($ids) && count($ids) > 0) { |
391 | 391 | $criteria = new CriteriaCompo(); |
392 | - $criteria->add(new Criteria($this->keyName, '(' . implode(',', $ids) . ')', 'IN')); |
|
392 | + $criteria->add(new Criteria($this->keyName, '('.implode(',', $ids).')', 'IN')); |
|
393 | 393 | if (!is_null($additionnal)) { |
394 | 394 | $criteria->add($additionnal); |
395 | 395 | } |
396 | - $ret =& $this->getObjects($criteria, true); |
|
396 | + $ret = & $this->getObjects($criteria, true); |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | return $ret; |
@@ -410,17 +410,17 @@ discard block |
||
410 | 410 | $field = ''; |
411 | 411 | $groupby = false; |
412 | 412 | $limit = $start = 0; |
413 | - require_once __DIR__ . '/lite.php'; |
|
413 | + require_once __DIR__.'/lite.php'; |
|
414 | 414 | |
415 | 415 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
416 | 416 | if ($criteria->groupby != '') { |
417 | 417 | $groupby = true; |
418 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
418 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
419 | 419 | } |
420 | 420 | } |
421 | - $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table; |
|
421 | + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; |
|
422 | 422 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
423 | - $sql .= ' ' . $criteria->renderWhere(); |
|
423 | + $sql .= ' '.$criteria->renderWhere(); |
|
424 | 424 | if ($criteria->groupby != '') { |
425 | 425 | $sql .= $criteria->getGroupby(); |
426 | 426 | } |
@@ -467,11 +467,11 @@ discard block |
||
467 | 467 | public function getSum($field, $criteria = null) |
468 | 468 | { |
469 | 469 | $limit = $start = 0; |
470 | - require_once __DIR__ . '/lite.php'; |
|
470 | + require_once __DIR__.'/lite.php'; |
|
471 | 471 | |
472 | - $sql = 'SELECT Sum(' . $field . ') as cpt FROM ' . $this->table; |
|
472 | + $sql = 'SELECT Sum('.$field.') as cpt FROM '.$this->table; |
|
473 | 473 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
474 | - $sql .= ' ' . $criteria->renderWhere(); |
|
474 | + $sql .= ' '.$criteria->renderWhere(); |
|
475 | 475 | if ($criteria->groupby != '') { |
476 | 476 | $sql .= $criteria->getGroupby(); |
477 | 477 | } |
@@ -512,13 +512,13 @@ discard block |
||
512 | 512 | $clause = array(); |
513 | 513 | $vnb = count($this->keyName); |
514 | 514 | for ($i = 0; $i < $vnb; ++$i) { |
515 | - $clause[] = $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
515 | + $clause[] = $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
516 | 516 | } |
517 | 517 | $whereclause = implode(' AND ', $clause); |
518 | 518 | } else { |
519 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
519 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
520 | 520 | } |
521 | - $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
521 | + $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause; |
|
522 | 522 | if (false != $force) { |
523 | 523 | $result = $this->db->queryF($sql); |
524 | 524 | } else { |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | { |
546 | 546 | $object = $this->create(true); |
547 | 547 | $object->setVars($vars); |
548 | - $retval =& $this->insert($object, $force); |
|
548 | + $retval = & $this->insert($object, $force); |
|
549 | 549 | unset($object); |
550 | 550 | |
551 | 551 | // Clear cache |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 |
577 | 577 | */ |
578 | 578 | if (!is_a($obj, $this->className)) { |
579 | - $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className); |
|
579 | + $obj->setErrors(get_class($obj).' Differs from '.$this->className); |
|
580 | 580 | |
581 | 581 | return false; |
582 | 582 | } |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | } |
596 | 596 | foreach ($obj->cleanVars as $k => $v) { |
597 | 597 | if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { |
598 | - $cleanvars[$k] = (int)$v; |
|
598 | + $cleanvars[$k] = (int) $v; |
|
599 | 599 | } elseif (is_array($v)) { |
600 | 600 | $cleanvars[$k] = $this->db->quoteString(implode(',', $v)); |
601 | 601 | } else { |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | if ($obj->isNew()) { |
609 | 609 | if (!is_array($this->keyName)) { |
610 | 610 | if ($cleanvars[$this->keyName] < 1) { |
611 | - $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq'); |
|
611 | + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); |
|
612 | 612 | } |
613 | 613 | } |
614 | 614 | $ignore = ''; |
615 | 615 | if ($ignoreInsert) { |
616 | 616 | $ignore = 'IGNORE'; |
617 | 617 | } |
618 | - $sql = "INSERT $ignore INTO " . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')'; |
|
618 | + $sql = "INSERT $ignore INTO ".$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')'; |
|
619 | 619 | } else { |
620 | - $sql = 'UPDATE ' . $this->table . ' SET'; |
|
620 | + $sql = 'UPDATE '.$this->table.' SET'; |
|
621 | 621 | foreach ($cleanvars as $key => $value) { |
622 | 622 | if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { |
623 | 623 | continue; |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | if (isset($notfirst)) { |
626 | 626 | $sql .= ','; |
627 | 627 | } |
628 | - $sql .= ' ' . $key . ' = ' . $value; |
|
628 | + $sql .= ' '.$key.' = '.$value; |
|
629 | 629 | $notfirst = true; |
630 | 630 | } |
631 | 631 | if (is_array($this->keyName)) { |
@@ -635,12 +635,12 @@ discard block |
||
635 | 635 | if ($i > 0) { |
636 | 636 | $whereclause .= ' AND '; |
637 | 637 | } |
638 | - $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
638 | + $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
639 | 639 | } |
640 | 640 | } else { |
641 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
641 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
642 | 642 | } |
643 | - $sql .= ' WHERE ' . $whereclause; |
|
643 | + $sql .= ' WHERE '.$whereclause; |
|
644 | 644 | } |
645 | 645 | |
646 | 646 | if (false != $force) { |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | */ |
675 | 675 | public function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false) |
676 | 676 | { |
677 | - $set_clause = $fieldname . ' = '; |
|
677 | + $set_clause = $fieldname.' = '; |
|
678 | 678 | if (is_numeric($fieldvalue)) { |
679 | 679 | $set_clause .= $fieldvalue; |
680 | 680 | } elseif (is_array($fieldvalue)) { |
@@ -682,9 +682,9 @@ discard block |
||
682 | 682 | } else { |
683 | 683 | $set_clause .= $this->db->quoteString($fieldvalue); |
684 | 684 | } |
685 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $set_clause; |
|
685 | + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; |
|
686 | 686 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
687 | - $sql .= ' ' . $criteria->renderWhere(); |
|
687 | + $sql .= ' '.$criteria->renderWhere(); |
|
688 | 688 | } |
689 | 689 | if ($force) { |
690 | 690 | $result = $this->db->queryF($sql); |
@@ -732,8 +732,8 @@ discard block |
||
732 | 732 | public function deleteAll($criteria = null) |
733 | 733 | { |
734 | 734 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
735 | - $sql = 'DELETE FROM ' . $this->table; |
|
736 | - $sql .= ' ' . $criteria->renderWhere(); |
|
735 | + $sql = 'DELETE FROM '.$this->table; |
|
736 | + $sql .= ' '.$criteria->renderWhere(); |
|
737 | 737 | if (!$this->db->queryF($sql)) { |
738 | 738 | return false; |
739 | 739 | } |
@@ -779,15 +779,15 @@ discard block |
||
779 | 779 | */ |
780 | 780 | public function getDistincts($field, $criteria = null, $format = 's') |
781 | 781 | { |
782 | - require_once __DIR__ . '/lite.php'; |
|
782 | + require_once __DIR__.'/lite.php'; |
|
783 | 783 | $limit = $start = 0; |
784 | - $sql = 'SELECT ' . $this->keyName . ', ' . $field . ' FROM ' . $this->table; |
|
784 | + $sql = 'SELECT '.$this->keyName.', '.$field.' FROM '.$this->table; |
|
785 | 785 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
786 | - $sql .= ' ' . $criteria->renderWhere(); |
|
786 | + $sql .= ' '.$criteria->renderWhere(); |
|
787 | 787 | $limit = $criteria->getLimit(); |
788 | 788 | $start = $criteria->getStart(); |
789 | 789 | } |
790 | - $sql .= ' GROUP BY ' . $field . ' ORDER BY ' . $field; |
|
790 | + $sql .= ' GROUP BY '.$field.' ORDER BY '.$field; |
|
791 | 791 | |
792 | 792 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
793 | 793 | $id = $this->_getIdForCache($sql, $start, $limit); |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | $critere->setStart($start); |
836 | 836 | $critere->setSort($sort); |
837 | 837 | $critere->setOrder($order); |
838 | - $items =& $this->getObjects($critere, $idAsKey); |
|
838 | + $items = & $this->getObjects($critere, $idAsKey); |
|
839 | 839 | |
840 | 840 | return $items; |
841 | 841 | } |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | */ |
846 | 846 | public function forceCacheClean() |
847 | 847 | { |
848 | - require_once __DIR__ . '/lite.php'; |
|
848 | + require_once __DIR__.'/lite.php'; |
|
849 | 849 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
850 | 850 | $Cache_Lite->clean(); |
851 | 851 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | $handlersNames = array('references_articles', 'references_categories'); |
37 | 37 | foreach ($handlersNames as $handlerName) { |
38 | - $internalName = 'h_' . $handlerName; |
|
38 | + $internalName = 'h_'.$handlerName; |
|
39 | 39 | $this->$internalName = xoops_getModuleHandler($handlerName, REFERENCES_DIRNAME); |
40 | 40 | } |
41 | 41 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | class references_registryfile |
23 | 23 | { |
24 | - public $filename; // Nom du fichier � traiter |
|
24 | + public $filename; // Nom du fichier � traiter |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Access the only instance of this class |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public function setfile($fichier = null) |
50 | 50 | { |
51 | 51 | if ($fichier) { |
52 | - $this->filename = XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . $fichier; |
|
52 | + $this->filename = XOOPS_UPLOAD_PATH.DIRECTORY_SEPARATOR.$fichier; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (!$fichier) { |
60 | 60 | $fw = $this->filename; |
61 | 61 | } else { |
62 | - $fw = XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . $fichier; |
|
62 | + $fw = XOOPS_UPLOAD_PATH.DIRECTORY_SEPARATOR.$fichier; |
|
63 | 63 | } |
64 | 64 | if (file_exists($fw)) { |
65 | 65 | return file_get_contents($fw); |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | if (!$fichier) { |
75 | 75 | $fw = $this->filename; |
76 | 76 | } else { |
77 | - $fw = XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . $fichier; |
|
77 | + $fw = XOOPS_UPLOAD_PATH.DIRECTORY_SEPARATOR.$fichier; |
|
78 | 78 | } |
79 | 79 | if (file_exists($fw)) { |
80 | 80 | @unlink($fw); |
81 | 81 | } |
82 | - $fp = fopen($fw, 'w') || exit('Error, impossible to create the file ' . $this->filename); |
|
82 | + $fp = fopen($fw, 'w') || exit('Error, impossible to create the file '.$this->filename); |
|
83 | 83 | fwrite($fp, $content); |
84 | 84 | fclose($fp); |
85 | 85 |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | $suffix = '.so'; |
764 | 764 | } |
765 | 765 | |
766 | - return @dl('php_' . $ext . $suffix) || @dl($ext . $suffix); |
|
766 | + return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix); |
|
767 | 767 | } |
768 | 768 | |
769 | 769 | return true; |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | unset($this->backtrace[0]['object']); |
878 | 878 | } |
879 | 879 | } |
880 | - if ($mode & references_PEAR_ERROR_CALLBACK) { |
|
880 | + if ($mode&references_PEAR_ERROR_CALLBACK) { |
|
881 | 881 | $this->level = E_USER_NOTICE; |
882 | 882 | $this->callback = $options; |
883 | 883 | } else { |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | $this->level = $options; |
888 | 888 | $this->callback = null; |
889 | 889 | } |
890 | - if ($this->mode & references_PEAR_ERROR_PRINT) { |
|
890 | + if ($this->mode&references_PEAR_ERROR_PRINT) { |
|
891 | 891 | if (is_null($options) || is_int($options)) { |
892 | 892 | $format = '%s'; |
893 | 893 | } else { |
@@ -895,10 +895,10 @@ discard block |
||
895 | 895 | } |
896 | 896 | printf($format, $this->getMessage()); |
897 | 897 | } |
898 | - if ($this->mode & references_PEAR_ERROR_TRIGGER) { |
|
898 | + if ($this->mode&references_PEAR_ERROR_TRIGGER) { |
|
899 | 899 | trigger_error($this->getMessage(), $this->level); |
900 | 900 | } |
901 | - if ($this->mode & references_PEAR_ERROR_DIE) { |
|
901 | + if ($this->mode&references_PEAR_ERROR_DIE) { |
|
902 | 902 | $msg = $this->getMessage(); |
903 | 903 | if (is_null($options) || is_int($options)) { |
904 | 904 | $format = '%s'; |
@@ -910,12 +910,12 @@ discard block |
||
910 | 910 | } |
911 | 911 | die(sprintf($format, $msg)); |
912 | 912 | } |
913 | - if ($this->mode & references_PEAR_ERROR_CALLBACK) { |
|
913 | + if ($this->mode&references_PEAR_ERROR_CALLBACK) { |
|
914 | 914 | if (is_callable($this->callback)) { |
915 | 915 | call_user_func($this->callback, $this); |
916 | 916 | } |
917 | 917 | } |
918 | - if ($this->mode & references_PEAR_ERROR_EXCEPTION) { |
|
918 | + if ($this->mode&references_PEAR_ERROR_EXCEPTION) { |
|
919 | 919 | trigger_error('references_PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions', E_USER_WARNING); |
920 | 920 | eval('$e = new Exception($this->message, $this->code);throw($e);'); |
921 | 921 | } |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | */ |
961 | 961 | public function getMessage() |
962 | 962 | { |
963 | - return ($this->error_message_prefix . $this->message); |
|
963 | + return ($this->error_message_prefix.$this->message); |
|
964 | 964 | } |
965 | 965 | |
966 | 966 | // }}} |
@@ -1071,29 +1071,29 @@ discard block |
||
1071 | 1071 | E_USER_WARNING => 'warning', |
1072 | 1072 | E_USER_ERROR => 'error' |
1073 | 1073 | ); |
1074 | - if ($this->mode & references_PEAR_ERROR_CALLBACK) { |
|
1074 | + if ($this->mode&references_PEAR_ERROR_CALLBACK) { |
|
1075 | 1075 | if (is_array($this->callback)) { |
1076 | - $callback = (is_object($this->callback[0]) ? strtolower(get_class($this->callback[0])) : $this->callback[0]) . '::' . $this->callback[1]; |
|
1076 | + $callback = (is_object($this->callback[0]) ? strtolower(get_class($this->callback[0])) : $this->callback[0]).'::'.$this->callback[1]; |
|
1077 | 1077 | } else { |
1078 | 1078 | $callback = $this->callback; |
1079 | 1079 | } |
1080 | 1080 | |
1081 | - return sprintf('[%s: message="%s" code=%d mode=callback ' . 'callback=%s prefix="%s" info="%s"]', strtolower(get_class($this)), $this->message, $this->code, $callback, $this->error_message_prefix, $this->userinfo); |
|
1081 | + return sprintf('[%s: message="%s" code=%d mode=callback '.'callback=%s prefix="%s" info="%s"]', strtolower(get_class($this)), $this->message, $this->code, $callback, $this->error_message_prefix, $this->userinfo); |
|
1082 | 1082 | } |
1083 | - if ($this->mode & references_PEAR_ERROR_PRINT) { |
|
1083 | + if ($this->mode&references_PEAR_ERROR_PRINT) { |
|
1084 | 1084 | $modes[] = 'print'; |
1085 | 1085 | } |
1086 | - if ($this->mode & references_PEAR_ERROR_TRIGGER) { |
|
1086 | + if ($this->mode&references_PEAR_ERROR_TRIGGER) { |
|
1087 | 1087 | $modes[] = 'trigger'; |
1088 | 1088 | } |
1089 | - if ($this->mode & references_PEAR_ERROR_DIE) { |
|
1089 | + if ($this->mode&references_PEAR_ERROR_DIE) { |
|
1090 | 1090 | $modes[] = 'die'; |
1091 | 1091 | } |
1092 | - if ($this->mode & references_PEAR_ERROR_RETURN) { |
|
1092 | + if ($this->mode&references_PEAR_ERROR_RETURN) { |
|
1093 | 1093 | $modes[] = 'return'; |
1094 | 1094 | } |
1095 | 1095 | |
1096 | - return sprintf('[%s: message="%s" code=%d mode=%s level=%s ' . 'prefix="%s" info="%s"]', strtolower(get_class($this)), $this->message, $this->code, implode('|', $modes), $levels[$this->level], $this->error_message_prefix, $this->userinfo); |
|
1096 | + return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.'prefix="%s" info="%s"]', strtolower(get_class($this)), $this->message, $this->code, implode('|', $modes), $levels[$this->level], $this->error_message_prefix, $this->userinfo); |
|
1097 | 1097 | } |
1098 | 1098 | |
1099 | 1099 | // }}} |