1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
16:
17: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
18:
19: 20: 21: 22: 23: 24:
25: class cContentVersioning {
26:
27: 28: 29: 30: 31:
32: protected $db;
33:
34: 35: 36: 37: 38:
39: protected $articleType;
40:
41: 42: 43: 44: 45:
46: public $selectedArticle;
47:
48: 49: 50: 51: 52:
53: public $editableArticleId;
54:
55: 56: 57:
58: public function __construct() {
59: $this->db = cRegistry::getDb();
60: }
61:
62: 63: 64: 65: 66: 67: 68:
69: public function sortResults(array $result) {
70:
71: uksort($result, function($a, $b) {
72:
73:
74: $cmsType = array(
75: "CMS_HTMLHEAD",
76: "CMS_HEAD",
77: "CMS_HTML",
78: "CMS_TEXT",
79: "CMS_IMG",
80: "CMS_IMGDESCR",
81: "CMS_IMGEDITOR",
82: "CMS_LINK",
83: "CMS_LINKTARGET",
84: "CMS_LINKDESCR",
85: "CMS_LINKEDITOR",
86: "CMS_DATE",
87: "CMS_TEASER",
88: "CMS_FILELIST",
89: "CMS_RAW"
90: );
91:
92: return array_search($a, $cmsType) - array_search($b, $cmsType);
93:
94: });
95:
96: return $result;
97:
98: }
99:
100: 101: 102: 103: 104: 105: 106: 107:
108: public function getTimeDiff($lastModified) {
109: $currentTime = new DateTime(date('Y-m-d H:i:s'));
110: $modifiedTime = new DateTime($lastModified);
111: $diff = $currentTime->diff($modifiedTime);
112: $diff2 = (int) $diff->format('%Y%M%D%H');
113:
114: if ($diff2 === 0) {
115: return sprintf(i18n("%d minutes ago"), $diff->format('%i'));
116: } else {
117: return date('d.m.Y, H:i\h', strtotime($lastModified));
118: }
119:
120: }
121:
122: 123: 124: 125: 126:
127: public static function getState() {
128:
129: static $versioningState;
130:
131: if (!isset($versioningState)) {
132:
133:
134: $systemPropColl = new cApiSystemPropertyCollection();
135: $prop = $systemPropColl->fetchByTypeName('versioning', 'enabled');
136: $versioningState = $prop ? $prop->get('value') : false;
137:
138: if (false === $versioningState || NULL === $versioningState) {
139: $versioningState = 'disabled';
140: } else if ('' === $versioningState) {
141:
142: $versioningState = 'disabled';
143: }
144:
145: }
146:
147: return $versioningState;
148:
149: }
150:
151: 152: 153: 154: 155: 156: 157: 158: 159: 160:
161: public function getSelectedArticle($idArtLangVersion, $idArtLang, $articleType, $selectedArticleId = NULL) {
162:
163: $this->editableArticleId = $this->getEditableArticleId($idArtLang);
164: $versioningState = $this->getState();
165: $this->selectedArticle = NULL;
166: if (is_numeric($selectedArticleId)) {
167: $idArtLangVersion = $selectedArticleId;
168: }
169:
170: if (($articleType == 'version' || $articleType == 'editable') && ($versioningState == 'advanced')
171: || ($articleType == 'version' && $versioningState == 'simple')) {
172: if (is_numeric($idArtLangVersion) && $articleType == 'version') {
173: $this->selectedArticle = new cApiArticleLanguageVersion($idArtLangVersion);
174: } else if (isset($this->editableArticleId)) {
175: $this->selectedArticle = new cApiArticleLanguageVersion($this->editableArticleId);
176: }
177: } else if ($articleType == 'current' || $articleType == 'editable') {
178: $this->selectedArticle = new cApiArticleLanguage($idArtLang);
179: }
180:
181: return $this->selectedArticle;
182:
183: }
184:
185: 186: 187: 188: 189: 190: 191: 192:
193: public function getList($idArtLang, $articleType) {
194:
195: $sql = 'SELECT DISTINCT b.idtype as idtype, b.type as name
196: FROM %s AS a, %s AS b
197: WHERE a.idartlang = %d AND a.idtype = b.idtype
198: ORDER BY idtype, name';
199:
200: if (($articleType == 'version' || $articleType == 'editable') && $this->getState() == 'advanced'
201: || $articleType == 'version' && $this->getState() == 'simple') {
202: $this->db->query($sql, cRegistry::getDbTableName('content_version'), cRegistry::getDbTableName('type'), $idArtLang);
203: } else if ($articleType == 'current' || $articleType == 'editable' && $this->getState() != 'advanced') {
204: $this->db->query($sql, cRegistry::getDbTableName('content'), cRegistry::getDbTableName('type'), $idArtLang);
205: }
206:
207: $list = array();
208: while ($this->db->nextRecord()) {
209: $list[$this->db->f('idtype')] = $this->db->f('name');
210: }
211:
212: return $list;
213:
214: }
215:
216: 217: 218: 219: 220:
221: public function getMaxIdContent() {
222:
223: $sql = 'SELECT max(idcontent) AS max FROM %s';
224: $this->db->query($sql, cRegistry::getDbTableName('content'));
225: $this->db->nextRecord();
226:
227: return $this->db->f('max');
228: }
229:
230: 231: 232: 233: 234: 235: 236: 237: 238: 239:
240: public function getArticleType($idArtLangVersion, $idArtLang, $action, $selectedArticleId) {
241:
242: $this->editableArticleId = $this->getEditableArticleId($idArtLang);
243:
244: if ($this->getState() == 'disabled'
245: || ($this->getState() == 'simple' && ($selectedArticleId == 'current'
246: || $selectedArticleId == NULL)
247: && ($action == 'con_meta_deletetype' || $action == 'copyto'
248: || $action == 'con_content' || $idArtLangVersion == NULL
249: || $action == 'con_saveart' || $action == 'con_edit' || $action == 'con_meta_edit' || $action == 'con_editart'))
250: || $idArtLangVersion == 'current' && $action != 'copyto'
251: || $action == 'copyto' && $idArtLangVersion == $this->editableArticleId
252: || $action == 'con_meta_change_version' && $idArtLang == 'current'
253: || $selectedArticleId == 'current' && $action != 'copyto'
254: || $this->editableArticleId == NULL
255: && $action != 'con_meta_saveart' && $action != 'con_newart') {
256: $this->articleType = 'current';
257: } else if ($this->getState() == 'advanced' && ($selectedArticleId == 'editable'
258: || $selectedArticleId == NULL || $this->editableArticleId === $selectedArticleId)
259: && ($action == 'con_content' || $action == 'con_meta_deletetype'
260: || $action == 'con_meta_edit' || $action == 'con_edit' || $action == 'con_editart')
261: || $action == 'copyto' || $idArtLangVersion == 'current'
262: || $idArtLangVersion == $this->editableArticleId
263: || $action == 'importrawcontent' || $action == 'savecontype'
264: || $action == 'con_editart' && $this->getState() == 'advanced' && $selectedArticleId == 'editable'
265: || $action == 'con_edit' && $this->getState() == 'advanced' && $selectedArticleId == NULL
266: || $action == '20' && $idArtLangVersion == NULL
267: || $action == 'con_meta_saveart' || $action == 'con_saveart'
268: || $action == 'con_newart' || $action == 'con_meta_change_version'
269: && $idArtLangVersion == $this->editableArticleId) {
270: $this->articleType = 'editable';
271: } else {
272: $this->articleType = 'version';
273: }
274:
275: return $this->articleType;
276:
277: }
278:
279: 280: 281: 282: 283: 284: 285: 286:
287: public function getVersionSelectionField($class, $selectElement, $copyToButton, $infoText) {
288:
289:
290: $versionselection = '
291: <div class="%s">
292: <div>
293: <span style="width: 280px; display: inline; padding: 0px 0px 0px 2px;">
294: <span style="font-weight:bold;color:black;">' . i18n('Select Article Version') . '</span>
295: <span style="margin: 0;"> %s %s
296: </span>
297: <a
298: href="#"
299: id="pluginInfoDetails-link"
300: class="main i-link infoButton"
301: title="">
302: </a>
303: </span>
304: </div>
305: <div id="pluginInfoDetails" style="display:none;" class="nodisplay">
306: %s
307: </div>
308: </div>';
309:
310: return sprintf(
311: $versionselection,
312: $class,
313: $selectElement,
314: $copyToButton,
315: $infoText
316: );
317: }
318:
319: 320: 321: 322: 323: 324:
325: public function getEditableArticleId($idArtLang) {
326:
327: if ($this->getState() == 'advanced') {
328:
329: $this->db->query(
330: 'SELECT
331: max(idartlangversion) AS max
332: FROM
333: %s
334: WHERE
335: idartlang = %d',
336: cRegistry::getDbTableName('art_lang_version'),
337: $idArtLang
338: );
339: $this->db->nextRecord();
340: $this->editableArticleId = $this->db->f('max');
341:
342: return $this->editableArticleId;
343:
344: } else if ($this->getState() == 'simple' || $this->getState() == 'disabled') {
345:
346: return $idArtLang;
347:
348: }
349:
350: }
351:
352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363:
364: public function getContentId(
365: $idArtLang, $typeId, $type, $versioningState, $articleType, $version
366: ) {
367:
368: $idContent = array();
369: $type = addslashes($type);
370:
371: if ($versioningState == 'simple' && $articleType != 'version'
372: || $versioningState == 'advanced' && $articleType == 'current'
373: || $versioningState == 'disabled') {
374: $this->db->query("
375: SELECT
376: a.idcontent
377: FROM
378: " . cRegistry::getDbTableName('content') . " as a,
379: " . cRegistry::getDbTableName('type') . " as b
380: WHERE
381: a.idartlang=" . $idArtLang . "
382: AND a.idtype=b.idtype
383: AND a.typeid = " . $typeId . "
384: AND b.type = '" . $type . "'
385: ORDER BY
386: a.idartlang, a.idtype, a.typeid");
387: while ($this->db->nextRecord()) {
388: $idContent = $this->db->f('idcontent');
389: }
390: } else {
391: $this->db->query("
392: SELECT
393: a.idcontentversion
394: FROM
395: " . cRegistry::getDbTableName('content_version') . " as a,
396: " . cRegistry::getDbTableName('type') . " as b
397: WHERE
398: a.version <= " . $version . "
399: AND a.idartlang = " . $idArtLang . "
400: AND a.idtype = b.idtype
401: AND a.typeid = " . $typeId . "
402: AND b.type = '" . $type . "'
403: ORDER BY
404: a.version DESC, a.idartlang, a.idtype, a.typeid LIMIT 1");
405: while ($this->db->nextRecord()) {
406: $idContent = $this->db->f('idcontentversion');
407: }
408: }
409:
410: return $idContent;
411:
412: }
413:
414: 415: 416: 417: 418: 419: 420: 421: 422:
423: public function getDataForSelectElement($idArtLang, $selectElementType = '') {
424:
425: $artLangVersionMap = array();
426:
427: $artLangVersionColl = new cApiArticleLanguageVersionCollection();
428: $artLangVersionColl->addResultField('version');
429: $artLangVersionColl->addResultField('lastmodified');
430: $artLangVersionColl->setWhere('idartlang', $idArtLang);
431: $artLangVersionColl->setOrder('version desc');
432:
433: try {
434:
435: if ($selectElementType == 'content') {
436:
437:
438: $contentVersionColl = new cApiContentVersionCollection();
439: $contentVersionColl->addResultField('version');
440: $contentVersionColl->setWhere('idartlang', $idArtLang);
441: $contentVersionColl->query();
442: $contentFields['version'] = 'version';
443:
444:
445: if (0 >= $contentVersionColl->count()) {
446: throw new cException('no content versions');
447: }
448:
449: $table = $contentVersionColl->fetchTable($contentFields);
450:
451:
452: $contentVersionMap = array();
453: foreach ($table AS $key => $item) {
454: $contentVersionMap[] = $item['version'];
455: }
456: $contentVersionMap = array_unique($contentVersionMap);
457: $artLangVersionColl->setWhere('version', $contentVersionMap, 'IN');
458:
459: } else if ($selectElementType == 'seo') {
460:
461:
462: $metaVersionColl = new cApiMetaTagVersionCollection();
463: $metaVersionColl->addResultField('version');
464: $metaVersionColl->setWhere('idartlang', $idArtLang);
465: $metaVersionColl->query();
466: $metaFields['version'] = 'version';
467:
468:
469: if (0 >= $metaVersionColl->count()) {
470: throw new cException('no meta versions');
471: }
472:
473: $table = $metaVersionColl->fetchTable($metaFields);
474:
475:
476: $metaVersionMap = array();
477: foreach ($table AS $key => $item) {
478: $metaVersionMap[] = $item['version'];
479: }
480: $metaVersionMap = array_unique($metaVersionMap);
481: $artLangVersionColl->setWhere('version', $metaVersionMap, 'IN');
482:
483: } else if ($selectElementType == 'config') {
484:
485:
486:
487: }
488:
489: } catch (cException $e) {
490: return $artLangVersionMap;
491: }
492:
493: $artLangVersionColl->query();
494:
495: $fields['idartlangversion'] = 'idartlangversion';
496: $fields['version'] = 'version';
497: $fields['lastmodified'] = 'lastmodified';
498:
499: if (0 < $artLangVersionColl->count()) {
500: $table = $artLangVersionColl->fetchTable($fields);
501:
502: foreach ($table AS $key => $item) {
503: $artLangVersionMap[$item['version']][$item['idartlangversion']] = $item['lastmodified'];
504: }
505: }
506:
507: return $artLangVersionMap;
508:
509: }
510:
511: 512: 513: 514: 515: 516: 517: 518: 519: 520: 521: 522:
523: public function prepareContentForSaving($idartlang, cApiContent $content, $value) {
524:
525:
526:
527:
528: static $savedTypes = array();
529: if (isset($savedTypes[$content->get('idtype') . $content->get('typeid')])) {
530: return;
531: }
532: $savedTypes[$content->get('idtype').$content->get('typeid')] = $value;
533:
534: $versioningState = $this->getState();
535: $date = date('Y-m-d H:i:s');
536: $author = $auth->auth['uname'];
537:
538: switch ($versioningState) {
539: case 'simple':
540:
541: $idContent = NULL;
542: if ($content->isLoaded()) {
543: $idContent = $content->getField('idcontent');
544: }
545:
546: if ($idContent == NULL) {
547: $idContent = $this->getMaxIdContent() + 1;
548: }
549:
550: $parameters = array(
551: 'idcontent' => $idContent,
552: 'idartlang' => $idartlang,
553: 'idtype' => $content->get('idtype'),
554: 'typeid' => $content->get('typeid'),
555: 'value' => $value,
556: 'author' => $author,
557: 'created' => $date,
558: 'lastmodified' => $date
559: );
560:
561: $this->createContentVersion($parameters);
562: case 'disabled':
563: if ($content->isLoaded()) {
564:
565: $content->set('value', $value);
566: $content->set('author', $author);
567: $content->set('lastmodified', date('Y-m-d H:i:s'));
568: $content->store();
569: } else {
570:
571: $contentColl = new cApiContentCollection();
572: $content = $contentColl->create(
573: $idartlang,
574: $content->get('idtype'),
575: $content->get('typeid'),
576: $value,
577: 0,
578: $author,
579: $date,
580: $date
581: );
582: }
583:
584:
585: $lastmodified = date('Y-m-d H:i:s');
586: $artLang = new cApiArticleLanguage($idartlang);
587: $artLang->set('lastmodified', $lastmodified);
588: $artLang->set('modifiedby', $author);
589: $artLang->store();
590:
591: break;
592: case 'advanced':
593:
594: $idContent = NULL;
595: if ($content->isLoaded()) {
596: $idContent = $content->getField('idcontent');
597: }
598:
599: if ($idContent == NULL) {
600: $idContent = $this->getMaxIdContent() + 1;
601: }
602:
603: $parameters = array(
604: 'idcontent' => $idContent,
605: 'idartlang' => $idartlang,
606: 'idtype' => $content->get('idtype'),
607: 'typeid' => $content->get('typeid'),
608: 'value' => $value,
609: 'author' => $author,
610: 'created' => $date,
611: 'lastmodified' => $date
612: );
613:
614: $this->createContentVersion($parameters);
615: default:
616: break;
617: }
618: }
619:
620: 621: 622: 623: 624: 625: 626: 627: 628: 629: 630: 631: 632: 633:
634: public function createContentVersion(array $parameters) {
635:
636:
637: $currentArticle = cRegistry::getArticleLanguage();
638:
639:
640: $parametersArticleVersion = array(
641: 'idartlang' => $currentArticle->getField('idartlang'),
642: 'idart' => $currentArticle->getField('idart'),
643: 'idlang' => $currentArticle->getField('idlang'),
644: 'title' => $currentArticle->getField('title'),
645: 'urlname' => $currentArticle->getField('urlname'),
646: 'pagetitle' => $currentArticle->getField('pagetitle'),
647: 'summary' => $currentArticle->getField('summary'),
648: 'artspec' => $currentArticle->getField('artspec'),
649: 'created' => $currentArticle->getField('created'),
650: 'iscurrentversion' => 1,
651: 'author' => $currentArticle->getField('author'),
652: 'lastmodified' => date('Y-m-d H:i:s'),
653: 'modifiedby' => $currentArticle->getField('author'),
654: 'published' => $currentArticle->getField('published'),
655: 'publishedby' => $currentArticle->getField('publishedby'),
656: 'online' => $currentArticle->getField('online'),
657: 'redirect' => $currentArticle->getField('redirect'),
658: 'redirect_url' => $currentArticle->getField('redirect_url'),
659: 'external_redirect' => $currentArticle->getField('external_redirect'),
660: 'artsort' => $currentArticle->getField('artsort'),
661: 'timemgmt' => $currentArticle->getField('timemgmt'),
662: 'datestart' => $currentArticle->getField('datestart'),
663: 'dateend' => $currentArticle->getField('dateend'),
664: 'status' => $currentArticle->getField('status'),
665: 'time_move_cat' => $currentArticle->getField('time_move_cat'),
666: 'time_target_cat' => $currentArticle->getField('time_target_cat'),
667: 'time_online_move' => $currentArticle->getField('time_online_move'),
668: 'locked' => $currentArticle->getField('locked'),
669: 'free_use_01' => $currentArticle->getField('free_use_01'),
670: 'free_use_02' => $currentArticle->getField('free_use_02'),
671: 'free_use_03' => $currentArticle->getField('free_use_03'),
672: 'searchable' => $currentArticle->getField('searchable'),
673: 'sitemapprio' => $currentArticle->getField('sitemapprio'),
674: 'changefreq' => $currentArticle->getField('changefreq')
675: );
676:
677: $artLangVersion = $this->createArticleLanguageVersion($parametersArticleVersion);
678:
679:
680: $parameters['version'] = $artLangVersion->getField('version');
681:
682: $parametersToCheck = $parameters;
683: unset(
684: $parametersToCheck['lastmodified'],
685: $parametersToCheck['author'],
686: $parametersToCheck['value'],
687: $parametersToCheck['created']
688: );
689:
690:
691:
692:
693: $contentVersion = new cApiContentVersion();
694:
695: $contentVersion->loadByMany($parametersToCheck);
696: if ($contentVersion->isLoaded()) {
697:
698:
699: $artLangVersion = $this->createArticleLanguageVersion($parametersArticleVersion);
700: $parameters['version'] = $artLangVersion->getField('version');
701: $contentVersionColl = new cApiContentVersionCollection();
702: $contentVersionColl->create($parameters);
703:
704:
705: } else {
706:
707: $contentVersionColl = new cApiContentVersionCollection();
708: $contentVersionColl->create($parameters);
709: }
710: }
711:
712: 713: 714: 715: 716: 717: 718: 719: 720: 721: 722: 723: 724: 725: 726: 727: 728: 729: 730: 731: 732: 733: 734: 735: 736: 737: 738: 739: 740: 741: 742: 743: 744: 745: 746: 747: 748: 749: 750: 751: 752: 753: 754: 755:
756: public function createArticleLanguageVersion(array $parameters) {
757:
758: global $lang, $auth, $urlname, $page_title;
759:
760:
761: global $redirect, $redirect_url, $external_redirect;
762:
763:
764: global $time_move_cat;
765:
766:
767: global $time_target_cat;
768:
769:
770: global $time_online_move;
771:
772: global $timemgmt;
773:
774: $page_title = (empty($parameters['pagetitle'])) ? addslashes($page_title) : $parameters['pagetitle'];
775:
776: $parameters['title'] = stripslashes($parameters['title']);
777:
778: $redirect = (empty($parameters['redirect'])) ? cSecurity::toInteger($redirect) : $parameters['redirect'];
779: $redirect_url = (empty($parameters['page_title'])) ? stripslashes($redirect_url) : stripslashes($parameters['redirect_url']);
780: $external_redirect = (empty($parameters['external_redirect'])) ? stripslashes($external_redirect) : stripslashes($parameters['external_redirect']);
781:
782: $urlname = (trim($urlname) == '')? trim($parameters['title']) : trim($urlname);
783:
784: if ($parameters['isstart'] == 1) {
785: $timemgmt = 0;
786: }
787:
788: if (!is_array($parameters['idcatnew'])) {
789: $parameters['idcatnew'][0] = 0;
790: }
791:
792:
793: $artLangVersionParameters = array(
794: 'idartlang' => $parameters['idartlang'],
795: 'idart' => $parameters['idart'],
796: 'idlang' => $lang,
797: 'title' => $parameters['title'],
798: 'urlname' => $urlname,
799: 'pagetitle' => $page_title,
800: 'summary' => $parameters['summary'],
801: 'artspec' => $parameters['artspec'],
802: 'created' => $parameters['created'],
803: 'iscurrentversion' => $parameters['iscurrentversion'],
804: 'author' => $parameters['author'],
805: 'lastmodified' => date('Y-m-d H:i:s'),
806: 'modifiedby' => $auth->auth['uname'],
807: 'published' => $parameters['published'],
808: 'publishedby' => $parameters['publishedby'],
809: 'online' => $parameters['online'],
810: 'redirect' => $redirect,
811: 'redirect_url' => $redirect_url,
812: 'external_redirect' => $external_redirect,
813: 'artsort' => $parameters['artsort'],
814: 'timemgmt' => $timemgmt,
815: 'datestart' => $parameters['datestart'],
816: 'dateend' => $parameters['dateend'],
817: 'status' => 0,
818: 'time_move_cat' => $time_move_cat,
819: 'time_target_cat' => $time_target_cat,
820: 'time_online_move' => $time_online_move,
821: 'locked' => 0,
822: 'free_use_01' => '',
823: 'free_use_02' => '',
824: 'free_use_03' => '',
825: 'searchable' => $parameters['searchable'],
826: 'sitemapprio' => $parameters['sitemapprio'],
827: 'changefreq' => $parameters['changefreq']
828: );
829:
830:
831: $artLangVersionColl = new cApiArticleLanguageVersionCollection();
832: $artLangVersion = $artLangVersionColl->create($artLangVersionParameters);
833:
834:
835: if (isset($parameters['idartlang'])){
836: $where = 'idartlang = ' . $parameters['idartlang'];
837: $contentVersionColl = new cApiContentVersionCollection();
838: $contentVersions = $contentVersionColl->getIdsByWhereClause($where);
839: }
840:
841: if (empty($contentVersions)) {
842: $artLang = new cApiArticleLanguage($parameters['idartlang']);
843: $conType = new cApiType();
844: $content = new cApiContent();
845: foreach ($artLang->getContent() AS $type => $typeids) {
846: foreach ($typeids AS $typeid => $value) {
847: $conType->loadByType($type);
848: $content->loadByArticleLanguageIdTypeAndTypeId(
849: $parameters['idartlang'],
850: $conType->get('idtype'),
851: $typeid
852: );
853: $content->markAsEditable($artLangVersion->get('version'), 0);
854: }
855: }
856: }
857:
858:
859: if (isset($parameters['idartlang'])) {
860: $where = 'idartlang = ' . $parameters['idartlang'];
861: $metaTagVersionColl = new cApiMetaTagVersionCollection();
862: $metaTagVersions = $metaTagVersionColl->getIdsByWhereClause($where);
863: }
864:
865: if (empty($metaTagVersions)) {
866: $where = 'idartlang = ' . $parameters['idartlang'];
867: $metaTagColl = new cApiMetaTagCollection();
868: $metaTags = $metaTagColl->getIdsByWhereClause($where);
869: $metaTag = new cApiMetaTag();
870: foreach ($metaTags AS $id) {
871: $metaTag->loadBy('idmetatag', $id);
872: $metaTag->markAsEditable($artLangVersion->get('version'));
873: }
874: }
875:
876: return $artLangVersion;
877: }
878:
879: 880: 881: 882: 883: 884: 885: 886: 887: 888: 889: 890:
891: public function createMetaTagVersion(array $parameters) {
892:
893: $coll = new cApiMetaTagVersionCollection();
894: $item = $coll->create(
895: $parameters['idmetatag'],
896: $parameters['idartlang'],
897: $parameters['idmetatype'],
898: $parameters['value'],
899: $parameters['version']
900: );;
901:
902: return $item;
903:
904: }
905: }
906: