aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/entryController.php8
-rw-r--r--app/Controllers/feedController.php12
-rw-r--r--app/Controllers/importExportController.php4
-rw-r--r--app/Services/ImportService.php4
4 files changed, 21 insertions, 7 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php
index f334ce0a6..95ac9ee39 100644
--- a/app/Controllers/entryController.php
+++ b/app/Controllers/entryController.php
@@ -169,7 +169,9 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
Minz_Request::forward($url_redirect, true);
}
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
$databaseDAO->optimize();
@@ -188,7 +190,9 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
* @todo should be in feedController
*/
public function purgeAction(): void {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$feedDAO = FreshRSS_Factory::createFeedDao();
$feeds = $feedDAO->listFeeds();
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index ea336811c..a9cb51416 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -36,7 +36,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
public static function addFeed(string $url, string $title = '', int $cat_id = 0, string $new_cat_name = '',
string $http_auth = '', array $attributes = [], int $kind = FreshRSS_Feed::KIND_RSS): FreshRSS_Feed {
FreshRSS_UserDAO::touch();
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$catDAO = FreshRSS_Factory::createCategoryDao();
@@ -329,7 +331,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
*/
public static function actualizeFeed(int $feed_id, string $feed_url, bool $force, ?SimplePie $simplePiePush = null,
bool $noCommit = false, int $maxFeeds = 10): array {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$feedDAO = FreshRSS_Factory::createFeedDao();
$entryDAO = FreshRSS_Factory::createEntryDao();
@@ -875,7 +879,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
* @throws FreshRSS_BadUrl_Exception
*/
public function reloadAction(): void {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
//Get Feed ID.
$feed_id = Minz_Request::paramInt('id');
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 807a355db..d4a03c939 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -182,7 +182,9 @@ class FreshRSS_importExport_Controller extends FreshRSS_ActionController {
Minz_Request::bad(_t('feedback.import_export.file_cannot_be_uploaded'), [ 'c' => 'importExport', 'a' => 'index' ]);
}
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$error = false;
try {
diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php
index e92351c0f..b70627295 100644
--- a/app/Services/ImportService.php
+++ b/app/Services/ImportService.php
@@ -34,7 +34,9 @@ class FreshRSS_Import_Service {
* @param bool $dry_run true to not create categories and feeds in database.
*/
public function importOpml(string $opml_file, ?FreshRSS_Category $forced_category = null, bool $dry_run = false): void {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$this->lastStatus = true;
$opml_array = [];
try {