18 require_once SQ_CORE_PACKAGE_PATH.
'/folder/folder.inc';
61 require_once SQ_CORE_PACKAGE_PATH.
'/system/system_asset_fns.inc';
62 if (!system_asset_fns_create_pre_check($this)) {
65 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
66 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
68 if ($linkid = parent::create($link)) {
69 if (!system_asset_fns_create_cleanup($this)) {
75 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
77 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
80 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
111 trigger_localised_error(
'CORE0091', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
128 if ($name ==
'name') {
129 trigger_localised_error(
'CORE0111', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
133 return parent::setAttrValue($name, $value);
155 function createLink(&$minor, $link_type, $value=
'', $sort_order=NULL, $dependant=
'0', $exclusive=
'0')
157 if ($GLOBALS[
'SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_LINK_INTEGRITY)) {
158 trigger_localised_error(
'CORE00117', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
161 return parent::createLink($minor, $link_type, $value, $sort_order, $dependant, $exclusive);
177 trigger_localised_error(
'CORE0118', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
205 return Array(SQ_LINK_TYPE_1 => Array(
'authentication' => Array(
'card' =>
'M',
'exclusive' => TRUE)));
226 if (empty($assetids)) {
227 if ($GLOBALS[
'SQ_SYSTEM']->userRoot()) {
228 return parent::writeAccess($lock_type, $assetids);
231 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
232 if (in_array($root_user->id, $assetids)) {
233 return parent::writeAccess($lock_type, $assetids);
252 $type_code = (SQ_CONF_ENABLE_EXTERNAL_AUTH_SYSTEMS) ?
'authentication' :
'authentication_default';
253 $links = $GLOBALS[
'SQ_SYSTEM']->am->getLinks($this->
id, SQ_LINK_TYPE_1, $type_code, !SQ_CONF_ENABLE_EXTERNAL_AUTH_SYSTEMS);
254 $installed_auth_types = Array();
255 foreach ($links as $link_data) {
256 $installed_auth_types[] = $link_data[
'minorid'];
258 return $installed_auth_types;