Estado original vindo do servidor de origem via tar.gz, antes da rodada de conformidade com a knowledge-base e fixes de GLPI 11. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
576 B
PHP
25 lines
576 B
PHP
<?php
|
|
|
|
class PluginButterflyFileVersion {
|
|
|
|
private $_file = "";
|
|
private $_initialized = false;
|
|
|
|
public function __construct($file = "") {
|
|
$this->_file = $file;
|
|
}
|
|
|
|
public function __toString() {
|
|
// First call is inside of "file_exists", so it is necessary to return a valid file
|
|
if (!$this->_initialized) {
|
|
$this->_initialized = true;
|
|
return $this->_file;
|
|
}
|
|
|
|
// Second call is inside concatenation
|
|
|
|
$timestamp = PluginButterflyToolbox::getTimestamp();
|
|
|
|
return $this->_file . "?_=" . $timestamp;
|
|
}
|
|
}
|