function _ftools_get_unlink_version in Features Tools 7.2
Same name and namespace in other branches
- 7 ftools.module \_ftools_get_unlink_version()
Get the next version for the unlink directory.
Parameters
string $destination , the $destination path.:
Return value
array with the directory delta and the new destination.
1 call to _ftools_get_unlink_version()
- ftools_form_features_export_form_safe_submit in ./
ftools.module - @todo Please document this function.
File
- ./
ftools.module, line 371 - ftools module
Code
function _ftools_get_unlink_version($destination) {
$destination = substr($destination, 0, strlen($destination) - 1);
$i = 1;
while (file_exists("{$destination}_{$i}")) {
$i++;
}
return array(
'destination' => "{$destination}_{$i}/",
'delta' => $i,
);
}