17 require_once SQ_INCLUDE_PATH.
'/asset.inc';
18 require_once SQ_FUDGE_PATH.
'/datetime_field/datetime_field.inc';
19 require_once SQ_FUDGE_PATH.
'/general/datetime.inc';
20 require_once dirname(__FILE__).
'/../lib/calendar_common.inc';
47 $this->
Asset($assetid);
64 if (!parent::_preCreateCheck($link))
return FALSE;
66 $name = $this->
attr(
'name');
67 if ($GLOBALS[
'SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_INTEGRITY) && ($name ==
'')) {
68 trigger_localised_error(
'CAL0008', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
89 if (!parent::_createAdditional($link))
return FALSE;
92 $initial_path = strtolower($this->
attr(
'name'));
93 require_once SQ_INCLUDE_PATH.
'/general_occasional.inc';
94 $valid_paths = make_valid_web_paths(Array($initial_path));
95 $good_paths = $GLOBALS[
'SQ_SYSTEM']->am->webPathsInUse($link[
'asset'], $valid_paths, $this->
id, TRUE);
97 return ($result && $result_paths);
112 function delete($release_lock=TRUE)
114 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
116 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
120 'assetid' => $this->
id,
123 }
catch (Exception $e) {
124 throw new Exception(
'Unable to delete the eventid #:'.$this->
id.
' from the trash due to the following database error:'.$e->getMessage());
127 if (!parent::delete($release_lock)) {
128 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
129 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
133 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
134 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
150 protected function _getName($short_name=FALSE, $contextid=NULL)
153 if ($contextid === NULL) {
154 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
158 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName(
'name', $this->
type(), Array($this->
id), $contextid);
159 if (empty($values) === TRUE) {
160 return parent::_getName($short_name, $contextid);
162 return $values[$this->id];
184 $keywords = parent::getAvailableKeywords();
186 $our_keywords = Array();
187 $our_keywords[] =
'asset_attribute_start_date';
188 $our_keywords[] =
'asset_attribute_end_date';
189 $our_keywords[] =
'event_start_date';
190 $our_keywords[] =
'event_end_date';
191 $our_keywords[] =
'event_start_datetime';
192 $our_keywords[] =
'event_end_datetime';
193 $our_keywords[] =
'event_start_time_12h';
194 $our_keywords[] =
'event_end_time_12h';
195 $our_keywords[] =
'event_start_time_24h';
196 $our_keywords[] =
'event_end_time_24h';
197 $our_keywords[] =
'event_short_start_time';
198 $our_keywords[] =
'event_short_end_time';
199 $our_keywords[] =
'event_start_time_ical';
200 $our_keywords[] =
'event_end_time_ical';
201 $our_keywords[] =
'event_datetime_summary';
202 $our_keywords[] =
'event_duration';
203 $our_keywords[] =
'edit_link';
204 $our_keywords[] =
'delete_link';
205 $our_keywords[] =
'event_start_datetime_';
206 $our_keywords[] =
'event_end_datetime_';
207 $our_keywords[] =
'event_calendar_date_';
210 foreach ($our_keywords as $keyword) {
211 $keywords[$keyword] = translate(
'cal_evt_keyword_'.$keyword);
235 SQ_LINK_TYPE_1 => Array(
236 'file' => Array(
'card' =>
'M',
'exclusive' => FALSE),
237 'page' => Array(
'card' =>
'M',
'exclusive' => FALSE),
239 SQ_LINK_TYPE_2 => Array(
240 'file' => Array(
'card' =>
'M',
'exclusive' => FALSE),
241 'page' => Array(
'card' =>
'M',
'exclusive' => FALSE),
243 SQ_LINK_TYPE_3 => Array(),
244 SQ_LINK_NOTICE => Array(
245 'image' => Array(
'card' => 1,
'exclusive' => FALSE),
246 'design' => Array(
'card' =>
'M',
'exclusive' => FALSE),
247 'paint_layout_page' => Array(
'card' =>
'M',
'exclusive' => FALSE),
262 if (TRUE === ($msg = $GLOBALS[
'SQ_SYSTEM']->am->couldTrashAsset($this->id))) {
263 $res =
'<a href="?SQ_CALENDAR_EVENT_ID='.$this->id.
'&SQ_CALENDAR_EVENT_ACTION=delete';
264 if (isset($_REQUEST[
'SQ_CALENDAR_DATE'])) {
265 $res .=
'&SQ_CALENDAR_DATE='.$_REQUEST[
'SQ_CALENDAR_DATE'];
267 $res .=
'" onclick="return confirm(js_translate(\'confirm_delete_event\'));">'.translate(
'delete').
'</a>';
288 $start_date = $this->
attr(
'start_date');
289 $end_date = $this->
attr(
'end_date');
297 if ($GLOBALS[
'SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_INTEGRITY)) {
300 if (!$start_has_date) {
301 trigger_localised_error(
'CAL0009', E_USER_WARNING);
306 if (!$end_has_date && $end_has_time) {
307 trigger_localised_error(
'CAL0010', E_USER_WARNING);
312 if ($end_has_time && (!$start_has_time)) {
313 trigger_localised_error(
'CAL0011', E_USER_WARNING);
318 if ($end_has_date && $start_has_time && (!$end_has_time)) {
319 trigger_localised_error(
'CAL0012', E_USER_WARNING);
326 if (iso8601_ts($end_date) < iso8601_ts($start_date)) {
327 trigger_localised_error(
'CAL0013', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
337 $datetime =
new Datetime_Field(
'', $value, $params);
340 $start_components = $datetime->strToUnitsArray($start_date);
341 $end_components = $datetime->strToUnitsArray($end_date);
347 if ($end_has_date && (($end_components[
'd'] == -1) || ($end_components[
'm'] == -1) || ($end_components[
'y'] == -1))) {
348 trigger_localised_error(
'CAL0014', E_USER_WARNING);
354 if ($start_has_time && (($start_components[
'h'] == -1) || ($start_components[
'i'] == -1))) {
355 trigger_localised_error(
'CAL0015', E_USER_WARNING);
359 if ($end_has_time && (($end_components[
'h'] == -1) || ($end_components[
'i'] == -1))) {
360 trigger_localised_error(
'CAL0016', E_USER_WARNING);
366 if (!empty($this->
id) && !$dont_run_updated) {
375 if ($this->
id) $treeid = $GLOBALS[
'SQ_SYSTEM']->am->getAssetTreeids($this->
id);
376 if (($this->
id) && $this->
type() ==
'calendar_event_recurring' && $GLOBALS[
'SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_INTEGRITY) && !empty($treeid)) {
377 $events_to_update = $GLOBALS[
'SQ_SYSTEM']->am->getChildren($this->
id,
'calendar_event_modification');
380 $GLOBALS[
'SQ_SYSTEM']->setRunLevel(SQ_RUN_LEVEL_FORCED);
381 foreach ($events_to_update as $event_id => $info) {
382 $modification_event = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($event_id);
383 if (!$modification_event->saveAttributes()) {
384 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
388 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
392 return parent::saveAttributes($dont_run_updated);
421 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
422 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
424 if (!parent::cloneComponents($clone, $components, $override)) {
425 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
426 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
430 if (in_array(
'all', $components) || in_array(
'attributes', $components)) {
431 if (!$clone->cacheCalendarData(FALSE)) {
432 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
433 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
438 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
439 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
456 $res = substr($this->
attr(
'start_date'), 0, 10);
457 return ($res ==
'----------') ? FALSE : $res;
473 $res = substr($this->
attr(
'end_date'), 0, 10);
474 return ($res ==
'----------') ? FALSE : $res;
490 $res = substr($this->
attr(
'start_date'), 11, 5);
491 return ($res ==
'--:--') ? FALSE : $res;
507 $res = substr($this->
attr(
'end_date'), 11, 5);
508 return ($res ==
'--:--') ? FALSE : $res;
526 $seconds_per_day = 24 * 60 * 60;
528 $start_date = $this->
attr(
'start_date');
529 $end_date = $this->
attr(
'end_date');
537 if (!$start_has_date)
return NULL;
539 if (!$end_has_date) {
548 if (!$start_has_time && !$end_has_time) {
551 return iso8601_ts($end_date) - iso8601_ts($start_date) + $seconds_per_day;
555 return iso8601_ts($end_date) - iso8601_ts($start_date);
573 return readable_datetime(iso8601_ts($this->
attr(
'start_date')));
575 return date(
'jS M Y', iso8601_ts($this->
attr(
'start_date')));
592 return readable_datetime(iso8601_ts($this->
attr(
'end_date')));
593 }
else if (iso8601_ts($this->
attr(
'end_date')) == -1) {
596 return date(
'jS M Y', iso8601_ts($this->
attr(
'end_date')));
625 if (substr($this->
attr(
'start_date'), 0, 10) == substr($this->
attr(
'end_date'), 0, 10)) {
637 }
else if (iso8601_ts($this->
attr(
'end_date')) == -1) {
654 require_once SQ_FUDGE_PATH.
'/general/datetime.inc';
656 <table border=
"0" cellspacing=
"2" cellpadding=
"2">
658 <td><b>Event Name</b></td>
659 <td><?php echo $this->
attr(
'name'); ?></td>
662 <td><b>Start Date</b></td>
666 <td><b>End Date</b></td>
670 <td><b>Duration</b></td>
673 $total_time = easy_time_total($this->
getDuration(), TRUE);
674 echo (empty($total_time) ?
'N/A' : $total_time);
678 <td><b>Description</b></td>
700 switch ($action_name) {
702 if (isset($_REQUEST[
'SQ_CALENDAR_OLD_LOC']) && !empty($_REQUEST[
'SQ_CALENDAR_OLD_LOC'])) {
703 $old_link = $GLOBALS[
'SQ_SYSTEM']->am->getLinkByAsset($_REQUEST[
'SQ_CALENDAR_OLD_LOC'], $this->
id);
704 if (empty($old_link)) {
705 trigger_localised_error(
'CAL0017', E_USER_WARNING, $_REQUEST[
'SQ_CALENDAR_OLD_LOC'], $this->
id);
708 if (!$GLOBALS[
'SQ_SYSTEM']->am->moveLink($old_link[
'linkid'], $_REQUEST[
'SQ_CALENDAR_NEW_LOC'], $old_link[
'link_type'], -1)) {
709 trigger_localised_error(
'CAL0018', E_USER_WARNING, $_REQUEST[
'SQ_CALENDAR_OLD_LOC'], $_REQUEST[
'SQ_CALENDAR_NEW_LOC']);
713 if (!isset($_REQUEST[
'SQ_CALENDAR_NEW_DATE'])) {
714 trigger_localised_error(
'CAL0019', E_USER_WARNING);
718 if (!isset($_REQUEST[
'SQ_CALENDAR_NEW_TIME']) || empty($_REQUEST[
'SQ_CALENDAR_NEW_TIME'])) {
719 $_REQUEST[
'SQ_CALENDAR_NEW_TIME'] =
'--:--';
721 $this->
setAttrValue(
'start_date', $_REQUEST[
'SQ_CALENDAR_NEW_DATE'].
' '.$_REQUEST[
'SQ_CALENDAR_NEW_TIME'].
':--');
723 if ($current_end_date) {
724 $new_end_date_ts = iso8601_ts($this->
attr(
'start_date')) + $duration;
725 $new_end_date = date(
'Y-m-d', $new_end_date_ts);
726 $new_end_time = $this->
getEndTime() ? date(
'H:i:00', $new_end_date_ts) :
'--:--:--';
727 $this->
setAttrValue(
'end_date', $new_end_date.
' '.$new_end_time);
729 if (!$GLOBALS[
'SQ_SYSTEM']->am->acquireLock($this->id,
'attributes')) {
730 trigger_localised_error(
'CAL0020', E_USER_WARNING, $this->name, $this->
id);
734 $GLOBALS[
'SQ_SYSTEM']->am->releaseLock($this->
id,
'attributes');
738 $GLOBALS[
'SQ_SYSTEM']->am->trashAsset($this->
id);
743 trigger_localised_error(
'CAL0021', E_USER_WARNING, $action_name);
764 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
765 $db = MatrixDal::getDb();
767 $date_values = Array();
769 foreach (Array(
'start_date',
'end_date') as $date_comp) {
770 $iso = $this->
attr($date_comp);
772 if (iso8601_time_component($iso) === FALSE) {
773 if (($date_comp ==
'end_date') && (iso8601_date_component($iso) !== FALSE)) {
774 $iso = substr($iso, 0, 10).
' 24:00:00';
779 $iso = substr($iso, 0, 16).
':00';
787 $date_values[
'frequency'] =
'';
789 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
793 $date_values[
'assetid'] = $this->id;
795 for (reset($date_values); NULL !== ($key = key($date_values)); next($date_values)) {
796 if (is_null($date_values[$key]))
797 $date_values[$key] =
'NULL';
801 $val_string = implode(
',', $date_values);
806 '.implode(
',', array_keys($date_values)).
'
816 }
catch (Exception $e) {
817 throw new Exception($e->getMessage());
825 $set_array = Array();
826 foreach ($date_values as $key => $value) {
827 $set_array[] = $key.
' = '.((is_null($value)) ?
'null' :
MatrixDAL::quote($value));
829 $sql .= implode(
',', $set_array);
837 }
catch (Exception $e) {
838 throw new Exception($e->getMessage());
842 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
843 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
866 $end_date_not_set = ($this->
getEndDate() === FALSE);
867 $start_time_not_set = ($this->
getStartTime() === FALSE);
868 $end_time_not_set = ($this->
getEndTime() === FALSE);
870 $keyword = parse_keyword($keyword, $modifiers);
874 $replacement = $this->name;
877 case 'event_start_date':
878 $replacement = date(
'jS M Y', iso8601_ts($this->
attr(
'start_date')));
881 case 'event_start_time_12h':
882 $replacement = $start_time_not_set ?
'' : date(
'h:i a', iso8601_ts($this->
attr(
'start_date')));
885 case 'event_start_time_24h':
886 $replacement = $start_time_not_set ?
'' : date(
'H:i', iso8601_ts($this->
attr(
'start_date')));
889 case 'event_start_time_ical':
891 if (preg_match(
"/^(.*?) (--):(--):(--)$/", $this->
attr(
'start_date'))) {
892 $replacement = date(
'Ymd', iso8601_ts($this->
attr(
'start_date')));
894 $replacement = date(
'Ymd\THis', iso8601_ts($this->
attr(
'start_date')));
898 case 'event_end_date':
900 $replacement = $end_date_not_set ?
'' : date(
'jS M Y', iso8601_ts($this->
attr(
'end_date')));
903 case 'event_end_time_12h':
904 $replacement = $end_time_not_set ?
'' : date(
'h:i a', iso8601_ts($this->
attr(
'end_date')));
907 case 'event_end_time_24h':
908 $replacement = $end_time_not_set ?
'' : date(
'H:i', iso8601_ts($this->
attr(
'end_date')));
911 case 'event_short_start_time':
912 if ($start_time_not_set) {
915 $mins = date(
'i', iso8601_ts($this->
attr(
'start_date')));
917 $replacement = date(
'ga', iso8601_ts($this->
attr(
'start_date')));
919 $replacement = date(
'g:ia', iso8601_ts($this->
attr(
'start_date')));
924 case 'event_short_end_time':
925 if ($start_time_not_set) {
928 $mins = date(
'i', iso8601_ts($this->
attr(
'end_date')));
930 $replacement = date(
'ga', iso8601_ts($this->
attr(
'end_date')));
932 $replacement = date(
'g:ia', iso8601_ts($this->
attr(
'end_date')));
937 case 'event_end_time_ical':
938 if ($end_date_not_set) {
947 $no_endtime_pattern =
"/^(....)-(..)-([0-9]{2}) (--:--:--)$/";
948 $replacement =
"$1-$2-$3";
949 if (preg_match($no_endtime_pattern, $this->
attr(
'end_date'), $matches)) {
950 $end_date = preg_replace($no_endtime_pattern, $replacement, $this->
attr(
'end_date'));
952 $end_date = $this->
attr(
'end_date');
957 $replacement = preg_match(
"/..:..:..$/",$end_date) ? date(
'Ymd\THis', iso8601_ts($end_date)) : date(
'Ymd', iso8601_ts($end_date));
961 case 'event_start_datetime':
965 case 'event_end_datetime':
969 case 'event_datetime_summary':
973 case 'event_duration':
975 $total_time = easy_time_total($this->
getDuration(), TRUE);
976 if (empty($total_time)) $total_time =
'N/A';
977 $replacement = $total_time;
981 $replacement = $this->
writeAccess(
'') ?
'<a href="'.htmlentities(replace_query_string_vars(Array(
'SQ_CALENDAR_VIEW'=>
'edit',
'SQ_CALENDAR_EVENT_ID'=>$this->
id))).
'">'.translate(
'cal_event_edit_link_text').
'</a>' :
'';
988 case 'instance_start_datetime':
990 $start_ts = isset($this->vars[
'start_date_ts']) ? $this->
attr(
'start_date_ts') :
'';
991 if (!empty($start_ts)) {
992 $replacement = date(
'Y-m-d H:i', $start_ts);
996 case 'instance_end_datetime':
997 $end_ts = isset($this->vars[
'end_date_ts']) ? $this->
attr(
'end_date_ts') :
'';
998 if (!empty($end_ts)) {
999 $replacement = empty($end_ts) ?
'' : date(
'Y-m-d H:i', $end_ts);
1006 preg_match(
'/^event_start_datetime_(.+)/', $keyword, $matches);
1007 if (!empty($matches)) {
1008 $replacement = date($matches[1], iso8601_ts($this->
attr(
'start_date')));
1010 preg_match(
'/^event_end_datetime_(.+)/', $keyword, $matches);
1011 if (!empty($matches)) {
1012 $replacement = $end_date_not_set ?
'' : date($matches[1], iso8601_ts($this->
attr(
'end_date')));
1015 preg_match(
'/^event_calendar_date_(.+)/', $keyword, $matches);
1016 if (!empty($matches) && !empty($_REQUEST[
'SQ_CALENDAR_DATE'])) {
1017 $replacement = date($matches[1], strtotime($_REQUEST[
'SQ_CALENDAR_DATE']));
1021 if (isset($this->vars[
'start_date_ts'])) {
1022 $start_ts = $this->
attr(
'start_date_ts');
1023 preg_match(
'/^instance_start_datetime_(.+)/', $keyword, $matches);
1024 if (!empty($matches)) {
1025 if ($matches[1] ==
'ical') {
1026 $replacement = empty($start_ts) ?
'' : date(
'Ymd\THis', $start_ts);
1028 $replacement = empty($start_ts) ?
'' : date($matches[1], $start_ts);
1032 if (isset($this->vars[
'end_date_ts'])) {
1033 $end_ts = $this->
attr(
'end_date_ts');
1034 preg_match(
'/^instance_end_datetime_(.+)/', $keyword, $matches);
1035 if (!empty($matches)) {
1036 if ($matches[1] ==
'ical') {
1037 $replacement = empty($end_ts) ?
'' : date(
'Ymd\THis', $end_ts);
1039 $replacement = empty($end_ts) ?
'' : date($matches[1], $end_ts);
1044 if (empty($replacement)) $replacement = parent::getKeywordReplacement($keyword);
1049 apply_keyword_modifiers($replacement, $modifiers, Array(
'assetid' => $this->
id));
1051 return $replacement;
1068 $assetid_parts = explode(
':', $whole_assetid);
1070 $assetid = $assetid_parts[0];
1071 if (empty($assetid_parts[1])) {
1074 $shdw_part_data = explode(
',', $assetid_parts[1]);
1075 $instance_data = Array();
1076 foreach($shdw_part_data as $data) {
1077 list($key, $val) = explode(
"=", $data);
1078 $instance_data[$key] = $val;
1080 if (!$GLOBALS[
'SQ_SYSTEM']->am->getAssetInfo($assetid)) {
1083 $event_asset = clone $GLOBALS[
'SQ_SYSTEM']->am->getAsset($assetid);
1085 $event_asset->full_id = $whole_assetid;
1086 foreach($instance_data as $attr => $value) {
1087 $event_asset->vars[$attr][
'attrid'] = 0;
1088 $event_asset->vars[$attr][
'type'] =
'text';
1089 $event_asset->vars[$attr][
'value'] = $value;
1090 $event_asset->vars[$attr][
'is_contextable'] = 0;
1094 return $event_asset;
1113 public function getAssetInfo(Array $assetids, $type_code=Array(), $strict_type_code=TRUE, $field=
'')
1116 foreach ($assetids as $whole_assetid) {
1117 $assetid_parts = explode(
':', $whole_assetid);
1118 $assetid = $assetid_parts[0];
1119 if (empty($assetid_parts[1])) {
1120 $asset_type = $this->
type();
1122 $event_data_raw = explode(
',', $assetid_parts[1]);
1123 $event_data = Array();
1124 foreach($event_data_raw as $event) {
1125 list($key, $val) = explode(
"=", $event);
1126 $event_data[$key] = $val;
1128 $asset_type = $event_data[
'type_code'];
1131 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($assetid);
1133 if (!empty($field)) {
1134 if (isset($event_data[$field])) {
1135 $info[$whole_assetid] = $event_data[$field];
1136 }
else if (isset($asset->{$field})) {
1137 $info[$whole_assetid] = $asset->{$field};
1139 trigger_error(
'Invalid field for the asset type Calendar Event asset', E_USER_ERROR);
1142 $info[$whole_assetid] = Array(
1143 'type_code' => $asset_type,
1144 'version' => $asset->version,
1145 'name' => $asset->name,
1146 'short_name' => $asset->short_name,
1147 'status' => $asset->status,
1150 'force_secure' =>
'0',
1151 'created' => $asset->getKeywordReplacement(
'asset_created'),
1152 'created_userid' => $asset->created_userid,
1153 'updated' => $asset->getKeywordReplacement(
'asset_updated'),
1154 'updated_userid' => $asset->updated_userid,
1155 'published' => $asset->getKeywordReplacement(
'asset_published'),
1156 'published_userid' => $asset->published_userid,
1157 'status_changed' => $asset->getKeywordReplacement(
'asset_status_changed'),
1158 'status_changed_userid' => $asset->status_changed_userid,
1183 public function getAttributeValuesByName($attr_name, $asset_type, $assetids, $contextid=NULL)
1185 if (empty($assetids))
return Array();
1187 $real_assetids = Array();
1188 foreach($assetids as $full_assetid) {
1189 if (strpos($full_assetid,
':') !== FALSE) {
1190 list($real_assetids[]) = explode(
':', $full_assetid);
1192 $real_assetids[] = $full_assetid;
1196 $real_res = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName($attr_name, $asset_type, $real_assetids, $contextid);
1199 foreach($assetids as $full_assetid) {
1200 list($real_assetid) = explode(
':', $full_assetid);
1201 $res[$full_assetid] = isset($real_res[$real_assetid]) ? $real_res[$real_assetid] :
'';