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();
98 if (!parent::_createAdditional($link))
return FALSE;
103 $public_userids = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids(
'public_user');
104 return $GLOBALS[
'SQ_SYSTEM']->am->setPermission($this->
id, $public_userids[0], SQ_PERMISSION_READ, TRUE);
121 if (isset($_REQUEST[$prefix.
'_purge_complete']) && (
int)$_REQUEST[$prefix.
'_purge_complete'] === 1) {
122 $o->addOnLoad(
' if (parent.frames["sq_sidenav"] && parent.frames["sq_sidenav"].reload_asset) {
123 parent.frames["sq_sidenav"].reload_asset("'.$this->
id.
'");
127 parent::paintBackend($o);
157 trigger_localised_error(
'CORE0091', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
174 if ($name ==
'name') {
175 trigger_localised_error(
'CORE0111', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
179 return parent::setAttrValue($name, $value);
197 trigger_localised_error(
'CORE0019', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
215 if (!$this->
id)
return FALSE;
216 if (!($minor instanceof
Asset)) {
217 return translate(
'minor_not_asset');
267 if ($GLOBALS[
'SQ_SYSTEM']->userRoot())
return TRUE;
268 if ($GLOBALS[
'SQ_SYSTEM']->userSystemAdmin()) {