if you are comfortable modifying the web admin .php source code, the next step would be to comment out where updateMedia is called...
ssh into the core.. then change to the directory where the web admin page is stored..
cd /var/www/pluto-admin/operations/mediaBrowser
then, you need to edit editMediaFile.php (if you're doing it from the command line, you'll probably have to use Vim, also remember you must be root)
sudo vim editMediaFile.php
now, towards the bottom (about a few pages up from the bottom or so), you'll see
if(isset($_POST['update'])){
$type=(int)$_POST['type'];
$subtype=(int)$_POST['subtype'];
$subtype=($subtype==0)?NULL:$subtype;
$fileFormat=(int)$_POST['fileFormat'];
$fileFormat=($fileFormat==0)?NULL:$fileFormat;
if(file_exists($oldFilePath)){
if($path==$oldPath){
if($fileName!=$oldFilename){
$isRenamed=web_rename($oldFilePath,$newFilePath);
$error=($isRenamed==0)?'Rename failed':'';
}
}
else{
copy($oldFilePath,$newFilePath);
exec_batch_command('sudo -u root rm -f "'.bash_escape($oldFilePath).'"');
}
}
$mediadbADO->Execute('UPDATE File SET Filename=?, Path=?, EK_MediaType=?,FK_MediaSubType=?,FK_FileFormat=? WHERE PK_File=?',array($fileName,$path,$type,$subtype,$fileFormat,$fileID));
// update pics urls
$picsArray=explode(',',$_POST['picsArray']);
foreach ($picsArray AS $pic){
$picUrl=cleanString(@$_POST['url_'.$pic]);
$mediadbADO->Execute('UPDATE Picture SET URL=? WHERE PK_Picture=?',array($picUrl,$pic));
}
$cmd='sudo -u root /usr/pluto/bin/UpdateMedia -d "'.bash_escape($path).'"';
exec_batch_command($cmd);
header('Location: index.php?section=editMediaFile&fileID='.$fileID.'&msg='.$TEXT_MEDIA_FILE_UPDATED_CONST.'&err='.@$error);
exit();
}
the line... "exec_batch_command($cmd)" is what is calling UpdateMedia... simply comment it out (with //) so that you have:
if(isset($_POST['update'])){
$type=(int)$_POST['type'];
$subtype=(int)$_POST['subtype'];
$subtype=($subtype==0)?NULL:$subtype;
$fileFormat=(int)$_POST['fileFormat'];
$fileFormat=($fileFormat==0)?NULL:$fileFormat;
if(file_exists($oldFilePath)){
if($path==$oldPath){
if($fileName!=$oldFilename){
$isRenamed=web_rename($oldFilePath,$newFilePath);
$error=($isRenamed==0)?'Rename failed':'';
}
}
else{
copy($oldFilePath,$newFilePath);
exec_batch_command('sudo -u root rm -f "'.bash_escape($oldFilePath).'"');
}
}
$mediadbADO->Execute('UPDATE File SET Filename=?, Path=?, EK_MediaType=?,FK_MediaSubType=?,FK_FileFormat=? WHERE PK_File=?',array($fileName,$path,$type,$subtype,$fileFormat,$fileID));
// update pics urls
$picsArray=explode(',',$_POST['picsArray']);
foreach ($picsArray AS $pic){
$picUrl=cleanString(@$_POST['url_'.$pic]);
$mediadbADO->Execute('UPDATE Picture SET URL=? WHERE PK_Picture=?',array($picUrl,$pic));
}
$cmd='sudo -u root /usr/pluto/bin/UpdateMedia -d "'.bash_escape($path).'"';
//exec_batch_command($cmd);
header('Location: index.php?section=editMediaFile&fileID='.$fileID.'&msg='.$TEXT_MEDIA_FILE_UPDATED_CONST.'&err='.@$error);
exit();
}
and now it won't be automatically executed. Save the file, then try to reproduce the bug again by changing the media type from the web admin.. if it still hangs, then UpdateMedia and/or exec_batch_command is not resoponsible, and we can look elsewhere...
(A few notes on VIM - if you've never used it, it can be daunting.. Look up how to use it online if you have to. The basics are, use your arrow keys and find the line to change. Press "I" to go into insert (edit) mode. You can now make your changes. When finished, hit esc to get out of insert mode. type :w to save (colon folowed by a w), the :q to quit...)