function imce_construct_profile in IMCE 6
Same name and namespace in other branches
- 6.2 inc/imce.core.profiles.inc \imce_construct_profile()
- 7 inc/imce.core.profiles.inc \imce_construct_profile()
Construct a profile based on arguments.
3 calls to imce_construct_profile()
- imce_install_profiles in inc/
core_profiles.inc - Create core profiles and import settings from 5.x
- imce_sample_profile in inc/
core_profiles.inc - Default profile.
- imce_user1_profile in inc/
core_profiles.inc - User1's profile.
File
- inc/
core_profiles.inc, line 92
Code
function imce_construct_profile($n, $f, $q, $tq, $e, $d, $fn, $ds, $ts) {
$profile = array(
'name' => $n,
'filesize' => $f,
'quota' => $q,
'tuquota' => $tq,
'extensions' => $e,
'dimensions' => $d,
'filenum' => $fn,
'directories' => array(),
'thumbnails' => array(),
);
foreach ($ds as $d) {
$profile['directories'][] = array(
'name' => $d[0],
'subnav' => $d[1],
'browse' => $d[2],
'upload' => $d[3],
'thumb' => $d[4],
'delete' => $d[5],
'resize' => $d[6],
);
}
foreach ($ts as $t) {
$profile['thumbnails'][] = array(
'name' => $t[0],
'dimensions' => $t[1],
'prefix' => $t[2],
'suffix' => $t[3],
);
}
return $profile;
}