コード例 #1
0
ファイル: JsPkgCustom.php プロジェクト: smartqubit/calemeam
    }
}
if (!$cont) {
    $logger->error("sid=" . $sid . " not found, service not provided");
    die("Session is not valid, service is not provided.");
}
$path = _CALEM_DIR_ . 'custom/';
$uid = $userRow['id'];
$gid = $userRow['acl_group_id'];
$bulk = array();
//Adding personalized customization (form, view, search, modules, etc for OOB, custom, group and user)
$vs = $_CALEM_conf['calem_cutsom_set'];
//Getting groups data to load.
$cache = CalemFactory::getDataCacheManager();
$data = $cache->load('acl_group');
$cacheList = array("CalemData['acl_group']=" . json_encode($data) . CALEM_LFCR);
$parentGroups = $data['parentMap'][$gid];
foreach ($parentGroups as $grp) {
    $bulk = addCustomInfo($path . 'group/', $grp, $vs, $bulk);
}
//Add group self.
$bulk = addCustomInfo($path . 'group/', $gid, $vs, $bulk);
//Add user self
$bulk = addCustomInfo($path . 'user/', $uid, $vs, $bulk);
//Add system customization: tables, dropdowns, and text
$locale = isset($lang) && strlen($lang) > 0 ? '_' . $lang : '';
$bulk = addCustomInfo($path . 'global/', 'custom.metadata', array('.js'), $bulk);
$bulk = addCustomInfo($path . 'global/', 'custom.dropdown', array('.js'), $bulk);
$bulk = addCustomInfo($path . 'global/', 'custom' . $locale . '.message', array('.js'), $bulk);
$jsPkg = new CalemIncludeJsPkg();
$jsPkg->downloadBulk($bulk, $cacheList);
コード例 #2
0
ファイル: JsPkg.php プロジェクト: smartqubit/calemeam
 * The contents of this file are subject to the CalemEAM Public License Version
 * 1.0 ("License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.calemeam.com/license
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is: CalemEAM Open Source
 *
 * The Initial Developer of the Original Code is CalemEAM Inc.
 * Portions created by CalemEAM are Copyright (C) 2007 CalemEAM Inc.;
 * All Rights Reserved.
 * Contributor(s): 
 */
//Checking basic initialization
if (!defined('_CALEM_DIR_')) {
    $pi = pathinfo(getcwd());
    define('_CALEM_DIR_', $pi['dirname'] . "/");
    define('LOG4PHP_CONFIGURATION', _CALEM_DIR_ . 'etc/log4php.properties');
}
require_once _CALEM_DIR_ . 'client/launchpad/CalemIncludeJsPkg.php';
$js = isset($_REQUEST['js']) ? $_REQUEST['js'] : null;
if (!js) {
    $this->logger->error("No file is requested. Invalid request and abort service.");
    die("No file is requested.");
}
$bulk[] = array('id' => _CALEM_DIR_ . 'client/launchpad/resource/' . $js, 'ext' => ".js", 'addLang' => true);
$jsPkg = new CalemIncludeJsPkg();
$jsPkg->downloadBulk($bulk);