* Api/Filemanager: create in non EPL missing /templates and app-sub-directores

Was caused by (unnecessary) transaction around defaul_records processing, causing during transaction inserted rows where not (yet) commited and therefore could not be read.
This commit is contained in:
Ralf Becker 2019-03-24 11:36:23 +01:00
parent 86a550c7e6
commit c5534288dd
4 changed files with 20 additions and 4 deletions

View File

@ -195,7 +195,7 @@ foreach($dirs as $path => $id)
'fs_comment' => null,
'fs_content' => null,
);
$GLOBALS['egw_setup']->db->insert('egw_sqlfs',$nrow,false,__LINE__,__FILE__,'phpgwapi');
$GLOBALS['egw_setup']->db->insert('egw_sqlfs', $nrow, false, __LINE__, __FILE__, 'api');
}
// PostgreSQL seems to require to update the sequenz, after manually inserting id's
$oProc->UpdateSequence('egw_sqlfs','fs_id');

View File

@ -11,7 +11,7 @@
/* Basic information about this app */
$setup_info['api']['name'] = 'api';
$setup_info['api']['title'] = 'EGroupware API';
$setup_info['api']['version'] = '17.1.005';
$setup_info['api']['version'] = '17.1.007';
$setup_info['api']['versions']['current_header'] = '1.29';
// maintenance release in sync with changelog in doc/rpm-build/debian.changes
$setup_info['api']['versions']['maintenance_release'] = '17.1.20190222';

View File

@ -516,3 +516,21 @@ function api_upgrade17_1_004()
return $GLOBALS['setup_info']['api']['currentver'] = '17.1.005';
}
/**
* Create /templates and subdirectories, if they dont exist
*
* They are create as part of the installation for new installations and allways exist in EPL.
* If they dont exist, you can not save the preferences of the concerned applications, unless
* you either manually create the directory or remove the path from the default preferences.
*
* Rerun the 16.1.002 update, as (unnecessary) transaction prevented creation on install
* with PHP MySQLi driver and probably all other drivers supporting transactions.
*
* @return string
*/
function api_upgrade17_1_005()
{
api_upgrade16_1_002();
return $GLOBALS['setup_info']['api']['currentver'] = '17.1.007'; // skip 17.1.006!
}

View File

@ -498,10 +498,8 @@ class setup_process
{
echo '<br>process->default_records(): Including default records for ' . $appname . "\n";
}
$GLOBALS['egw_setup']->oProc->m_odb->transaction_begin();
$oProc = &$GLOBALS['egw_setup']->oProc; // to be compatible with old apps
include ($appdir.'default_records.inc.php');
$GLOBALS['egw_setup']->oProc->m_odb->transaction_commit();
}
/* $appdata['status'] = 'C'; */
}