From aa87739573cc39731cf51749b009ded7d9a35bae Mon Sep 17 00:00:00 2001 From: prasad <prasad@vtiger.com> Date: Thu, 8 Feb 2018 10:20:37 +0530 Subject: [PATCH] Removed older package source that are now part of core --- pkg/vtiger/modules/ConfigEditor/manifest.xml | 15 - .../modules/ConfigEditor/ConfigEditor.js | 45 --- .../modules/ConfigEditor/ConfigEditor.php | 57 ---- .../modules/ConfigEditor/ConfigEditorAjax.php | 11 - .../ConfigEditor/ConfigEditorHandler.php | 24 -- .../modules/ConfigEditor/ConfigFileReader.php | 305 ------------------ .../ConfigEditor/ConfigurationUtils.php | 23 -- .../modules/ConfigEditor/Request.php | 32 -- .../modules/ConfigEditor/Viewer.php | 30 -- .../modules/ConfigEditor/config.php | 45 --- .../modules/ConfigEditor/index.php | 132 -------- .../ConfigEditor/language/en_us.lang.php | 46 --- .../modules/ConfigEditor/templates/index.tpl | 280 ---------------- pkg/vtiger/modules/CronTasks/manifest.xml | 12 - .../modules/CronTasks/CronSequence.php | 40 --- .../CronTasks/modules/CronTasks/CronTasks.js | 86 ----- .../CronTasks/modules/CronTasks/CronTasks.php | 36 --- .../modules/CronTasks/CronTasksAjax.php | 12 - .../CronTasks/modules/CronTasks/EditCron.php | 55 ---- .../modules/CronTasks/ListCronJobs.php | 75 ----- .../CronTasks/modules/CronTasks/SaveCron.php | 33 -- .../modules/CronTasks/language/en_us.lang.php | 27 -- .../modules/CronTasks/templates/Cron.tpl | 67 ---- .../CronTasks/templates/CronContents.tpl | 53 --- .../modules/CronTasks/templates/EditCron.tpl | 69 ---- 25 files changed, 1610 deletions(-) delete mode 100644 pkg/vtiger/modules/ConfigEditor/manifest.xml delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.js delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorAjax.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorHandler.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigFileReader.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigurationUtils.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Request.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Viewer.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/config.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/index.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/language/en_us.lang.php delete mode 100644 pkg/vtiger/modules/ConfigEditor/templates/index.tpl delete mode 100644 pkg/vtiger/modules/CronTasks/manifest.xml delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/CronSequence.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.js delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasksAjax.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/EditCron.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/ListCronJobs.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/SaveCron.php delete mode 100644 pkg/vtiger/modules/CronTasks/modules/CronTasks/language/en_us.lang.php delete mode 100644 pkg/vtiger/modules/CronTasks/templates/Cron.tpl delete mode 100644 pkg/vtiger/modules/CronTasks/templates/CronContents.tpl delete mode 100644 pkg/vtiger/modules/CronTasks/templates/EditCron.tpl diff --git a/pkg/vtiger/modules/ConfigEditor/manifest.xml b/pkg/vtiger/modules/ConfigEditor/manifest.xml deleted file mode 100644 index ab6542430..000000000 --- a/pkg/vtiger/modules/ConfigEditor/manifest.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0'?> -<module> - <exporttime>2010-12-23 13:46:05</exporttime> - <name>ConfigEditor</name> - <label>ConfigEditor</label> - <parent></parent> - <type>extension</type> - <version>1.9</version> - <dependencies> - <vtiger_version>5.1.0</vtiger_version> - <vtiger_max_version>7.*</vtiger_max_version> - </dependencies> - <tables> - </tables> -</module> diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.js b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.js deleted file mode 100644 index 4b4c74fdc..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.js +++ /dev/null @@ -1,45 +0,0 @@ -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -function replaceUploadSize(){ - var upload = document.getElementById('key_upload_maxsize').value; - upload = "'"+upload+"'"; - upload = upload.replace(/000000/g,""); - upload = upload.replace(/'/g,""); - document.getElementById('key_upload_maxsize').value = upload; -} - - -function vtlib_field_help_show_this(basenode, fldname) { - var domnode = $('vtlib_fieldhelp_div'); - - - - var helpcontent = document.getElementById('helpInfo').value; - - - if(!domnode) { - domnode = document.createElement('div'); - domnode.id = 'vtlib_fieldhelp_div'; - domnode.className = 'dvtSelectedCell'; - domnode.style.position = 'absolute'; - domnode.style.width = '150px'; - domnode.style.padding = '4px'; - domnode.style.fontWeight = 'normal'; - document.body.appendChild(domnode); - - domnode = $('vtlib_fieldhelp_div'); - Event.observe(domnode, 'mouseover', function() { $('vtlib_fieldhelp_div').show(); }); - Event.observe(domnode, 'mouseout', vtlib_field_help_hide); - } - else { - domnode.show(); - } - domnode.innerHTML = helpcontent; - fnvshobj(basenode,'vtlib_fieldhelp_div'); -} diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.php deleted file mode 100644 index 1d2388945..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditor.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ - -class ConfigEditor { - - /** - * Invoked when special actions are performed on the module. - * @param String Module name - * @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall) - */ - function vtlib_handler($modulename, $event_type) { - - $registerLink = false; - - if($event_type == 'module.postinstall') { - $registerLink = true; - } else if($event_type == 'module.disabled') { - // TODO Handle actions when this module is disabled. - $registerLink = false; - } else if($event_type == 'module.enabled') { - // TODO Handle actions when this module is enabled - $registerLink = true; - } else if($event_type == 'module.preuninstall') { - return; - } else if($event_type == 'module.preupdate') { - return; - } else if($event_type == 'module.postupdate') { - return; - } - - $displayLabel = 'LBL_CONFIG_EDITOR'; - - global $adb; - if ($registerLink) { - $blockid = $adb->query_result( - $adb->pquery("SELECT blockid FROM vtiger_settings_blocks WHERE label='LBL_OTHER_SETTINGS'",array()), - 0, 'blockid'); - $sequence = (int)$adb->query_result( - $adb->pquery("SELECT max(sequence) as sequence FROM vtiger_settings_field WHERE blockid=?",array($blockid)), - 0, 'sequence') + 1; - $fieldid = $adb->getUniqueId('vtiger_settings_field'); - $adb->pquery("INSERT INTO vtiger_settings_field (fieldid,blockid,sequence,name,iconpath,description,linkto) - VALUES (?,?,?,?,?,?,?)", array($fieldid, $blockid,$sequence,$displayLabel,'migrate.gif','Update configuration file of the application', 'index.php?module=ConfigEditor&action=index')); - } else { - $adb->pquery("DELETE FROM vtiger_settings_field WHERE name=?", array($displayLabel)); - } - } -} - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorAjax.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorAjax.php deleted file mode 100644 index efae0a94a..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorAjax.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -require_once('include/Ajax/CommonAjax.php'); -?> diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorHandler.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorHandler.php deleted file mode 100644 index 74ef1c297..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigEditorHandler.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -class ConfigEditorHandler extends VTEventHandler { - - function handleEvent($eventName, $data) { - - if($eventName == 'vtiger.entity.beforesave') { - // Entity is about to be saved, take required action - } - - if($eventName == 'vtiger.entity.aftersave') { - // Entity has been saved, take next action - } - } -} - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigFileReader.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigFileReader.php deleted file mode 100644 index 1daf6f531..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigFileReader.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ - -/** - * Configuration file reader - */ -class ConfigFileReader { - // Each line is treated as configuration row - protected $rows; - // Path to configuration file - protected $filepath; - - // Iteration support for rows - protected $rowIndex; - - // Editables and Viewables - protected $viewables; - protected $editables; - - /** - * Constructor - * You can restrict variable display for viewing and editing - */ - function __construct($path, $viewables=array(), $editables=array()) { - $this->filepath = $path; - $this->viewables = $viewables; - $this->editables = $editables; - $this->read(); - } - - /** - * Read and parse the configuration file contents. - */ - protected function read() { - $fileContent = trim(file_get_contents($this->filepath)); - $pattern = '/\$([^=]+)=([^;]+);/'; - $matches = null; - $matchesFound = preg_match_all($pattern, $fileContent, $matches); - $configContents = array(); - if($matchesFound) { - $configContents = $matches[0]; - } - $this->rows = array(); - foreach($configContents as $configLine) { - $this->rows[] = new ConfigFileRow($configLine, $this); - } - $this->rowIndex = -1; - unset($fileContent); - } - - /** - * Save the rows back to configuration. - */ - function save() { - $fileContent = trim(file_get_contents($this->filepath)); - if ($this->rows) { - $fp = fopen($this->filepath, 'w'); - $rowcount = count($this->rows); - for($index = 0; $index < $rowcount; ++$index) { - $row = $this->rows[$index]; - if($row->isEditable()) { - $variableName = $row->variableName(); - $newVariableValue = $row->variableValue(); - $pattern = '/\$'.$variableName.'[\s]+=([^;]+);/'; - $replacement = $row->toString(); - $fileContent = preg_replace($pattern, $replacement, $fileContent); - } - } - fwrite($fp, $fileContent); - fclose($fp); - } - } - - function editables($key = false) { - if ($key === false) return array_keys($this->editables); - return $this->editables[$key]; - } - - function viewables($key = false) { - if ($key === false) return array_keys($this->viewables); - return $this->viewables[$key]; - } - - /** - * Set new value to the desired variable. - */ - function setVariableValue($name, $value) { - if ($this->rows) { - foreach($this->rows as $row) { - if ($row->matchesVariableName($name)) { - if($name == 'upload_maxsize'){ - return $row->setVariableValue($value*1000000); - }else{ - return $row->setVariableValue($value); - } - } - } - } - } - - /** - * Get all the rows - */ - function getAll() { - return $this->rows; - } - - /** - * Has next row to read? - */ - function next() { - if ($this->rowIndex++ < count($this->rows)) { - return true; - } - } - - /** - * Get the current row during iteration (please call next() before this) - */ - function get() { - return $this->rows[$this->rowIndex]; - } - - /** - * Rewind the iteration - */ - function rewind() { - $this->rowIndex = 0; - } -} - -/** - * Configuration file row class - */ -class ConfigFileRow { - // Actual line content - protected $lineContent; - // Parsed variable name and value - protected $parsedVarName = false; - protected $parsedVarValue= ''; - - // Is the variable of string type? - protected $isValueString = false; - - // Some variables which is never editable - protected static $alltimeNoneditableVars = array( - "dbconfig['db_server']", - "application_unique_key" - ); - - // Editable and Viewable variable names - protected $parent; - - // Is the variable value editable? - protected $isValueEditable = false; - - // Regex to detect variable name and its safe value - static $variableRegex = '/^[ \t]*\\$([^=]+)=([^;]+)/'; - //Regex to detect support name,it doesnt allow any single quote,and special characters,it does allow only alpha numeric,utf8,.com,@ - static $variableUnSafeValueRegex = "/[\x{4e00}-\x{9fa5}[:print:]]+.*\-/u"; - /** - * Constructor - */ - function __construct($content, $parent) { - $this->lineContent = $content; - $this->parent = $parent; - $this->parse(); - } - - /** - * Parse the content - */ - protected function parse() { - if (preg_match(self::$variableRegex, $this->lineContent, $m)) { - $this->parsedVarName = trim($m[1]); - $this->parsedVarValue = trim($m[2]); - // Is variable string type? - if (strpos($this->parsedVarValue, "'") === 0 || strpos($this->parsedVarValue, '"') === 0) { - $this->isValueString = true; - $this->parsedVarValue = trim($m[2], "'\" "); - } - if (!in_array($this->parsedVarName, self::$alltimeNoneditableVars)) { - $this->isValueEditable = true; - } else { - $this->isValueEditable = false; - } - } - } - - /** - * Does the row represent variable? - */ - function isVariable() { - return ($this->parsedVarName !== false); - } - - /** - * Is the variable viewable? - */ - function isViewable() { - if ($this->isVariable()) { - $editables = $this->parent->editables(); - if (!empty($editables)) { - return in_array($this->parsedVarName, $this->parent->viewables()); - } else { - return true; - } - } - return false; - } - - /** - * Is the variable editable? - */ - function isEditable() { - if ($this->isVariable()) { - $editables = $this->parent->editables(); - if (empty($editables)) { - return $this->isValueEditable; - } - return ((in_array($this->parsedVarName, $editables) !== false) && $this->isValueEditable); - } - return false; - } - - /** - * Get variable name - */ - function variableName() { - return $this->parsedVarName; - } - - /** - * Check if the variable name matches with input - */ - function matchesVariableName($input) { - $input = ltrim($input, '$'); - return ($input == $this->parsedVarName); - } - - /** - * Get variable value - */ - function variableValue() { - return $this->parsedVarValue; - } - - /** - * Is the variable value string type? - */ - function isValueString() { - return $this->isValueString; - } - - /** - * Set the variable value - */ - function setVariableValue($value) { - // TODO Avoid any PHP String concate hacks - if (preg_match(self::$variableUnSafeValueRegex, $value, $m)) { - return false; - } - // Should the value be restricted to a set? - $meta = $this->meta(); - if (isset($meta['values']) && is_array($meta['values']) ) { - $allowedValues = array_keys($meta['values']); - if (!empty($allowedValues) && !in_array($value, $allowedValues)) { - return false; - } - } - $this->parsedVarValue = $value; - return true; - } - - /** - * Get the meta information - */ - function meta() { - if ($this->isEditable()) return $this->parent->editables($this->parsedVarName); - if ($this->isViewable()) return $this->parent->viewables($this->parsedVarName); - return false; - } - - /** - * String representation of the instance - */ - function toString() { - if ($this->isVariable()) { - $encloseWith = ""; - if ($this->isValueString()) { - $encloseWith = "'"; - } - return sprintf("\$%s = %s%s%s;", $this->parsedVarName, $encloseWith, $this->parsedVarValue, $encloseWith); - } - return $this->lineContent; - } -} -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigurationUtils.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigurationUtils.php deleted file mode 100644 index dabbc1674..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/ConfigurationUtils.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -require_once 'include/utils/utils.php'; -class ConfigurationUtils{ - static function getEntityModule() { - global $adb; - $unusedmodules = array('Events','Emails'); - $additionalModules = array('Home'); - $query = "SELECT name FROM vtiger_tab WHERE isentitytype = 1"; - $res = $adb->pquery($query, array()); - $rows = $adb->num_rows($res); - for($i=0; $i <$rows; $i++) { - $module[] = $adb->query_result($res, $i, 'name'); - } - $modules = array_merge($module,$additionalModules); - $modules = array_diff($modules,$unusedmodules); - return $modules; - } -} -?> diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Request.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Request.php deleted file mode 100644 index 3c520c66b..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Request.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -class ConfigEditor_Request { - protected $valuemap; - - function __construct($values) { - $this->valuemap = $values; - } - - function get($key, $defvalue='') { - $value = $defvalue; - if (isset($this->valuemap[$key])) { - $value = $this->valuemap[$key]; - } - if (!empty($value)) { - $value = vtlib_purify($value); - } - return $value; - } - - function values() { - return $this->valuemap; - } -} -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Viewer.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Viewer.php deleted file mode 100644 index 7a5521d21..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/Viewer.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -require_once('Smarty_setup.php'); - -class ConfigEditor_Viewer extends vtigerCRM_Smarty { - function ConfigEditor_Viewer() { - parent::vtigerCRM_Smarty(); - - global $app_strings, $mod_strings, $currentModule, $theme; - - $this->assign('CUSTOM_MODULE', true); - - $this->assign('APP', $app_strings); - $this->assign('MOD', $mod_strings); - $this->assign('MODULE', $currentModule); - // TODO: Update Single Module Instance name here. - $this->assign('SINGLE_MOD', 'SINGLE_'.$currentModule); - $this->assign('CATEGORY', 'Settings'); - $this->assign('IMAGE_PATH', "themes/$theme/images/"); - $this->assign('THEME', $theme); - } -} -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/config.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/config.php deleted file mode 100644 index f99df2105..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/config.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -include('ConfigurationUtils.php'); -$modules = ConfigurationUtils::getEntityModule(); -$moduleLabels = array(); -foreach($modules as $module) { - $moduleLabels[$module] = getTranslatedString($module, $module); -} - -$trueFalseArray = array( - 'true' => getTranslatedString('LBL_TRUE','ConfigEditor'), - 'false' => getTranslatedString('LBL_FALSE','ConfigEditor') -); - -$__ConfigEditor_Config = array( - - 'edit.filepath' => dirname(__FILE__) . '/../../config.inc.php', - - /* CONFIGURE: - * List the configuration variables that user can set. - * By setting it to array() lets allows editing of all variables but it is not RECOMMENDED - */ - 'allow.editing.variables' => array( - 'CALENDAR_DISPLAY' => array('label'=>getTranslatedString('LBL_MINI_CALENDAR_DISPLAY','ConfigEditor'),'values'=>$trueFalseArray), - 'WORLD_CLOCK_DISPLAY' => array('label'=> getTranslatedString('LBL_WORLD_CLOCK_DISPLAY','ConfigEditor'),'values'=>$trueFalseArray), - 'CALCULATOR_DISPLAY' => array('label' => getTranslatedString('LBL_CALCULATOR_DISPLAY','ConfigEditor') , 'values'=>$trueFalseArray), - 'USE_RTE' => array('label'=>getTranslatedString('LBL_USE_RTE','ConfigEditor'), 'values'=>$trueFalseArray), - 'HELPDESK_SUPPORT_EMAIL_ID'=>array('label'=>getTranslatedString('LBL_HELPDESK_SUPPORT_EMAILID','ConfigEditor'),'values'=>array()), - 'HELPDESK_SUPPORT_NAME' => array('label' => getTranslatedString('LBL_HELPDESK_SUPPORT_NAME','ConfigEditor'),'values'=>array()), - 'upload_maxsize' => array('label'=>getTranslatedString('LBL_MAX_UPLOAD_SIZE','ConfigEditor'),'values'=>array()), - 'history_max_viewed' => array('label'=>getTranslatedString('LBL_MAX_HISTORY_VIEWED','ConfigEditor'),'values'=>array()), - 'default_module' => array('label'=>getTranslatedString('LBL_DEFAULT_MODULE','ConfigEditor'),'values'=>$moduleLabels), - 'listview_max_textlength' => array('label' => getTranslatedString('LBL_MAX_TEXT_LENGTH_IN_LISTVIEW','ConfigEditor'), 'values' => array() ), - 'list_max_entries_per_page' => array('label' => getTranslatedString('LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW','ConfigEditor'), 'values'=> array()), - ) - -); -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/index.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/index.php deleted file mode 100644 index 161e6384f..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/index.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -include_once dirname(__FILE__) . '/Request.php'; -include_once dirname(__FILE__) . '/Viewer.php'; -include_once dirname(__FILE__) . '/ConfigFileReader.php'; -include_once dirname(__FILE__) . '/config.php'; - -/** - * Main controller of actions - */ -class ConfigEditor_Controller { - - /** - * Get Viewer for displaying UI - */ - protected function getViewer() { - return new ConfigEditor_Viewer(); - } - - /** - * Get Configuration file reader - */ - protected function getReader() { - global $__ConfigEditor_Config; - $configFile = $__ConfigEditor_Config['edit.filepath']; - if (file_exists($configFile)) { - if (is_writeable($configFile)) { - return new ConfigFileReader( - $configFile, - $__ConfigEditor_Config['allow.editing.variables'], // What variables to view - $__ConfigEditor_Config['allow.editing.variables'] // What variables to edit - ); - } else { - return null; - } - } - return false; - } - - /** - * Perform logged in user check and allow only administrators - */ - protected function authCheck() { - global $current_user; - if (is_admin($current_user)) return; - - $viewer = $this->getViewer(); - $viewer->display(vtlib_getModuleTemplate('Vtiger', 'OperationNotPermitted.tpl')); - exit; - } - - /** - * Core processing method - */ - function process(ConfigEditor_Request $request) { - $this->authCheck(); - $type = $request->get('type'); - if ($type == 'save') { - $this->processSave($request); - } else { - $this->processDefault($request); - } - } - - /** - * Default action - */ - protected function processDefault($request) { - global $currentModule; - - $configReader = $this->getReader(); - $viewer = $this->getViewer(); - - if (is_null($configReader)) { - $viewer->assign('WARNING', 'Configuration file is not writeable!'); - } else if ($configReader === false) { - $viewer->assign('WARNING', 'Configuration file not found!'); - } else { - $viewer->assign('CONFIGREADER', $configReader); - } - $viewer->display(vtlib_getModuleTemplate($currentModule, 'index.tpl')); - } - - /** - * Save action - */ - protected function processSave($request) { - $configReader = $this->getReader(); - - if ($configReader) { - $reqvalues = $request->values(); - if($this->validateReqValues($reqvalues)){ - foreach($reqvalues as $k => $v) { - if (preg_match("/key_([^ ]+)/", $k, $m)) { - $configReader->setVariableValue($m[1], vtlib_purify($v)); - } - } - $configReader->save(); - } - } - header('Location: index.php?module=ConfigEditor&action=index'); - } - - function validateReqValues($values){ - $flag = true; - if(filter_var($values['key_HELPDESK_SUPPORT_EMAIL_ID'], FILTER_VALIDATE_EMAIL) != true) { - $flag = false; - }elseif(preg_match ('/[\'";?><]/', $values['key_HELPDESK_SUPPORT_NAME'])){ - $flag = false; - }elseif(!preg_match ('/[a-zA-z0-9]/', $values['key_default_module'])){ - $flag = false; - }elseif(filter_var($values['key_upload_maxsize'],FILTER_VALIDATE_INT) != true || - filter_var($values['key_list_max_entries_per_page'],FILTER_VALIDATE_INT) != true || - filter_var($values['key_history_max_viewed'],FILTER_VALIDATE_INT) != true || - filter_var($values['key_listview_max_textlength'],FILTER_VALIDATE_INT) != true ) { - $flag = false; - } - return $flag; - } - -} -$controller = new ConfigEditor_Controller(); -$controller->process(new ConfigEditor_Request($_REQUEST)); - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/language/en_us.lang.php b/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/language/en_us.lang.php deleted file mode 100644 index 63878f3ee..000000000 --- a/pkg/vtiger/modules/ConfigEditor/modules/ConfigEditor/language/en_us.lang.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************/ -$mod_strings = Array ( - - 'ConfigEditor' => 'ConfigEditor', - 'LBL_CONFIG_EDITOR' => 'Configuration Editor', - 'LBL_SETTINGS' => 'Settings', - 'LBL_CONFIG_EDIT'=>'Edit the Configuration details of vtiger CRM', - 'SINGLE_ConfigEditor' => 'ConfigEditor', - 'LBL_TRUE'=> 'true', - 'LBL_FALSE'=> 'false', - 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Maximum upload size is 5MB', - 'LBL_INVALID_EMAIL_MSG'=>'Invalid Email Address', - 'LBL_EMPTY_NAME_MSG'=> 'Support Name cannot be empty', - 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Maximum entries in the ListView is 100', - 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Please enter a number in the range 1-5', - 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Maximum text length is 100', - 'LBL_MB'=>'MB', - 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Calendar Display', - 'LBL_WORLD_CLOCK_DISPLAY'=>'World Clock Display', - 'LBL_CALCULATOR_DISPLAY'=>'Calculator Display', - 'LBL_USE_RTE'=>'Use RTE', - 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Helpdesk Support Email-Id', - 'LBL_HELPDESK_SUPPORT_NAME'=>'Helpdesk Support Name', - 'LBL_MAX_UPLOAD_SIZE'=>'Max.Upload Size (Max 5MB)', - 'LBL_MAX_HISTORY_VIEWED'=>'Max. History Viewed', - 'LBL_DEFAULT_MODULE'=>'Default Module', - 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Max. text length in listview', - 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Max. entries per page in listview', - 'LBL_CONFIG_FILE'=>'config.inc.php', - 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'You are editing the configuration details of vtiger CRM.', - 'LBL_DOUBLE_CHECK_INFO'=>'Please do double check before saving the values.', - 'LBL_HELP_INFO'=>"This is used as a 'From email-id' to send a mail to a new user created about his login credentials, - send a mail to trouble-ticket owner about the ticket assigned,send a mail about reminder and notification.", - 'LBL_RESTRICTED_CHARACTERS'=>"Special characters like ' " and ; are not allowed", - -); - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/ConfigEditor/templates/index.tpl b/pkg/vtiger/modules/ConfigEditor/templates/index.tpl deleted file mode 100644 index 9548975e0..000000000 --- a/pkg/vtiger/modules/ConfigEditor/templates/index.tpl +++ /dev/null @@ -1,280 +0,0 @@ -{*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************} -{literal} -<style type="text/css"> -.detailedViewTextBoxThisOn { - background-color:#FFFFDD; - border:1px solid #BABABA; - color:#000000; - font-family:Arial,Helvetica,sans-serif; - font-size:11px; - padding-left:5px; - width:20%; -} - -.detailedViewTextBoxThis { - background-color:#FFFFFF; - border:1px solid #BABABA; - color:#000000; - font-family:Arial,Helvetica,sans-serif; - font-size:11px; - padding-left:5px; - width:20%; -} -</style> - <script type="text/javascript"> - function msg() - { - alert("invalid entry"); - exit; - } - - function trim(str) - { - while (str.substring(0,1) == ' ') // check for white spaces from beginning - { - str = str.substring(1, str.length); - } - while (str.substring(str.length-1, str.length) == ' ') // check white space from end - { - str = str.substring(0,str.length-1); - } - return str; - } - - function valid(name) { - var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; - var id=document.getElementById('key_HELPDESK_SUPPORT_EMAIL_ID'); - var name = document.getElementById('key_HELPDESK_SUPPORT_NAME'); - var size = document.getElementById('key_upload_maxsize'); - var maxEntries = document.getElementById('key_list_max_entries_per_page'); - var history1 = document.getElementById('key_history_max_viewed'); - var maxtext = document.getElementById('key_listview_max_textlength'); - var reg1 = /^([0-9]*)$/; - name.value = trim(name.value); - if ((name.value).indexOf("\"") != -1 || (name.value).indexOf("'") != -1 || (name.value).indexOf(";") != -1){ - var invalidSupportName = document.getElementById('invalidSupportName').value; - document.getElementById('msg_HELPDESK_SUPPORT_NAME').innerHTML = invalidSupportName; - name.focus(); - return false; - } - - maxEntries.value = trim(maxEntries.value); - size.value = trim(size.value); - history1.value = trim(history1.value); - maxtext.value = trim(maxtext.value); - var uploadSize = document.getElementById('uploadSize').value; - var invalidEmail = document.getElementById('invalidEmail').value; - var emptyName = document.getElementById('emptyName').value; - var maxListEntries= document.getElementById('maxListEntries').value; - var maxHistory= document.getElementById('maxHistory').value; - var maxTextLength= document.getElementById('maxTextLength').value; - if(reg.test(id.value) == false){ - document.getElementById('msg_HELPDESK_SUPPORT_EMAIL_ID').innerHTML = invalidEmail; - id.focus(); - return false; - }else if(name.value == ''){ - document.getElementById('msg_HELPDESK_SUPPORT_NAME').innerHTML = emptyName; - name.focus(); - return false; - }else if((reg1.test(size.value) == false) || (size.value <= 0) || (size.value > 5) || (size.value == NaN)){ - document.getElementById('msg_upload_maxsize').innerHTML =uploadSize; - size.focus(); - return false; - }else if((reg1.test(maxEntries.value) == false)||(maxEntries.value <= 0) || (maxEntries.value>100)){ - document.getElementById('msg_list_max_entries_per_page').innerHTML=maxListEntries; - maxEntries.focus(); - return false; - }else if((reg1.test(history1.value) == false)||(history1.value <= 0) || (history1.value > 5)){ - document.getElementById('msg_history_max_viewed').innerHTML=maxHistory; - history1.focus(); - return false; - }else if((reg1.test(maxtext.value) == false) || (maxtext.value < 0) || (maxtext.value > 100) || (maxtext.value === "")){ - document.getElementById('msg_listview_max_textlength').innerHTML=maxTextLength; - maxtext.focus(); - return false; - } - return true; - } - - - </script> -{/literal} -<script language="JavaScript" type="text/javascript" src="modules/{$MODULE}/{$MODULE}.js"></script> -<body onload="replaceUploadSize();"> -<input type="hidden" value="{$MOD.LBL_MAX_UPLOAD_SIZE_MSG}" id="uploadSize"></input> -<input type="hidden" value="{$MOD.LBL_INVALID_EMAIL_MSG}" id="invalidEmail"></input> -<input type="hidden" value="{$MOD.LBL_RESTRICTED_CHARACTERS}" id="invalidSupportName"></input> -<input type="hidden" value="{$MOD.LBL_MAX_LISTVIEW_ENTRIES_MSG}" id="maxListEntries"></input> -<input type="hidden" value="{$MOD.LBL_MAX_HISTORY_VIEWED_MSG}" id="maxHistory"></input> -<input type="hidden" value="{$MOD.LBL_MAX_TEXTLENGTH_LISTVIEW_MSG}" id="maxTextLength"></input> -<input type="hidden" value="{$MOD.LBL_EMPTY_NAME_MSG}" id="emptyName"></input> -<input type="hidden" value="{$MOD.LBL_HELP_INFO}" id="helpInfo"></input> - -<table cellspacing="0" cellpadding="2" border="0" width="100%" class="level2Bg"> - <tbody> - <tr> - <td> - <table cellspacing="0" cellpadding="0" border="0"> - <tbody> - <tr> - <td nowrap="" class="level2SelTab"><a href="index.php?module=Settings&action=index&parenttab=Settings">Settings</a></td> - <td nowrap="" class="level2SelTab"><a href="index.php?module=Settings&action=ModuleManager&parenttab=Settings">Module Manager</a></td> - </tr> - </tbody> - </table> - </td> - </tr> - </tbody> -</table> - -<table border=0 cellspacing=0 cellpadding=0 width=98% align=center> - <tr> - <td> - - </td> - </tr> - <tr> - <td valign=top align=right width=8><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td> - <td class="showPanelBg" valign="top" width="100%" > - - <div style="padding: 20px;"> - <form onsubmit="VtigerJS_DialogBox.block();" action="index.php" method="POST" name="EditView"> - <div align="center"> - {include file="SetMenu.tpl"} - <table cellspacing="0" cellpadding="5" border="0" width="100%" class="settingsSelUITopLine"> - <tbody> - <tr> - <td width="50" valign="top" rowspan="2"><img height="48" border="0" width="48" title="Users" alt="Users" src="themes/images/migrate.gif"></td> - <td valign="bottom" class="heading2"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS}</a> > {$MOD.LBL_CONFIG_EDITOR} </b></td> - </tr> - <tr> - <td valign="top"class="small">{$MOD.LBL_CONFIG_EDIT}</td> - </tr> - </tbody> - </table> - <br> - <br> - <table width="95%" cellspacing="0" cellpadding="0" border="0" class="small" align="center"> - <tr> - <td> - <table width="100%" cellspacing="0" cellpadding="3" border="0" class="small"> - <tr> - <td nowrap="" style="width: 10px;" class="dvtTabCache"> </td> - <td width="75" nowrap="" align="center" class="dvtSelectedCell" style="width: 15%;"><b>{$MOD.LBL_CONFIG_FILE}</b></td> - <td nowrap="" align="center" style="width: 100px;" class="dvtTabCache"> - {if $WARNING} - <div style='background-color: #FFFABF; padding: 2px; margin: 0 0 2px 0; border: 1px solid yellow'> - <b style='color: red'>{$WARNING}</b> - {/if} - </td> - <td nowrap="" style="width: 65%;" class="dvtTabCache"> </td> - </tr> - </table> - </td> - </tr> - <tr> - <td valign="top" align="left"> - <div id="basicTab"> - <table border=0 cellspacing=0 cellpadding=3 width=100% class="dvtContentSpace"> - <tr> - <td align="left" style="padding:10px;"> - <table border=0 cellspacing=0 cellpadding=5 width=100% class="small"> - <tr> - <td colspan=2> - <div align="center"> - <input type='submit' class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="if(valid(this)){ldelim}return true;{rdelim}else{ldelim}return false;{rdelim}"> - <input type='button' class="crmbutton small cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" onclick="location.href='index.php?module=Settings&action=index&parenttab=Settings'"> - - <input type='hidden' name='module' value='ConfigEditor'> - <input type='hidden' name='action' value='ConfigEditorAjax'> - <input type='hidden' name='file' value='index'> - <input type='hidden' name='type' value='save'> - - </div> - </td> - </tr> - {if $CONFIGREADER} - <tr> - <td class="detailedViewHeader" colspan="2"> - {$MOD.LBL_CONFIG_EDIT_CAUTION_INFO}<b>{$MOD.LBL_DOUBLE_CHECK_INFO}</b> - </td> - </tr> - {/if} - - {foreach item=CONFIGLINE from=$CONFIGREADER->getAll()} - {if $CONFIGLINE->isViewable() || $CONFIGLINE->isEditable()} - - {assign var="VARMETA" value=$CONFIGLINE->meta()} - - <tr bgcolor=white valign=center style="height:25px;"> - <td class="dvtCellLabel" width="15%"> - {if $VARMETA.label} - {if $VARMETA.label == 'Helpdesk Support Email-Id'} - {$VARMETA.label} <img border="0" src="themes/images/help_icon.gif" onclick="vtlib_field_help_show_this(this, '{$CONFIGLINE->variableName()}' );" style="cursor: pointer;"> - {else} - {$VARMETA.label} - {/if} - {else} - {$CONFIGLINE->variableName()} - {/if} - </td> - <td class="dvtCellInfo"> - {if $CONFIGLINE->isEditable()} - {if $VARMETA.values} - <select class="small" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}"> - {foreach item=VARVALUEOPTION key=VARVALUEOPTIONKEY from=$VARMETA.values} - <option value="{$VARVALUEOPTIONKEY}" {if $CONFIGLINE->variableValue() eq $VARVALUEOPTIONKEY}selected=true{/if}>{$VARVALUEOPTION}</option> - {/foreach} - </select> - {else} - <b><span class="warning" id="msg_{$CONFIGLINE->variableName()}"></span></b> - {if $CONFIGLINE->variableName() == 'upload_maxsize'} - <input size="2" type="text" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}" value="{$CONFIGLINE->variableValue()}" onblur="class='detailedViewTextBoxThis'" onfocus="class='detailedViewTextBoxThisOn'" class="detailedViewTextBoxThis" > {$MOD.LBL_MB} - {else} - <input type="text" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}" value="{$CONFIGLINE->variableValue()}" onblur="this.className='detailedViewTextBox'" onfocus="this.className='detailedViewTextBoxOn'" class="detailedViewTextBox" > - {/if} - {/if} - {else} - {$CONFIGLINE->variableValue()} - {/if} - </td> - </tr> - {/if} - {/foreach} - </table> - - <tr> - <td colspan=2> - <div align="center"> - <input type='submit' class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="if(valid(this)){ldelim}return true;{rdelim}else{ldelim}return false;{rdelim}"> - <input type='button' class="crmbutton small cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" onclick="location.href='index.php?module=Settings&action=index&parenttab=Settings'"> - - <input type='hidden' name='module' value='ConfigEditor'> - <input type='hidden' name='action' value='ConfigEditorAjax'> - <input type='hidden' name='file' value='index'> - <input type='hidden' name='type' value='save'> - </div> - </td> - </tr> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> - </div> - </form> - </div> - </td> - <td valign=top align=right><img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"></td> - </tr> -</table> -</body> diff --git a/pkg/vtiger/modules/CronTasks/manifest.xml b/pkg/vtiger/modules/CronTasks/manifest.xml deleted file mode 100644 index 93cb4f71e..000000000 --- a/pkg/vtiger/modules/CronTasks/manifest.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version='1.0'?> -<module> - <name>CronTasks</name> - <label>CronTasks</label> - <parent></parent> - <type>extension</type> - <version>1.2</version> - <dependencies> - <vtiger_version>5.3.1</vtiger_version> - <vtiger_max_version>7.*</vtiger_max_version> - </dependencies> -</module> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronSequence.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronSequence.php deleted file mode 100644 index 50487033e..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronSequence.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/*+******************************************************************************* - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ********************************************************************************/ -global $adb,$log; - -$id = $_REQUEST['record']; -$move = $_REQUEST['move']; -$log->fatal("$id,$move"); - -if($move == 'Down'){ - $sequence = $adb->pquery("SELECT sequence FROM vtiger_cron_task WHERE id = ?", array($id)); - $oldsequence = $adb->query_result($sequence,0,'sequence'); - - $nexttab = $adb->pquery("SELECT sequence,id FROM vtiger_cron_task WHERE sequence > ? ORDER BY SEQUENCE LIMIT 0,1", array($oldsequence)); - $newsequence = $adb->query_result($nexttab,0,'sequence'); - $rightid = $adb->query_result($nexttab,0,'id'); - - $adb->pquery("UPDATE vtiger_cron_task set sequence=? WHERE id = ?", array($newsequence, $id)); - $adb->pquery("UPDATE vtiger_cron_task set sequence=? WHERE id = ?", array($oldsequence, $rightid)); -}elseif ($move == 'Up') { - $sequence = $adb->pquery("SELECT sequence FROM vtiger_cron_task WHERE id = ?", array($id)); - $oldsequence = $adb->query_result($sequence,0,'sequence'); - - $nexttab = $adb->pquery("SELECT sequence,id FROM vtiger_cron_task WHERE sequence < ? ORDER BY SEQUENCE DESC LIMIT 0,1", array($oldsequence)); - $newsequence = $adb->query_result($nexttab,0,'sequence'); - $leftid = $adb->query_result($nexttab,0,'id'); - - $adb->pquery("UPDATE vtiger_cron_task SET sequence=? WHERE id = ?", array($newsequence, $id)); - $adb->pquery("UPDATE vtiger_cron_task SET sequence=? WHERE id = ?", array($oldsequence, $leftid)); - -} -$loc = "Location: index.php?action=CronTasksAjax&file=ListCronJobs&module=CronTasks&directmode=ajax"; -header($loc); -?> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.js b/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.js deleted file mode 100644 index e274fd186..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.js +++ /dev/null @@ -1,86 +0,0 @@ -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -************************************************************************************/ - -function fetchSaveCron(id) -{ - - var status = $("cron_status").value; - var timeValue= $("CronTime").value; - var time = $("cron_time").value; - var min_freq =parseInt($("min_freq").value,10); - if(!numValidate("CronTime","","any",true)){ - return false; - } - if((timeValue % 1) !=0){ - alert("only integer values are allowed"); - return false; - } - if((timeValue < min_freq && time == "min") || timeValue <= 0 || timeValue == '' ){ - alert($("desc").value); - - } - else{ - $("editdiv").style.display="none"; - $("status").style.display="inline"; - new Ajax.Request( - 'index.php', - { - queue: { - position: 'end', - scope: 'command' - }, - method: 'post', - postBody: 'action=CronTasksAjax&module=CronTasks&file=SaveCron&record='+id+'&status='+status+'&timevalue='+timeValue+'&time='+time, - onComplete: function(response) { - $("status").style.display="none"; - $("notifycontents").innerHTML=response.responseText; - } - } - ); - } -} - -function fetchEditCron(id) -{ - $("status").style.display="inline"; - new Ajax.Request( - 'index.php', - { - queue: { - position: 'end', - scope: 'command' - }, - method: 'post', - postBody: 'action=CronTasksAjax&module=CronTasks&file=EditCron&record='+id, - onComplete: function(response) { - $("status").style.display="none"; - $("editdiv").innerHTML=response.responseText; - } - } - ); -} -function move_module(tabid,move){ - - //$('vtbusy_info').style.display = "block"; - new Ajax.Request( - 'index.php', - { - queue: { - position: 'end', - scope: 'command' - }, - method: 'post', - postBody: 'module=CronTasks&action=CronTasksAjax&file=CronSequence&parenttab=Settings&record='+tabid+'&move='+move, - onComplete: function(response) { - $("notifycontents").innerHTML=response.responseText; - - } - } - ); -} diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.php deleted file mode 100644 index be4e6f542..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasks.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/*+******************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - *******************************************************************************/ - -class CronTasks { - - /** - * Invoked when special actions are performed on the module. - * @param String Module name - * @param String Event Type - */ - function vtlib_handler($moduleName, $eventType) { - - require_once('include/utils/utils.php'); - global $adb,$mod_strings; - - if($eventType == 'module.postinstall') { - $fieldid = $adb->getUniqueID('vtiger_settings_field'); - $blockid = getSettingsBlockId('LBL_OTHER_SETTINGS'); - $seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid)); - if ($adb->num_rows($seq_res) > 0) { - $cur_seq = $adb->query_result($seq_res, 0, 'max_seq'); - if ($cur_seq != null) $seq = $cur_seq + 1; - } - - $adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence) - VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'Scheduler', 'Cron.png', 'Allows you to Configure Cron Task', 'index.php?module=CronTasks&action=ListCronJobs&parenttab=Settings', $seq)); - } - } -} diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasksAjax.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasksAjax.php deleted file mode 100644 index 4529abde3..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/CronTasksAjax.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -require_once('include/Ajax/CommonAjax.php'); -?> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/EditCron.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/EditCron.php deleted file mode 100644 index a4cf02e30..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/EditCron.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -require_once('config.php'); -require_once('vtlib/Vtiger/Cron.php'); -require_once('config.inc.php'); -global $mod_strings, $app_strings, $current_language; -global $theme; -$theme_path="themes/".$theme."/"; -$image_path=$theme_path."images/"; - -$smarty = new vtigerCRM_Smarty; -if(isset($_REQUEST['record']) && $_REQUEST['record']!='') { - $id = $_REQUEST['record']; - $cronTask = Vtiger_cron::getInstanceById($id); - $label = getTranslatedString($cronTask->getName(),$cronTask->getModule()); - $cron_status = $cronTask->getStatus(); - $cron_freq = $cronTask->getFrequency(); - $cron_desc = $cronTask->getDescription(); - $cron = Array(); - $cron['label'] = $label; - if($cron_freq/(60*60)>1 && is_int($cron_freq/(60*60))){ - $cron['frequency']=(int)($cron_freq/(60*60)); - $cron['time'] = 'hour'; - } - else{ - $cron['frequency']=(int)($cron_freq/60); - $cron['time'] = 'min'; - } - $cron['status'] = $cron_status; - $cron['description'] = $cron_desc; - $cron['id']=$id; - - - $smarty->assign("CRON_DETAILS",$cron); - $smarty->assign("MOD", return_module_language($current_language,'CronTasks')); - $smarty->assign("THEME", $theme); - $smarty->assign("IMAGE_PATH",$image_path); - $smarty->assign("APP", $app_strings); - $smarty->assign("CMOD", $mod_strings); - $smarty->assign("MIN_CRON_FREQUENCY", getMinimumCronFrequency()); - $smarty->display("modules/CronTasks/EditCron.tpl"); -} -else { - header("Location:index.php?module=CronTasks&action=ListCronJobs&directmode=ajax"); -} -?> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/ListCronJobs.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/ListCronJobs.php deleted file mode 100644 index 7a39ae4a8..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/ListCronJobs.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -require_once('vtlib/Vtiger/Cron.php'); -require_once ('include/utils/utils.php'); - -global $theme,$app_strings,$mod_strings,$current_language; -$theme_path="themes/".$theme."/"; -$image_path=$theme_path."images/"; -$smarty = new vtigerCRM_Smarty; -$cronTasks = Vtiger_Cron::listAllActiveInstances(1); -$output = Array(); - -foreach ($cronTasks as $cronTask) { - $out = Array(); - $cron_id = $cronTask->getId(); - $cron_mod = $cronTask->getName(); - $cron_freq = $cronTask->getFrequency(); - $cron_st = $cronTask->getStatus(); - if($cronTask->getLastStart() != 0) { - $start_ts = $cronTask->getLastStart(); - $end_ts = time(); - $cron_started = dateDiffAsString($start_ts, $end_ts); - } - else { - $cron_started = ''; - } - if($cronTask->getLastEnd() != 0) { - $start_ts = $cronTask->getLastEnd(); - $end_ts = time(); - $cron_end = dateDiffAsString($start_ts, $end_ts); - } - else { - $cron_end = ''; - } - $out ['cronname'] = getTranslatedString($cron_mod,$cronTask->getModule()); - - $out['hours'] = str_pad((int)(($cron_freq/(60*60))),2,0,STR_PAD_LEFT); - $out['mins'] =str_pad((int)(($cron_freq%(60*60))/60),2,0,STR_PAD_LEFT); - $out ['id'] = $cron_id; - $out ['status'] = $cron_st; - $out['laststart']= $cron_started; - $out['lastend'] =$cron_end; - if($out['status'] == Vtiger_Cron::$STATUS_DISABLED ) - $out['status'] = $mod_strings['LBL_INACTIVE']; - elseif($out['status'] == Vtiger_Cron::$STATUS_ENABLED) - $out['status'] = $mod_strings['LBL_ACTIVE']; - else - $out['status'] = $mod_strings['LBL_RUNNING']; - - $output [] = $out; -} - -$smarty->assign("CRON",$output); -$smarty->assign("MOD", return_module_language($current_language,'CronTasks')); -$smarty->assign("MIN_CRON_FREQUENCY",getMinimumCronFrequency()); -$smarty->assign("THEME", $theme); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("CMOD", $mod_strings); - -if($_REQUEST['directmode'] != '') - $smarty->display("modules/CronTasks/CronContents.tpl"); -else { - $smarty->display("modules/CronTasks/Cron.tpl"); -} -?> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/SaveCron.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/SaveCron.php deleted file mode 100644 index d85cc61a6..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/SaveCron.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -require_once('include/database/PearDatabase.php'); -require_once('include/utils/VtlibUtils.php'); -require_once('vtlib/Vtiger/Cron.php'); -global $adb; -if(isset($_REQUEST['record']) && $_REQUEST['record']!='') { - $cronTask = Vtiger_Cron::getInstanceById($_REQUEST['record']); - $cronTask->updateStatus($_REQUEST['status']); - if($_REQUEST['timevalue'] != '') { - - if($_REQUEST['time'] == 'min') { - - $time = $_REQUEST['timevalue']*60; - } - else { - $time = $_REQUEST['timevalue']*60*60; - } - $cronTask->updateFrequency($time); - } -} -$loc = "Location: index.php?action=CronTasksAjax&file=ListCronJobs&module=CronTasks&directmode=ajax"; -header($loc); -?> diff --git a/pkg/vtiger/modules/CronTasks/modules/CronTasks/language/en_us.lang.php b/pkg/vtiger/modules/CronTasks/modules/CronTasks/language/en_us.lang.php deleted file mode 100644 index dfe2cd774..000000000 --- a/pkg/vtiger/modules/CronTasks/modules/CronTasks/language/en_us.lang.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** YOUR LICENSE TEXT HERE **/ -$mod_strings = Array ( - 'LBL_ACTIVE' => 'Active', - 'LBL_INACTIVE' => 'InActive', - 'LBL_STATUS' => 'Status', - 'LBL_SCHEDULER' => 'Scheduler', - 'LBL_SETTINGS' => 'Settings', - 'LBL_FREQUENCY'=> 'Frequency', - 'LBL_HOURMIN' => '(H:M)', - 'LAST_START'=>'Last Scan Started', - 'LAST_END'=>'Last Scan Ended', - 'LBL_SEQUENCE'=>'Sequence', - 'LBL_TOOLS' =>'Tools', - 'LBL_DAYS'=>'Days', - 'LBL_HOURS'=>'Hours', - 'LBL_MINS'=>'Mins', - 'LBL_RUNNING'=>'Running', - 'LBL_MINIMUM_FREQUENCY'=>'Frequency of any cron job configured should be greater than', - 'LBL_SECONDS'=>'sec ago', - 'LBL_MINUTES'=>'min(s) ago', - 'LBL_HOURS'=>'hr(s) ago', - 'LBL_DAYS'=>'day(s) ago', - 'LBL_MONTHS'=>'month(s) ago', - 'LBL_YEARS'=>'year(s) ago', -); -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/CronTasks/templates/Cron.tpl b/pkg/vtiger/modules/CronTasks/templates/Cron.tpl deleted file mode 100644 index fb2ad03a8..000000000 --- a/pkg/vtiger/modules/CronTasks/templates/Cron.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{*<!-- -/********************************************************************************* - ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - * - ********************************************************************************/ --->*} -<script language="JAVASCRIPT" type="text/javascript" src="include/js/smoothscroll.js"></script> -<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script> -<script language="JavaScript" type="text/javascript" src="modules/CronTasks/CronTasks.js"></script><br> -<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%"> -<tbody><tr> - <td valign="top"><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td> - <td class="showPanelBg" style="padding: 10px;" valign="top" width="100%"> - <br> - <div align=center> - {include file='SetMenu.tpl'} - <!-- DISPLAY --> - <table border=0 cellspacing=0 cellpadding=5 width=100% class="settingsSelUITopLine"> - <tr> - <td width="50" rowspan="2" valign="top"><img src="{'Cron.png'|@vtiger_imageurl:$THEME}" alt="{$MOD.LBL_USERS}" width="48" height="48" border=0 title="{$MOD.LBL_USERS}"></td> - <td colspan="2" class="heading2" valign=bottom align="left"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS}</a> > {$MOD.LBL_SCHEDULER} </b></td> - <td rowspan=2 class="small" align=right> </td> - </tr> - <tr> - <td valign=top class="small" align="left">{$MOD.LBL_SCHEDULER}</td> - </tr> - </table> - <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading"> - <tr><td> </td></tr> - </table> - <table width="100%" border="0" cellpadding="5" cellspacing="0" class="listTableTopButtons"> - <tr > - <td style="padding-left:5px;" class="big">{$MOD.LBL_SCHEDULER}</td> - <td align="right"> </td> - </tr> - </table> - - <div id="notifycontents"> - {include file='modules/CronTasks/CronContents.tpl'} - </div> - - <table border=0 cellspacing=0 cellpadding=5 width=100% > - <tr><td class="small" nowrap align=right><a href="#top">{$MOD.LBL_SCROLL}</a></td></tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - - </div> - -</td> - <td valign="top"><img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"></td> - </tr> -</tbody> -</table> - <div id="editdiv" style="display:none;position:absolute;width:450px;"></div> diff --git a/pkg/vtiger/modules/CronTasks/templates/CronContents.tpl b/pkg/vtiger/modules/CronTasks/templates/CronContents.tpl deleted file mode 100644 index 5e818afd0..000000000 --- a/pkg/vtiger/modules/CronTasks/templates/CronContents.tpl +++ /dev/null @@ -1,53 +0,0 @@ -{*<!-- -/********************************************************************************* - ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - * - ********************************************************************************/ --->*} -<table width="100%" cellpadding="5" cellspacing="0" class="listTable" > - <tr> - <td class="colHeader small" width="5%">#</td> - <td class="colHeader small" width="20%">Cron Job</td> - <td class="colHeader small" width="15%">{$MOD.LBL_FREQUENCY}{$MOD.LBL_HOURMIN}</td> - <td class="colHeader small" width="10%">{$CMOD.LBL_STATUS}</td> - <td class="colHeader small" width="20%">{$MOD.LAST_START}</td> - <td class="colHeader small" width="15%">{$MOD.LAST_END}</td> - <td class="colHeader small" width='10%'>{$MOD.LBL_SEQUENCE}</td> - <td class="colHeader small" width="5%">{$MOD.LBL_TOOLS}</td> - </tr> - {foreach name=cronlist item=elements from=$CRON} - <tr> - <td class="listTableRow small">{$smarty.foreach.cronlist.iteration}</td> - <td class="listTableRow small">{$elements.cronname}</td> - <td class="listTableRow small">{$elements.days} {$elements.hours}:{$elements.mins}</td> - {if $elements.status eq 'Active'} - <td class="listTableRow small active">{$elements.status}</td> - {else} - <td class="listTableRow small inactive">{$elements.status}</td> - {/if} - <td class="listTableRow small">{$elements.laststart}</td> - <td class="listTableRow small">{$elements.lastend}</td> - {if $smarty.foreach.cronlist.first neq true} - <td align="center" class="listTableRow"><a href="javascript:move_module('{$elements.id}','Up');" ><img src="{'arrow_up.png'|@vtiger_imageurl:$THEME}" style="width:16px;height:16px;" border="0" /></a> - {/if} - {if $smarty.foreach.cronlist.last eq true} - <img src="{'blank.gif'|@vtiger_imageurl:$THEME}" style="width:16px;height:16px;" border="0" /> - {/if} - {if $smarty.foreach.cronlist.first eq true} - <td align="center" class="listTableRow"><img src="{'blank.gif'|@vtiger_imageurl:$THEME}" style="width:16px;height:16px;" border="0" /> - <a href="javascript:move_module('{$elements.id}','Down');" ><img src="{'arrow_down.png'|@vtiger_imageurl:$THEME}" style="width:16px;height:16px;" border="0" /></a></td> - {/if} - - {if $smarty.foreach.cronlist.last neq true && $smarty.foreach.cronlist.first neq true} - <a href="javascript:move_module('{$elements.id}','Down');" ><img src="{'arrow_down.png'|@vtiger_imageurl:$THEME}" style="width:16px;height:16px;" border="0" /></a></td> - {/if} - <td class="listTableRow small" align="center" ><img onClick="fnvshobj(this,'editdiv');fetchEditCron('{$elements.id}');" style="cursor:pointer;" src="{'editfield.gif'|@vtiger_imageurl:$THEME}" title="{$APP.LBL_EDIT}"></td> - </tr> - {/foreach} - </table> - diff --git a/pkg/vtiger/modules/CronTasks/templates/EditCron.tpl b/pkg/vtiger/modules/CronTasks/templates/EditCron.tpl deleted file mode 100644 index eb158e8ea..000000000 --- a/pkg/vtiger/modules/CronTasks/templates/EditCron.tpl +++ /dev/null @@ -1,69 +0,0 @@ -{*<!-- -/********************************************************************************* - ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - * - ********************************************************************************/ --->*} -<div id="EditInv" class="layerPopup"> -<input id="min_freq" type="hidden" value="{$MIN_CRON_FREQUENCY}"> -<input id="desc" type="hidden" value="{'LBL_MINIMUM_FREQUENCY'|@getTranslatedString:$MODULE} {$MIN_CRON_FREQUENCY} {'LBL_MINS'|@getTranslatedString:$MODULE}" size="35" maxlength="40"> -<table border=0 cellspacing=0 cellpadding=5 width=100% class=layerHeadingULine> -<tr> - <td class="layerPopupHeading" align="left">{$CRON_DETAILS.label}</td> - <td align="right" class="small"><img onClick="hide('editdiv');" style="cursor:pointer;" src="{'close.gif'|@vtiger_imageurl:$THEME}" align="middle" border="0"></td> -</tr> -</table> -<table border=0 cellspacing=0 cellpadding=5 width=100% align=center> -<tr> - <td class="small"> - <table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white> - <tr> - <td align="right" class="cellLabel small" width="40%"><b>{$MOD.LBL_STATUS} :</b></td> - <td align="left" class="cellText small" width="60%"> - <select class="small" id="cron_status" name="cron_status"> - {if $CRON_DETAILS.status eq 1} - <option value="1" selected>{$MOD.LBL_ACTIVE}</option> - <option value="0">{$MOD.LBL_INACTIVE}</option> - {else} - <option value="1">{$MOD.LBL_ACTIVE}</option> - <option value="0" selected>{$MOD.LBL_INACTIVE}</option> - {/if} - </select> - </td> - </tr> - <tr> - <td align="right" class="cellLabel small"><b>{$MOD.LBL_FREQUENCY}</b></td> - <td align="left" class="cellText small" width="104px"><input class="txtBox" id="CronTime" name="CronTime" value="{$CRON_DETAILS.frequency}" style="width:25px;" type="text"> - <select class="small" id="cron_time" name="cron_status"> - {if $CRON_DETAILS.time eq 'min'} - <option value="min" selected>{$MOD.LBL_MINS}</option> - <option value="hours">{$MOD.LBL_HOURS}</option> - {else} - <option value="min" >{$MOD.LBL_MINS}</option> - <option value="hours" selected>{$MOD.LBL_HOURS}</option> - {/if} - </td> - </tr> - <tr> - <td colspan=2> - {$CRON_DETAILS.description} - </td> - <tr> - </table> - </td> -</tr> -</table> -<table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport"> -<tr> - <td align="center" class="small"> - <input name="save" value="{$APP.LBL_SAVE_BUTTON_LABEL}" class="crmButton small save" type="button" onClick="fetchSaveCron('{$CRON_DETAILS.id}')"> - <input name="cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" class="crmButton small cancel" type="button" onClick="hide('editdiv');"> - </td> - </tr> -</table> -</div> -- GitLab