From a0192795f632a7a34668746d1c33dc2bc063d591 Mon Sep 17 00:00:00 2001 From: Damien Seguy Date: Tue, 19 May 2015 14:33:48 +0200 Subject: [PATCH] Remove concatenation --- install.php | 8 +++---- site-beginner/templates/basic-page.php | 2 +- site-beginner/templates/home.php | 2 +- site-languages/templates/_main.php | 6 ++--- .../AdminTheme/AdminThemeDefault/default.php | 4 ++-- .../AdminTheme/AdminThemeReno/debug.inc | 22 ++++++++--------- .../AdminTheme/AdminThemeReno/default.php | 2 +- .../asmselect/examples/example_results.php | 2 +- .../InputfieldPageTableAjax.php | 2 +- wire/templates-admin/debug.inc | 24 +++++++++---------- wire/templates-admin/default.php | 2 +- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/install.php b/install.php index 9ecfe781..ba91c8db 100644 --- a/install.php +++ b/install.php @@ -421,8 +421,8 @@ protected function dbConfig($values = array()) { $this->input('dbCharset', 'DB Charset', $values['dbCharset']); echo "


"; echo "

"; echo ""; @@ -496,7 +496,7 @@ protected function dbConfig($values = array()) { $this->p("What host names will this installation run on now and in the future? Please enter one host per line. You may also choose to leave this blank to auto-detect on each request, but we recommend using this whitelist for the best security in production environments."); $this->p("This field is recommended but not required. You can set this later by editing the file /site/config.php (setting \$config->httpHosts).", "detail"); $rows = substr_count($values['httpHosts'], "\n") + 2; - echo "

"; + echo "

"; $this->btn("Continue", 4); @@ -871,7 +871,7 @@ protected function adminAccount($wire = null) { $this->input("admin_name", "Admin Login URL", $clean['admin_name'], false, "name"); $js = "$('link#colors').attr('href', $('link#colors').attr('href').replace(/main-.*$/, 'main-' + $(this).val() + '.css'))"; echo "

Change for a live preview

"; $this->p(" You can change the admin URL later by editing the admin page and changing the name on the settings tab.
You can change the colors later by going to Admin Modules Core Admin Theme Settings.", "detail"); diff --git a/site-beginner/templates/basic-page.php b/site-beginner/templates/basic-page.php index ea02e1ad..69a3e19d 100644 --- a/site-beginner/templates/basic-page.php +++ b/site-beginner/templates/basic-page.php @@ -3,7 +3,7 @@
" . $page->get('headline|title') . ""; + echo "

" , $page->get('headline|title') , "

"; // output bodycopy echo $page->body; diff --git a/site-beginner/templates/home.php b/site-beginner/templates/home.php index 9878aab8..8fb9f76e 100644 --- a/site-beginner/templates/home.php +++ b/site-beginner/templates/home.php @@ -3,7 +3,7 @@
" . $page->get('headline|title') . ""; + echo "

" , $page->get('headline|title') , "

"; // output bodycopy echo $page->body; diff --git a/site-languages/templates/_main.php b/site-languages/templates/_main.php index 9fac69d3..f0f49c0d 100644 --- a/site-languages/templates/_main.php +++ b/site-languages/templates/_main.php @@ -88,7 +88,7 @@ } // output an "Edit" link if this page happens to be editable by the current user - if($page->editable()) echo "
  • " . __('Edit') . "
  • "; + if($page->editable()) echo "
  • " , __('Edit') , "
  • "; ?> @@ -138,10 +138,10 @@ isLoggedin()) { // if user is logged in, show a logout link - echo "" . sprintf(__('Logout (%s)'), $user->name) . ""; + echo "" , sprintf(__('Logout (%s)'), $user->name) , ""; } else { // if user not logged in, show a login link - echo "" . __('Admin Login') . ""; + echo "" , __('Admin Login') , ""; } ?> diff --git a/wire/modules/AdminTheme/AdminThemeDefault/default.php b/wire/modules/AdminTheme/AdminThemeDefault/default.php index c4bc4474..ee281308 100644 --- a/wire/modules/AdminTheme/AdminThemeDefault/default.php +++ b/wire/modules/AdminTheme/AdminThemeDefault/default.php @@ -64,7 +64,7 @@ isLoggedin()) { echo $searchForm; - echo "\n\n
      " . $helpers->renderTopNavItems() . "
    "; + echo "\n\n
      " , $helpers->renderTopNavItems() , "
    "; } echo $extras['masthead']; ?> @@ -111,7 +111,7 @@ _('Logout'); ?> - ProcessWire versionName . ' © + ProcessWire versionName , ' ©

    $value) { if(!is_object($value)) continue; - echo "\n\$$key" . - "" . get_class($value) . ""; + echo "\n\$$key" , + "" , get_class($value) , ""; } ?> @@ -64,7 +64,7 @@ foreach($session as $key => $value) { if(is_object($value)) $value = (string) $value; if(is_array($value)) $value = print_r($value, true); - echo "$key
    " . $sanitizer->entities($value) . "
    "; + echo "$key
    " , $sanitizer->entities($value) , "
    "; } ?> @@ -104,7 +104,7 @@

    @@ -133,11 +133,11 @@ $toMethod = $hook['toMethod']; if(is_callable($toMethod)) $toMethod = 'anonymous function'; echo ""; - echo "" . ($hook['options']['before'] ? 'before ' : '') . ($hook['options']['after'] ? 'after' : '') . ""; - echo "" . ($hook['options']['fromClass'] ? $hook['options']['fromClass'] . '::' : '') . "$hook[method]$suffix"; - echo "" . ($toObject ? "$toObject::$toMethod" : $toMethod) . "()"; - echo "" . ($hook['options']['allInstances'] || $hook['options']['fromClass'] ? "class " : "instance ") . $hook['options']['type'] . ""; - echo "" . $hook['options']['priority'] . ""; + echo "" , ($hook['options']['before'] ? 'before ' : '') , ($hook['options']['after'] ? 'after' : '') , ""; + echo "" , ($hook['options']['fromClass'] ? $hook['options']['fromClass'] . '::' : '') , "$hook[method]$suffix"; + echo "" , ($toObject ? "$toObject::$toMethod" : $toMethod) , "()"; + echo "" , ($hook['options']['allInstances'] || $hook['options']['fromClass'] ? "class " : "instance ") , $hook['options']['type'] , ""; + echo "" , $hook['options']['priority'] , ""; echo ""; } ?> @@ -192,7 +192,7 @@ Debug::saveTimer('timer-name', 'optional notes'); // stop and save timer

    Mysqli was instantiated but no queries executed. Here are the callers that should be converted to PDO:

    - + $value) { if(is_array($value)) $value = print_r($value, true); - echo "" . $sanitizer->entities($key) . "
    " . $sanitizer->entities($value) . "
    "; + echo "" , $sanitizer->entities($key) , "
    " , $sanitizer->entities($value) , "
    "; } ?> diff --git a/wire/modules/AdminTheme/AdminThemeReno/default.php b/wire/modules/AdminTheme/AdminThemeReno/default.php index db33dfa0..dfdf2895 100644 --- a/wire/modules/AdminTheme/AdminThemeReno/default.php +++ b/wire/modules/AdminTheme/AdminThemeReno/default.php @@ -118,7 +118,7 @@ _('Logout'); ?> - ProcessWire versionName . ' © + ProcessWire versionName , ' ©

    " . htmlspecialchars($city) . ""; + echo "\n\t
  • " , htmlspecialchars($city) , "
  • "; } echo "\n"; diff --git a/wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTableAjax.php b/wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTableAjax.php index 1dea0813..aae5e459 100644 --- a/wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTableAjax.php +++ b/wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTableAjax.php @@ -81,7 +81,7 @@ protected function renderAjax(Page $page, Field $field) { if(!$inputfield) return; echo $inputfield->render(); if($this->notes) { - echo "

    " . $this->wire('sanitizer')->entities($this->notes) . "

    "; + echo "

    " , $this->wire('sanitizer')->entities($this->notes) , "

    "; $this->notes = ''; } exit; diff --git a/wire/templates-admin/debug.inc b/wire/templates-admin/debug.inc index 6f01f290..49f73e42 100644 --- a/wire/templates-admin/debug.inc +++ b/wire/templates-admin/debug.inc @@ -45,8 +45,8 @@ $value) { if(!is_object($value)) continue; - echo "\n\$$key" . - "" . get_class($value) . ""; + echo "\n\$$key" , + "" , get_class($value) , ""; } ?> @@ -71,7 +71,7 @@ foreach($session as $key => $value) { if(is_object($value)) $value = (string) $value; if(is_array($value)) $value = print_r($value, true); - echo "$key
    " . $sanitizer->entities($value) . "
    "; + echo "$key
    " , $sanitizer->entities($value) , "
    "; } ?> @@ -113,7 +113,7 @@

    @@ -144,11 +144,11 @@ $toMethod = $hook['toMethod']; if(is_callable($toMethod)) $toMethod = 'anonymous function'; echo ""; - echo "" . ($hook['options']['before'] ? 'before ' : '') . ($hook['options']['after'] ? 'after' : '') . ""; - echo "" . ($hook['options']['fromClass'] ? $hook['options']['fromClass'] . '::' : '') . "$hook[method]$suffix"; - echo "" . ($toObject ? "$toObject::$toMethod" : $toMethod) . "()"; - echo "" . ($hook['options']['allInstances'] || $hook['options']['fromClass'] ? "class " : "instance ") . $hook['options']['type'] . ""; - echo "" . $hook['options']['priority'] . ""; + echo "" , ($hook['options']['before'] ? 'before ' : '') , ($hook['options']['after'] ? 'after' : '') , ""; + echo "" , ($hook['options']['fromClass'] ? $hook['options']['fromClass'] . '::' : '') , "$hook[method]$suffix"; + echo "" , ($toObject ? "$toObject::$toMethod" : $toMethod) , "()"; + echo "" , ($hook['options']['allInstances'] || $hook['options']['fromClass'] ? "class " : "instance ") , $hook['options']['type'] , ""; + echo "" , $hook['options']['priority'] , ""; echo ""; } ?> @@ -207,7 +207,7 @@ Debug::saveTimer('timer-name', 'optional notes'); // stop and save timer

    Mysqli was instantiated but no queries executed. Here are the callers that should be converted to PDO:

    - + $value) { if(is_array($value)) $value = print_r($value, true); - echo "" . $sanitizer->entities($key) . "
    " . $sanitizer->entities($value) . "
    "; + echo "" , $sanitizer->entities($key) , "
    " , $sanitizer->entities($value) , "
    "; } ?> @@ -272,7 +272,7 @@ Debug::saveTimer('timer-name', 'optional notes'); // stop and save timer getInfo() as $info) { echo ""; + echo $sanitizer->entities($info['name']) , ""; foreach($info as $key => $value) { if($key == 'name') continue; if($key == 'size') $value = wireBytesStr($value); diff --git a/wire/templates-admin/default.php b/wire/templates-admin/default.php index 8a6b76d8..8a927280 100644 --- a/wire/templates-admin/default.php +++ b/wire/templates-admin/default.php @@ -154,7 +154,7 @@ - ProcessWire version . ' © Ryan Cramer + ProcessWire version , ' © Ryan Cramer

    debug && $this->user->isSuperuser()) include($config->paths->adminTemplates . "debug.inc"); ?>
    "; - echo $sanitizer->entities($info['name']) . "