-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from sao-albacete/feature/AOA-57
[AOA-57] Creada función para obtener la versión leyendo el contenido …
- Loading branch information
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
App::uses('AppHelper', 'View/Helper'); | ||
|
||
class VersionHelper extends AppHelper { | ||
|
||
/** | ||
* Devuelve el contenido del fichero app/View/Elements/version.txt | ||
*/ | ||
public function obtener_version() { | ||
// poner el contenido de un fichero en una cadena | ||
$nombre_fichero = ROOT . DS . "version.txt"; | ||
$gestor = fopen($nombre_fichero, "r"); | ||
$contenido = fread($gestor, filesize($nombre_fichero)); | ||
fclose($gestor); | ||
return $contenido ? "Versión ".$contenido : ""; | ||
} | ||
} |
Empty file.