function imce_construct_profile in IMCE 6.2
Same name and namespace in other branches
- 6 inc/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/
imce.core.profiles.inc - Create core profiles and import settings from 5.x
- imce_sample_profile in inc/
imce.core.profiles.inc - Default profile.
- imce_user1_profile in inc/
imce.core.profiles.inc - User1's profile.
File
- inc/
imce.core.profiles.inc, line 97 - Creates the default configuration profiles.
Code
function imce_construct_profile($n, $u, $f, $q, $tq, $e, $d, $fn, $ds, $ts) {
$profile = array(
'name' => $n,
'usertab' => $u,
'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;
}