更新到正式版1.0
This commit is contained in:
66
core/function/cache/cache_fields_required.php
vendored
66
core/function/cache/cache_fields_required.php
vendored
@@ -1,34 +1,34 @@
|
||||
<?php
|
||||
/*
|
||||
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
|
||||
* @license https://www.oaooa.com/licenses/
|
||||
*
|
||||
* @link https://www.oaooa.com
|
||||
* @author zyx(zyx@oaooa.com)
|
||||
*/
|
||||
if(!defined('IN_OAOOA')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
|
||||
function build_cache_fields_required() {
|
||||
$data = array();
|
||||
|
||||
foreach(C::t('user_profile_setting')->fetch_all_by_available_required(1, 1) as $field) {
|
||||
$choices = array();
|
||||
if($field['selective']) {
|
||||
foreach(explode("\n", $field['choices']) as $item) {
|
||||
list($index, $choice) = explode('=', $item);
|
||||
$choices[trim($index)] = trim($choice);
|
||||
}
|
||||
$field['choices'] = $choices;
|
||||
} else {
|
||||
unset($field['choices']);
|
||||
}
|
||||
$data['field_'.$field['fieldid']] = $field;
|
||||
}
|
||||
|
||||
savecache('fields_required', $data);
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
|
||||
* @license https://www.oaooa.com/licenses/
|
||||
*
|
||||
* @link https://www.oaooa.com
|
||||
* @author zyx(zyx@oaooa.com)
|
||||
*/
|
||||
if(!defined('IN_OAOOA')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
|
||||
function build_cache_fields_required() {
|
||||
$data = array();
|
||||
|
||||
foreach(C::t('user_profile_setting')->fetch_all_by_available_required(1, 1) as $field) {
|
||||
$choices = array();
|
||||
if($field['selective']) {
|
||||
foreach(explode("\n", $field['choices']) as $item) {
|
||||
list($index, $choice) = explode('=', $item);
|
||||
$choices[trim($index)] = trim($choice);
|
||||
}
|
||||
$field['choices'] = $choices;
|
||||
} else {
|
||||
unset($field['choices']);
|
||||
}
|
||||
$data['field_'.$field['fieldid']] = $field;
|
||||
}
|
||||
|
||||
savecache('fields_required', $data);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user