60 if (preg_match(
'#(1|ON)#i', ini_get(
'safe_mode'))) {
61 $this->errors[] =
'PHP running in Safe Mode (backtick operator not available) - cannot call vorbiscomment, tags not written';
68 if (is_writable($tempcommentsfilename) && is_file($tempcommentsfilename) && ($fpcomments = fopen($tempcommentsfilename,
'wb'))) {
70 foreach ($this->tag_data as $key => $value) {
71 foreach ($value as $commentdata) {
78 $this->errors[] =
'failed to open temporary tags file "'.$tempcommentsfilename.
'", tags not written';
83 $oldignoreuserabort = ignore_user_abort(
true);
97 $timestampbeforewriting = filemtime($this->filename);
100 $VorbiscommentError = `$commandline`;
102 if (empty($VorbiscommentError)) {
104 if ($timestampbeforewriting == filemtime($this->filename)) {
105 $VorbiscommentError =
'File modification timestamp has not changed - it looks like the tags were not written';
109 $VorbiscommentError =
'vorbiscomment.exe not found in '.GetId3Core::getHelperAppsDir();
114 $commandline =
'vorbiscomment -w --raw -c "'.$tempcommentsfilename.
'" "'.$this->filename.
'" 2>&1';
115 $VorbiscommentError = `$commandline`;
120 unlink($tempcommentsfilename);
121 ignore_user_abort($oldignoreuserabort);
123 if (!empty($VorbiscommentError)) {
125 $this->errors[] =
'system call to vorbiscomment failed with message: '.
"\n\n".$VorbiscommentError;
159 return strtoupper(preg_replace(
'#[^ -<>-}]#',
' ', str_replace(
"\x00",
' ', $originalcommentname)));
static environmentIsWindows()
Create styles array
The data for the language used.
static getHelperAppsDir()