diff --git a/plugins/ktstandard/AdminVersionPlugin/AdminVersion.inc.php b/plugins/ktstandard/AdminVersionPlugin/AdminVersion.inc.php deleted file mode 100644 index 755fb29..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/AdminVersion.inc.php +++ /dev/null @@ -1,90 +0,0 @@ - $v) - { - $aEncoded[] = sprintf("%s=%s", urlencode($k), urlencode($v)); - } - - if (empty($url)) - $sUrl = self::KT_VERSION_URL; - else - $sUrl = $url; - $sUrl .= '?' . implode('&', $aEncoded); - - $sIdentifier = KTUtil::getSystemIdentifier(); - $sUrl .= '&' . sprintf("system_identifier=%s", $sIdentifier); - - if (!function_exists('curl_init')) - { - $stuff = @file_get_contents($sUrl); - } - else - { - $ch = @curl_init($sUrl); - if (!$ch) - { - return false; - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 10); - $stuff = curl_exec($ch); - curl_close($ch); - } - if ($stuff === false) - { - $stuff = ""; - } - else - { - $stuff = str_replace('\'','"', $stuff); - $decoded = json_decode($stuff); - if ($decoded === false) - { - return false; - } - KTUtil::setSystemSetting('ktadminversion_lastcheck', date('Y-m-d H:i:s')); - KTUtil::setSystemSetting('ktadminversion_lastvalue', serialize($decoded)); - } - } - - public static - function isNewVersionAvailable() - { - $aVersions = KTUtil::getKTVersions(); - - $name = array_keys($aVersions); - $name = $name[0]; - $version = array_values($aVersions); - $version = $version[0]; - - $aRemoteVersions = unserialize(KTUtil::getSystemSetting('ktadminversion_lastvalue')); - - $aVersions = get_object_vars($aRemoteVersions); - - if (!isset($aVersions[$name])) - { - return false; - } - - $newVersion = $aRemoteVersions->$name; - if (version_compare($version, $newVersion) == -1) - { - return array('name'=>$name,'version'=>$aRemoteVersions->$name); - } - - return false; - } -} - -?> \ No newline at end of file diff --git a/plugins/ktstandard/AdminVersionPlugin/AdminVersionDashlet.php b/plugins/ktstandard/AdminVersionPlugin/AdminVersionDashlet.php deleted file mode 100644 index f59c80e..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/AdminVersionDashlet.php +++ /dev/null @@ -1,76 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -require_once('AdminVersion.inc.php'); - -class AdminVersionDashlet extends KTBaseDashlet { - var $sClass = 'ktError'; - - function AdminVersionDashlet(){ - $this->sTitle = _kt('New Version Available'); - } - - function is_active($oUser) - { - $this->version = AdminVersion::isNewVersionAvailable(); - if ($this->version === false) - { - return false; - } - return Permission::userIsSystemAdministrator(); - } - - function render() { - global $main; - - $oTemplating =& KTTemplating::getSingleton(); - $oTemplate = $oTemplating->loadTemplate('dashlet'); - - $name = $this->version['name']; - $version = $this->version['version']; - - $aTemplateData = array( - 'context' => $this, - 'name' => $name, - 'version' => $version - ); - - return $oTemplate->render($aTemplateData); - } -} -?> \ No newline at end of file diff --git a/plugins/ktstandard/AdminVersionPlugin/AdminVersionPlugin.php b/plugins/ktstandard/AdminVersionPlugin/AdminVersionPlugin.php deleted file mode 100644 index c45f24d..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/AdminVersionPlugin.php +++ /dev/null @@ -1,68 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -require_once(KT_LIB_DIR . "/plugins/plugin.inc.php"); -require_once(KT_LIB_DIR . "/plugins/pluginregistry.inc.php"); -require_once(KT_LIB_DIR . "/templating/templating.inc.php"); - - class AdminVersionPlugin extends KTPlugin - { - var $sNamespace = 'ktstandard.adminversion.plugin'; - var $autoRegister = true; - - function AdminVersionPlugin($sFilename = null) { - - $res = parent::KTPlugin($sFilename); - $this->sFriendlyName = _kt('Admin Version Notifier'); - return $res; - - } - - function setup() { - - $this->registerDashlet('AdminVersionDashlet', 'ktstandard.adminversion.dashlet', 'AdminVersionDashlet.php'); - - $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('AdminVersionDashlet', '/plugins/ktstandard/AdminVersionPlugin/templates'); - } - } - -$oPluginRegistry =& KTPluginRegistry::getSingleton(); -$oPluginRegistry->registerPlugin('AdminVersionPlugin', 'ktstandard.adminversion.plugin', __FILE__); - -?> \ No newline at end of file diff --git a/plugins/ktstandard/AdminVersionPlugin/bin/UpdateNewVersion.php b/plugins/ktstandard/AdminVersionPlugin/bin/UpdateNewVersion.php deleted file mode 100644 index ae01a20..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/bin/UpdateNewVersion.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -chdir(dirname(__FILE__)); -require_once(realpath('../../../../config/dmsDefaults.php')); -require_once('../AdminVersion.inc.php'); - -AdminVersion::refresh(); - diff --git a/plugins/ktstandard/AdminVersionPlugin/templates/computer_go.png b/plugins/ktstandard/AdminVersionPlugin/templates/computer_go.png deleted file mode 100644 index 0b26144..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/templates/computer_go.png +++ /dev/null diff --git a/plugins/ktstandard/AdminVersionPlugin/templates/dashlet.smarty b/plugins/ktstandard/AdminVersionPlugin/templates/dashlet.smarty deleted file mode 100644 index 8c7ac42..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/templates/dashlet.smarty +++ /dev/null @@ -1,26 +0,0 @@ -{literal} - - - -{/literal} - -
-
- The following upgrade is available: -
-
-
-
\ No newline at end of file diff --git a/plugins/ktstandard/AdminVersionPlugin/test/checkVersion.php b/plugins/ktstandard/AdminVersionPlugin/test/checkVersion.php deleted file mode 100644 index 74e224c..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/test/checkVersion.php +++ /dev/null @@ -1,50 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -chdir(dirname(__FILE__)); -require_once(realpath('../../../../config/dmsDefaults.php')); -require_once('../AdminVersion.inc.php'); - -$version = AdminVersion::isNewVersionAvailable(); - -if ($version == false) -print 'No new version available.'; -else -print_r($version); - diff --git a/plugins/ktstandard/AdminVersionPlugin/test/latestVersion.php b/plugins/ktstandard/AdminVersionPlugin/test/latestVersion.php deleted file mode 100644 index cbace13..0000000 --- a/plugins/ktstandard/AdminVersionPlugin/test/latestVersion.php +++ /dev/null @@ -1,48 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -// NOTE: this is a test script. The values are for test purposes only. - -$versions = array( -'Development OSS'=> '3.5' -); - -print json_encode($versions); - -?> \ No newline at end of file diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index 6d55286..f199d99 100644 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -1281,25 +1281,24 @@ INSERT INTO `plugins` VALUES (2,'ktcore.rss.plugin','plugins/rssplugin/RSSPlugin.php',0,0,NULL,0,'RSS Plugin',0), (3,'ktcore.language.plugin','plugins/ktcore/KTCoreLanguagePlugin.php',0,0,NULL,0,'Core Language Support',-75), (4,'ktcore.plugin','plugins/ktcore/KTCorePlugin.php',0,0,NULL,0,'Core Application Functionality',-25), -(5,'ktstandard.adminversion.plugin','plugins/ktstandard/AdminVersionPlugin/AdminVersionPlugin.php',0,0,NULL,0,'Admin Version Notifier',0), -(6,'ktstandard.ldapauthentication.plugin','plugins/ktstandard/KTLDAPAuthenticationPlugin.php',0,0,NULL,0,'LDAP Authentication Plugin',0), -(7,'ktstandard.pdf.plugin','plugins/ktstandard/PDFGeneratorPlugin.php',0,0,NULL,0,'PDF Generator Plugin',0), -(8,'ktstandard.bulkexport.plugin','plugins/ktstandard/KTBulkExportPlugin.php',0,0,NULL,0,'Bulk Export Plugin',0), -(9,'ktstandard.immutableaction.plugin','plugins/ktstandard/ImmutableActionPlugin.php',0,0,NULL,0,'Immutable action plugin',0), -(10,'ktstandard.subscriptions.plugin','plugins/ktstandard/KTSubscriptions.php',0,0,NULL,0,'Subscription Plugin',0), -(11,'ktstandard.discussion.plugin','plugins/ktstandard/KTDiscussion.php',0,0,NULL,0,'Document Discussions Plugin',0), -(12,'ktstandard.email.plugin','plugins/ktstandard/KTEmail.php',0,0,NULL,0,'Email Plugin',0), -(13,'ktstandard.indexer.plugin','plugins/ktstandard/KTIndexer.php',0,0,NULL,0,'Full-text Content Indexing',0), -(14,'ktstandard.documentlinks.plugin','plugins/ktstandard/KTDocumentLinks.php',0,0,NULL,0,'Inter-document linking',0), -(15,'ktstandard.workflowassociation.plugin','plugins/ktstandard/KTWorkflowAssociation.php',0,0,NULL,0,'Workflow Association Plugin',0), -(16,'ktstandard.workflowassociation.documenttype.plugin','plugins/ktstandard/workflow/TypeAssociator.php',0,0,NULL,0,'Workflow allocation by document type',0), -(17,'ktstandard.workflowassociation.folder.plugin','plugins/ktstandard/workflow/FolderAssociator.php',0,0,NULL,0,'Workflow allocation by location',0), -(18,'ktstandard.disclaimers.plugin','plugins/ktstandard/KTDisclaimers.php',0,0,NULL,0,'Disclaimers Plugin',0), -(19,'nbm.browseable.plugin','plugins/browseabledashlet/BrowseableDashletPlugin.php',0,0,NULL,0,'Orphaned Folders Plugin',0), -(20,'ktstandard.ktwebdavdashlet.plugin','plugins/ktstandard/KTWebDAVDashletPlugin.php',0,0,NULL,0,'WebDAV Dashlet Plugin',0), -(21,'ktcore.housekeeper.plugin','plugins/housekeeper/HouseKeeperPlugin.php',0,0,NULL,0,'Housekeeper',0), -(22,'ktstandard.preview.plugin','plugins/ktstandard/documentpreview/documentPreviewPlugin.php',0,0,NULL,0,'Property Preview Plugin',0), -(23,'ktlive.mydropdocuments.plugin','plugins/MyDropDocumentsPlugin/MyDropDocumentsPlugin.php',0,0,NULL,0,'Drop Documents Plugin',0); +(5,'ktstandard.ldapauthentication.plugin','plugins/ktstandard/KTLDAPAuthenticationPlugin.php',0,0,NULL,0,'LDAP Authentication Plugin',0), +(6,'ktstandard.pdf.plugin','plugins/ktstandard/PDFGeneratorPlugin.php',0,0,NULL,0,'PDF Generator Plugin',0), +(7,'ktstandard.bulkexport.plugin','plugins/ktstandard/KTBulkExportPlugin.php',0,0,NULL,0,'Bulk Export Plugin',0), +(8,'ktstandard.immutableaction.plugin','plugins/ktstandard/ImmutableActionPlugin.php',0,0,NULL,0,'Immutable action plugin',0), +(9,'ktstandard.subscriptions.plugin','plugins/ktstandard/KTSubscriptions.php',0,0,NULL,0,'Subscription Plugin',0), +(10,'ktstandard.discussion.plugin','plugins/ktstandard/KTDiscussion.php',0,0,NULL,0,'Document Discussions Plugin',0), +(11,'ktstandard.email.plugin','plugins/ktstandard/KTEmail.php',0,0,NULL,0,'Email Plugin',0), +(12,'ktstandard.indexer.plugin','plugins/ktstandard/KTIndexer.php',0,0,NULL,0,'Full-text Content Indexing',0), +(13,'ktstandard.documentlinks.plugin','plugins/ktstandard/KTDocumentLinks.php',0,0,NULL,0,'Inter-document linking',0), +(14,'ktstandard.workflowassociation.plugin','plugins/ktstandard/KTWorkflowAssociation.php',0,0,NULL,0,'Workflow Association Plugin',0), +(15,'ktstandard.workflowassociation.documenttype.plugin','plugins/ktstandard/workflow/TypeAssociator.php',0,0,NULL,0,'Workflow allocation by document type',0), +(16,'ktstandard.workflowassociation.folder.plugin','plugins/ktstandard/workflow/FolderAssociator.php',0,0,NULL,0,'Workflow allocation by location',0), +(17,'ktstandard.disclaimers.plugin','plugins/ktstandard/KTDisclaimers.php',0,0,NULL,0,'Disclaimers Plugin',0), +(18,'nbm.browseable.plugin','plugins/browseabledashlet/BrowseableDashletPlugin.php',0,0,NULL,0,'Orphaned Folders Plugin',0), +(19,'ktstandard.ktwebdavdashlet.plugin','plugins/ktstandard/KTWebDAVDashletPlugin.php',0,0,NULL,0,'WebDAV Dashlet Plugin',0), +(20,'ktcore.housekeeper.plugin','plugins/housekeeper/HouseKeeperPlugin.php',0,0,NULL,0,'Housekeeper',0), +(21,'ktstandard.preview.plugin','plugins/ktstandard/documentpreview/documentPreviewPlugin.php',0,0,NULL,0,'Property Preview Plugin',0), +(22,'ktlive.mydropdocuments.plugin','plugins/MyDropDocumentsPlugin/MyDropDocumentsPlugin.php',0,0,NULL,0,'Drop Documents Plugin',0); /*!40000 ALTER TABLE `plugins` ENABLE KEYS */; UNLOCK TABLES;