1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

[enh]Add debug echo

This commit is contained in:
Clément 2015-02-09 12:47:46 +01:00
parent 97ea8ad61f
commit 445602a1f3

View file

@ -1,11 +1,12 @@
<?php <?php
echo "including libs \n";
require('constants.php'); require('constants.php');
require(LIB_PATH . '/lib_rss.php'); require(LIB_PATH . '/lib_rss.php');
if (FRESHRSS_VERSION === '0.8.1'){ if (FRESHRSS_VERSION === '0.8.1'){
require('app/Models/Configuration.php'); require('app/Models/Configuration.php');
require('app/Models/Entry.php'); require('app/Models/Entry.php');
} }
echo "downloading update script \n";
$ch = curl_init(FRESHRSS_UPDATE_WEBSITE); $ch = curl_init(FRESHRSS_UPDATE_WEBSITE);
$fp = fopen("update.php", "w"); $fp = fopen("update.php", "w");
@ -15,8 +16,9 @@ curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch); curl_exec($ch);
curl_close($ch); curl_close($ch);
fclose($fp); fclose($fp);
echo "checking if update needed \n";
if (!strstr(file_get_contents('update.php'), 'NO_UPDATE')){ if (!strstr(file_get_contents('update.php'), 'NO_UPDATE')){
echo "launching update \n";
require('update.php'); require('update.php');
apply_update(); apply_update();
} }