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