From 1fd0653eb6f50736132d79a38ee8b5a549d287a2 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Tue, 28 Jun 2016 23:08:56 +0200 Subject: [PATCH] Update script.php (#233) --- .../components/com_weblinks/script.php | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/src/administrator/components/com_weblinks/script.php b/src/administrator/components/com_weblinks/script.php index 19cfe7e..a3d1e03 100644 --- a/src/administrator/components/com_weblinks/script.php +++ b/src/administrator/components/com_weblinks/script.php @@ -151,11 +151,26 @@ class Com_WeblinksInstallerScript $query->values( $db->quote('Weblink') . ', ' . $db->quote('com_weblinks.weblink') . ', ' - . $db->quote('{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', ' + . $db->quote( + '{"special":{"dbtable":"#__weblinks","key":"id","type":"Weblink","prefix":"WeblinksTable","config":"array()"}, + "common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', ' . $db->quote('') . ', ' - . $db->quote('{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"url", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}') . ', ' + . $db->quote( + '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias", + "core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"hits", + "core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", + "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"url", + "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", + "core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special":{}}') . ', ' . $db->quote('WeblinksHelperRoute::getWeblinkRoute') . ', ' - . $db->quote('{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","featured","images"], "ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"], "convertToInt":["publish_up", "publish_down", "featured", "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}') + . $db->quote( + '{"formFile":"administrator\\/components\\/com_weblinks\\/models\\/forms\\/weblink.xml", + "hideFields":["asset_id","checked_out","checked_out_time","version","featured","images"], "ignoreChanges":["modified_by", + "modified", "checked_out", "checked_out_time", "version", "hits"], "convertToInt":["publish_up", "publish_down", "featured", + "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, + {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, + {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"}, + {"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}') ); $db->setQuery($query); @@ -172,11 +187,29 @@ class Com_WeblinksInstallerScript $query->values( $db->quote('Weblinks Category') . ', ' . $db->quote('com_weblinks.category') . ', ' - . $db->quote('{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', ' + . $db->quote(' + {"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"}, + "common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}') . ', ' . $db->quote('') . ', ' - . $db->quote('{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}') . ', ' + . $db->quote(' + {"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias", + "core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", + "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", + "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", + "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", + "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, + "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}') . ', ' . $db->quote('WeblinksHelperRoute::getCategoryRoute') . ', ' - . $db->quote('{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}') + . $db->quote(' + {"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", + "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], + "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", + "hits", "path"],"convertToInt":["publish_up", "publish_down"], + "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id", + "displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id", + "displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id", + "displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id", + "displayColumn":"title"}]}') ); $db->setQuery($query);