getVersionParameter() public static method

Returns the phpMyAdmin version to be appended to the url to avoid caching between versions
public static getVersionParameter ( ) : string
return string urlenocded pma version as a parameter
Example #1
0
 /**
  * Returns HTML code to include javascript file.
  *
  * @param array $files The list of js file to include
  *
  * @return string HTML code for javascript inclusion.
  */
 private function _includeFiles($files)
 {
     $first_dynamic_scripts = "";
     $dynamic_scripts = "";
     $scripts = array();
     $separator = URL::getArgSeparator();
     foreach ($files as $value) {
         if (mb_strpos($value['filename'], "?") !== false) {
             $file_name = $value['filename'] . $separator . Header::getVersionParameter();
             if ($value['before_statics'] === true) {
                 $first_dynamic_scripts .= "<script data-cfasync='false' type='text/javascript' " . "src='js/" . $file_name . "'></script>";
             } else {
                 $dynamic_scripts .= "<script data-cfasync='false' " . "type='text/javascript' src='js/" . $file_name . "'></script>";
             }
             continue;
         }
         $include = true;
         if ($include) {
             $scripts[] = "scripts%5B%5D=" . $value['filename'];
         }
     }
     $separator = URL::getArgSeparator();
     $static_scripts = '';
     // Using chunks of 20 files to avoid too long URLs
     $script_chunks = array_chunk($scripts, 20);
     foreach ($script_chunks as $script_chunk) {
         $url = 'js/get_scripts.js.php?' . implode($separator, $script_chunk) . $separator . Header::getVersionParameter();
         $static_scripts .= sprintf('<script data-cfasync="false" type="text/javascript" src="%s">' . '</script>', htmlspecialchars($url));
     }
     return $first_dynamic_scripts . $static_scripts . $dynamic_scripts;
 }