Skip to content

Commit 275d9d8

Browse files
committed
v3.2.0
1 parent 47f59b1 commit 275d9d8

File tree

2 files changed

+13
-29
lines changed

2 files changed

+13
-29
lines changed

php/_basic_tasks.php

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
session_start();
3-
ini_set('display_errors', 1);
3+
/* ini_set('display_errors', 1);
44
ini_set('display_startup_errors', 1);
5-
error_reporting(E_ALL);
6-
// error_reporting(0);
5+
error_reporting(E_ALL); */
6+
error_reporting(0);
77
// error_reporting(E_ALL & ~E_NOTICE);
88
ini_set('output_buffering', 'off');
99
ini_set('zlib.output_compression', 0);
@@ -15,7 +15,6 @@
1515
define('STRIATED',1);
1616
define('SMOOTH',0);
1717
define('MAXPARTS',30);
18-
// ini_set("auto_detect_line_endings",true);
1918

2019
$test = FALSE;
2120
// $test = TRUE;
@@ -24,11 +23,11 @@
2423
$today_date = date("Y-m-d");
2524

2625
$file_path = "_settings.php";
27-
if (!file_exists($file_path)) {
26+
if(!file_exists($file_path)) {
2827
// Create the file and write the PHP tags
2928
$file_content = "<?php\n\n?>";
3029
// Write the content to the file
31-
if(my_file_put_contents($file_path, $file_content) == false) {
30+
if(my_file_put_contents($file_path, $file_content) == FALSE) {
3231
echo "Failed to create the file '_settings.php'.";
3332
die();
3433
}
@@ -4968,7 +4967,7 @@ function my_file_put_contents($path,$content) {
49684967
global $dir, $bad_settings;
49694968
$bad_settings = FALSE;
49704969
$result = @file_put_contents($path,$content);
4971-
if($result === false) {
4970+
if($result === FALSE) {
49724971
$error = error_get_last();
49734972
echo "<p>Failed to write to the file: ".$path;
49744973
echo "<br />Error: ".$error['message']."</p>";
@@ -4977,28 +4976,8 @@ function my_file_put_contents($path,$content) {
49774976
if($type_of_file['type'] == "settings") {
49784977
$bad_settings = TRUE;
49794978
}
4979+
return FALSE;
49804980
}
4981-
return;
4982-
/*
4983-
if(is_writable($path)) {
4984-
file_put_contents($path,$content);
4985-
return;
4986-
}
4987-
else {
4988-
@chmod($path,0777);
4989-
if(is_writable($path)) {
4990-
file_put_contents($path,$content);
4991-
return OK;
4992-
}
4993-
echo "<p>👉&nbsp;Failed to change the permissions of file <span class=\"green-text\">".$path."</span>. You should export this file in the index of the current workspace and upload it again.<p />";
4994-
// die();
4995-
$thisfile = str_replace($dir,'',$path);
4996-
$type_of_file = type_of_file($thisfile);
4997-
if($type_of_file['type'] == "settings") {
4998-
$bad_settings = TRUE;
4999-
}
5000-
return;
5001-
}
5002-
return; */
4981+
return TRUE;
50034982
}
50044983
?>

php/_settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
$output_folder = "my_output";
3+
$csound_resources = "csound_resources";
4+
$trash_folder = "trash_bolprocessor";
5+
?>

0 commit comments

Comments
 (0)