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($idArtLang, $typeId, $type, $versioningState, $articleType, $version) {
365:
366: $idContent = array();
367: $type = addslashes($type);
368:
369: if ($versioningState == 'simple' && $articleType != 'version'
370: || $versioningState == 'advanced' && $articleType == 'current'
371: || $versioningState == 'disabled') {
372: $this->db->query("
373: SELECT
374: a.idcontent
375: FROM
376: " . cRegistry::getDbTableName('content') . " as a,
377: " . cRegistry::getDbTableName('type') . " as b
378: WHERE
379: a.idartlang=" . $idArtLang . "
380: AND a.idtype=b.idtype
381: AND a.typeid = " . $typeId . "
382: AND b.type = '" . $type . "'
383: ORDER BY
384: a.idartlang, a.idtype, a.typeid");
385: while ($this->db->nextRecord()) {
386: $idContent = $this->db->f('idcontent');
387: }
388: } else {
389: $this->db->query("
390: SELECT
391: a.idcontentversion
392: FROM
393: " . cRegistry::getDbTableName('content_version') . " as a,
394: " . cRegistry::getDbTableName('type') . " as b
395: WHERE
396: a.version <= " . $version . "
397: AND a.idartlang = " . $idArtLang . "
398: AND a.idtype = b.idtype
399: AND a.typeid = " . $typeId . "
400: AND b.type = '" . $type . "'
401: ORDER BY
402: a.version DESC, a.idartlang, a.idtype, a.typeid LIMIT 1");
403: while ($this->db->nextRecord()) {
404: $idContent = $this->db->f('idcontentversion');
405: }
406: }
407:
408: return $idContent;
409:
410: }
411:
412: 413: 414: 415: 416: 417: 418: 419: 420:
421: public function getDataForSelectElement($idArtLang, $selectElementType = '') {
422:
423: $artLangVersionMap = array();
424:
425: $artLangVersionColl = new cApiArticleLanguageVersionCollection();
426: $artLangVersionColl->addResultField('version');
427: $artLangVersionColl->addResultField('lastmodified');
428: $artLangVersionColl->setWhere('idartlang', $idArtLang);
429: $artLangVersionColl->setOrder('version desc');
430:
431: try {
432:
433: if ($selectElementType == 'content') {
434:
435:
436: $contentVersionColl = new cApiContentVersionCollection();
437: $contentVersionColl->addResultField('version');
438: $contentVersionColl->setWhere('idartlang', $idArtLang);
439: $contentVersionColl->query();
440: $contentFields['version'] = 'version';
441:
442:
443: if (0 >= $contentVersionColl->count()) {
444: throw new cException('no content versions');
445: }
446:
447: $table = $contentVersionColl->fetchTable($contentFields);
448:
449:
450: $contentVersionMap = array();
451: foreach ($table AS $key => $item) {
452: $contentVersionMap[] = $item['version'];
453: }
454: $contentVersionMap = array_unique($contentVersionMap);
455: $artLangVersionColl->setWhere('version', $contentVersionMap, 'IN');
456:
457: } else if ($selectElementType == 'seo') {
458:
459:
460: $metaVersionColl = new cApiMetaTagVersionCollection();
461: $metaVersionColl->addResultField('version');
462: $metaVersionColl->setWhere('idartlang', $idArtLang);
463: $metaVersionColl->query();
464: $metaFields['version'] = 'version';
465:
466:
467: if (0 >= $metaVersionColl->count()) {
468: throw new cException('no meta versions');
469: }
470:
471: $table = $metaVersionColl->fetchTable($metaFields);
472:
473:
474: $metaVersionMap = array();
475: foreach ($table AS $key => $item) {
476: $metaVersionMap[] = $item['version'];
477: }
478: $metaVersionMap = array_unique($metaVersionMap);
479: $artLangVersionColl->setWhere('version', $metaVersionMap, 'IN');
480:
481: } else if ($selectElementType == 'config') {
482:
483:
484:
485: }
486:
487: } catch (cException $e) {
488: return $artLangVersionMap;
489: }
490:
491: $artLangVersionColl->query();
492:
493: $fields['idartlangversion'] = 'idartlangversion';
494: $fields['version'] = 'version';
495: $fields['lastmodified'] = 'lastmodified';
496:
497: if (0 < $artLangVersionColl->count()) {
498: $table = $artLangVersionColl->fetchTable($fields);
499:
500: foreach ($table AS $key => $item) {
501: $artLangVersionMap[$item['version']][$item['idartlangversion']] = $item['lastmodified'];
502: }
503: }
504:
505: return $artLangVersionMap;
506:
507: }
508:
509: 510: 511: 512: 513: 514: 515: 516: 517: 518: 519:
520: public function prepareContentForSaving($idartlang, cApiContent $content, $value) {
521:
522:
523:
524:
525: static $savedTypes = array();
526: if (isset($savedTypes[$content->get('idtype') . $content->get('typeid')])) {
527: return;
528: }
529: $savedTypes[$content->get('idtype').$content->get('typeid')] = $value;
530:
531: $versioningState = $this->getState();
532: $date = date('Y-m-d H:i:s');
533:
534: $auth = cRegistry::getAuth();
535: $author = $auth->auth['uname'];
536:
537: switch ($versioningState) {
538: case 'simple':
539:
540: $idContent = NULL;
541: if ($content->isLoaded()) {
542: $idContent = $content->getField('idcontent');
543: }
544:
545: if ($idContent == NULL) {
546: $idContent = $this->getMaxIdContent() + 1;
547: }
548:
549: $parameters = array(
550: 'idcontent' => $idContent,
551: 'idartlang' => $idartlang,
552: 'idtype' => $content->get('idtype'),
553: 'typeid' => $content->get('typeid'),
554: 'value' => $value,
555: 'author' => $author,
556: 'created' => $date,
557: 'lastmodified' => $date
558: );
559:
560: $this->createContentVersion($parameters);
561: case 'disabled':
562: if ($content->isLoaded()) {
563:
564: $content->set('value', $value);
565: $content->set('author', $author);
566: $content->set('lastmodified', date('Y-m-d H:i:s'));
567: $content->store();
568: } else {
569:
570: $contentColl = new cApiContentCollection();
571: $content = $contentColl->create(
572: $idartlang,
573: $content->get('idtype'),
574: $content->get('typeid'),
575: $value,
576: 0,
577: $author,
578: $date,
579: $date
580: );
581: }
582:
583:
584: $lastmodified = date('Y-m-d H:i:s');
585: $artLang = new cApiArticleLanguage($idartlang);
586: $artLang->set('lastmodified', $lastmodified);
587: $artLang->set('modifiedby', $author);
588: $artLang->store();
589:
590: break;
591: case 'advanced':
592:
593: $idContent = NULL;
594: if ($content->isLoaded()) {
595: $idContent = $content->getField('idcontent');
596: }
597:
598: if ($idContent == NULL) {
599: $idContent = $this->getMaxIdContent() + 1;
600: }
601:
602: $parameters = array(
603: 'idcontent' => $idContent,
604: 'idartlang' => $idartlang,
605: 'idtype' => $content->get('idtype'),
606: 'typeid' => $content->get('typeid'),
607: 'value' => $value,
608: 'author' => $author,
609: 'created' => $date,
610: 'lastmodified' => $date
611: );
612:
613: $this->createContentVersion($parameters);
614: default:
615: break;
616: }
617: }
618:
619: 620: 621: 622: 623: 624: 625: 626: 627: 628: 629: 630: 631: 632:
633: public function createContentVersion(array $parameters) {
634:
635:
636: $currentArticle = cRegistry::getArticleLanguage();
637:
638:
639: $parametersArticleVersion = array(
640: 'idartlang' => $currentArticle->getField('idartlang'),
641: 'idart' => $currentArticle->getField('idart'),
642: 'idlang' => $currentArticle->getField('idlang'),
643: 'title' => $currentArticle->getField('title'),
644: 'urlname' => $currentArticle->getField('urlname'),
645: 'pagetitle' => $currentArticle->getField('pagetitle'),
646: 'summary' => $currentArticle->getField('summary'),
647: 'artspec' => $currentArticle->getField('artspec'),
648: 'created' => $currentArticle->getField('created'),
649: 'iscurrentversion' => 1,
650: 'author' => $currentArticle->getField('author'),
651: 'lastmodified' => date('Y-m-d H:i:s'),
652: 'modifiedby' => $currentArticle->getField('author'),
653: 'published' => $currentArticle->getField('published'),
654: 'publishedby' => $currentArticle->getField('publishedby'),
655: 'online' => $currentArticle->getField('online'),
656: 'redirect' => $currentArticle->getField('redirect'),
657: 'redirect_url' => $currentArticle->getField('redirect_url'),
658: 'external_redirect' => $currentArticle->getField('external_redirect'),
659: 'artsort' => $currentArticle->getField('artsort'),
660: 'timemgmt' => $currentArticle->getField('timemgmt'),
661: 'datestart' => $currentArticle->getField('datestart'),
662: 'dateend' => $currentArticle->getField('dateend'),
663: 'status' => $currentArticle->getField('status'),
664: 'time_move_cat' => $currentArticle->getField('time_move_cat'),
665: 'time_target_cat' => $currentArticle->getField('time_target_cat'),
666: 'time_online_move' => $currentArticle->getField('time_online_move'),
667: 'locked' => $currentArticle->getField('locked'),
668: 'free_use_01' => $currentArticle->getField('free_use_01'),
669: 'free_use_02' => $currentArticle->getField('free_use_02'),
670: 'free_use_03' => $currentArticle->getField('free_use_03'),
671: 'searchable' => $currentArticle->getField('searchable'),
672: 'sitemapprio' => $currentArticle->getField('sitemapprio'),
673: 'changefreq' => $currentArticle->getField('changefreq')
674: );
675:
676: $artLangVersion = $this->createArticleLanguageVersion($parametersArticleVersion);
677:
678:
679: $parameters['version'] = $artLangVersion->getField('version');
680:
681: $parametersToCheck = $parameters;
682: unset(
683: $parametersToCheck['lastmodified'],
684: $parametersToCheck['author'],
685: $parametersToCheck['value'],
686: $parametersToCheck['created']
687: );
688:
689:
690:
691:
692: $contentVersion = new cApiContentVersion();
693: $contentVersion->loadByMany($parametersToCheck);
694: if ($contentVersion->isLoaded()) {
695: $artLangVersion = $this->createArticleLanguageVersion($parametersArticleVersion);
696: $parameters['version'] = $artLangVersion->getField('version');
697: $contentVersionColl = new cApiContentVersionCollection();
698: $contentVersionColl->create($parameters);
699: } else {
700:
701: $contentVersionColl = new cApiContentVersionCollection();
702: $contentVersionColl->create($parameters);
703: }
704: }
705:
706: 707: 708: 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: public function createArticleLanguageVersion(array $parameters) {
751:
752: global $lang, $auth, $urlname, $page_title;
753:
754:
755: global $redirect, $redirect_url, $external_redirect;
756:
757:
758: global $time_move_cat;
759:
760:
761: global $time_target_cat;
762:
763:
764: global $time_online_move;
765:
766: global $timemgmt;
767:
768: $page_title = (empty($parameters['pagetitle'])) ? addslashes($page_title) : $parameters['pagetitle'];
769:
770: $parameters['title'] = stripslashes($parameters['title']);
771:
772: $redirect = (empty($parameters['redirect'])) ? cSecurity::toInteger($redirect) : $parameters['redirect'];
773: $redirect_url = (empty($parameters['page_title'])) ? stripslashes($redirect_url) : stripslashes($parameters['redirect_url']);
774: $external_redirect = (empty($parameters['external_redirect'])) ? stripslashes($external_redirect) : stripslashes($parameters['external_redirect']);
775:
776: $urlname = (trim($urlname) == '')? trim($parameters['title']) : trim($urlname);
777:
778: if ($parameters['isstart'] == 1) {
779: $timemgmt = 0;
780: }
781:
782: if (!is_array($parameters['idcatnew'])) {
783: $parameters['idcatnew'][0] = 0;
784: }
785:
786:
787: $artLangVersionParameters = array(
788: 'idartlang' => $parameters['idartlang'],
789: 'idart' => $parameters['idart'],
790: 'idlang' => $lang,
791: 'title' => $parameters['title'],
792: 'urlname' => $urlname,
793: 'pagetitle' => $page_title,
794: 'summary' => $parameters['summary'],
795: 'artspec' => $parameters['artspec'],
796: 'created' => $parameters['created'],
797: 'iscurrentversion' => $parameters['iscurrentversion'],
798: 'author' => $parameters['author'],
799: 'lastmodified' => date('Y-m-d H:i:s'),
800: 'modifiedby' => $auth->auth['uname'],
801: 'published' => $parameters['published'],
802: 'publishedby' => $parameters['publishedby'],
803: 'online' => $parameters['online'],
804: 'redirect' => $redirect,
805: 'redirect_url' => $redirect_url,
806: 'external_redirect' => $external_redirect,
807: 'artsort' => $parameters['artsort'],
808: 'timemgmt' => $timemgmt,
809: 'datestart' => $parameters['datestart'],
810: 'dateend' => $parameters['dateend'],
811: 'status' => 0,
812: 'time_move_cat' => $time_move_cat,
813: 'time_target_cat' => $time_target_cat,
814: 'time_online_move' => $time_online_move,
815: 'locked' => 0,
816: 'free_use_01' => '',
817: 'free_use_02' => '',
818: 'free_use_03' => '',
819: 'searchable' => $parameters['searchable'],
820: 'sitemapprio' => $parameters['sitemapprio'],
821: 'changefreq' => $parameters['changefreq']
822: );
823:
824:
825: $artLangVersionColl = new cApiArticleLanguageVersionCollection();
826: $artLangVersion = $artLangVersionColl->create($artLangVersionParameters);
827:
828:
829: if (isset($parameters['idartlang'])){
830: $where = 'idartlang = ' . $parameters['idartlang'];
831: $contentVersionColl = new cApiContentVersionCollection();
832: $contentVersions = $contentVersionColl->getIdsByWhereClause($where);
833: }
834:
835: if (empty($contentVersions)) {
836: $artLang = new cApiArticleLanguage($parameters['idartlang']);
837: $conType = new cApiType();
838: $content = new cApiContent();
839: foreach ($artLang->getContent() AS $type => $typeids) {
840: foreach ($typeids AS $typeid => $value) {
841: $conType->loadByType($type);
842: $content->loadByArticleLanguageIdTypeAndTypeId(
843: $parameters['idartlang'],
844: $conType->get('idtype'),
845: $typeid
846: );
847: $content->markAsEditable($artLangVersion->get('version'), 0);
848: }
849: }
850: }
851:
852:
853: if (isset($parameters['idartlang'])) {
854: $where = 'idartlang = ' . $parameters['idartlang'];
855: $metaTagVersionColl = new cApiMetaTagVersionCollection();
856: $metaTagVersions = $metaTagVersionColl->getIdsByWhereClause($where);
857: }
858:
859: if (empty($metaTagVersions)) {
860: $where = 'idartlang = ' . $parameters['idartlang'];
861: $metaTagColl = new cApiMetaTagCollection();
862: $metaTags = $metaTagColl->getIdsByWhereClause($where);
863: $metaTag = new cApiMetaTag();
864: foreach ($metaTags AS $id) {
865: $metaTag->loadBy('idmetatag', $id);
866: $metaTag->markAsEditable($artLangVersion->get('version'));
867: }
868: }
869:
870: return $artLangVersion;
871: }
872:
873: 874: 875: 876: 877: 878: 879: 880: 881: 882: 883: 884:
885: public function createMetaTagVersion(array $parameters) {
886:
887: $coll = new cApiMetaTagVersionCollection();
888: $item = $coll->create(
889: $parameters['idmetatag'],
890: $parameters['idartlang'],
891: $parameters['idmetatype'],
892: $parameters['value'],
893: $parameters['version']
894: );;
895:
896: return $item;
897:
898: }
899: }
900: