Add php files
This commit is contained in:
152
modules/SugarFeed/AdminSettings.php
Executable file
152
modules/SugarFeed/AdminSettings.php
Executable file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
require_once('modules/Configurator/Configurator.php');
|
||||
|
||||
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
|
||||
// Handle posts
|
||||
if ( !empty($_REQUEST['process']) ) {
|
||||
// Check the cleanup logic hook, make sure it is still there
|
||||
check_logic_hook_file('Users','after_login', array(1, 'SugarFeed old feed entry remover', 'modules/SugarFeed/SugarFeedFlush.php', 'SugarFeedFlush', 'flushStaleEntries'));
|
||||
|
||||
// We have data posted
|
||||
if ( $_REQUEST['process'] == 'true' ) {
|
||||
// They want us to process it, the false will just fall outside of this statement
|
||||
if ( $_REQUEST['feed_enable'] == '1' ) {
|
||||
// The feed is enabled, pay attention to what categories should be enabled or disabled
|
||||
|
||||
if ( ! isset($db) ) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
}
|
||||
$ret = $db->query("SELECT * FROM config WHERE category = 'sugarfeed' AND name LIKE 'module_%'");
|
||||
$current_modules = array();
|
||||
while ( $row = $db->fetchByAssoc($ret) ) {
|
||||
$current_modules[$row['name']] = $row['value'];
|
||||
}
|
||||
|
||||
$active_modules = $_REQUEST['modules'];
|
||||
if ( ! is_array($active_modules) ) { $active_modules = array(); }
|
||||
|
||||
foreach ( $active_modules as $name => $is_active ) {
|
||||
$module = substr($name,7);
|
||||
|
||||
if ( $is_active == '1' ) {
|
||||
// They are activating something that was disabled before
|
||||
SugarFeed::activateModuleFeed($module);
|
||||
} else {
|
||||
// They are disabling something that was active before
|
||||
SugarFeed::disableModuleFeed($module);
|
||||
}
|
||||
}
|
||||
|
||||
$admin->saveSetting('sugarfeed','enabled','1');
|
||||
} else {
|
||||
$admin->saveSetting('sugarfeed','enabled','0');
|
||||
// Now we need to remove all of the logic hooks, so they don't continue to run
|
||||
// We also need to leave the database alone, so they can enable/disable modules with the system disabled
|
||||
$modulesWithFeeds = SugarFeed::getAllFeedModules();
|
||||
|
||||
foreach ( $modulesWithFeeds as $currFeedModule ) {
|
||||
SugarFeed::disableModuleFeed($currFeedModule,FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
$admin->retrieveSettings(FALSE,TRUE);
|
||||
SugarFeed::flushBackendCache();
|
||||
} else if ( $_REQUEST['process'] == 'deleteRecords' ) {
|
||||
if ( ! isset($db) ) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
}
|
||||
$db->query("UPDATE sugarfeed SET deleted = '1'");
|
||||
echo(translate('LBL_RECORDS_DELETED','SugarFeed'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( $_REQUEST['process'] == 'true' || $_REQUEST['process'] == 'false' ) {
|
||||
header('Location: index.php?module=Administration&action=index');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$sugar_smarty = new Sugar_Smarty();
|
||||
$sugar_smarty->assign('mod', $mod_strings);
|
||||
$sugar_smarty->assign('app', $app_strings);
|
||||
|
||||
if ( isset($admin->settings['sugarfeed_enabled']) && $admin->settings['sugarfeed_enabled'] == '1' ) {
|
||||
$sugar_smarty->assign('enabled_checkbox','checked');
|
||||
}
|
||||
|
||||
$possible_feeds = SugarFeed::getAllFeedModules();
|
||||
$module_list = array();
|
||||
$userFeedEnabled = 0;
|
||||
foreach ( $possible_feeds as $module ) {
|
||||
$currModule = array();
|
||||
if ( isset($admin->settings['sugarfeed_module_'.$module]) && $admin->settings['sugarfeed_module_'.$module] == '1' ) {
|
||||
$currModule['enabled'] = 1;
|
||||
} else {
|
||||
$currModule['enabled'] = 0;
|
||||
}
|
||||
|
||||
$currModule['module'] = $module;
|
||||
if ( $module == 'UserFeed' ) {
|
||||
// Fake module, need to handle specially
|
||||
$userFeedEnabled = $currModule['enabled'];
|
||||
continue;
|
||||
} else {
|
||||
$currModule['label'] = $GLOBALS['app_list_strings']['moduleList'][$module];
|
||||
}
|
||||
|
||||
$module_list[] = $currModule;
|
||||
}
|
||||
$sugar_smarty->assign('module_list',$module_list);
|
||||
$sugar_smarty->assign('user_feed_enabled',$userFeedEnabled);
|
||||
|
||||
echo getClassicModuleTitle(
|
||||
"Administration",
|
||||
array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
$mod_strings['LBL_MODULE_NAME'],
|
||||
),
|
||||
true
|
||||
);
|
||||
$sugar_smarty->display('modules/SugarFeed/AdminSettings.tpl');
|
||||
|
||||
52
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.meta.php
Executable file
52
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.meta.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['SugarFeedDashlet'] = array('module' => 'SugarFeed',
|
||||
'title' => translate('LBL_HOMEPAGE_TITLE', 'SugarFeed'),
|
||||
'description' => 'A customizable view into Sugar_Feed',
|
||||
'icon' => 'themes/default/images/icon_SugarFeed_32.gif',
|
||||
'dynamic_hide' => true,
|
||||
'category' => 'Tools');
|
||||
388
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
Executable file
388
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
Executable file
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
|
||||
|
||||
class SugarFeedDashlet extends DashletGeneric {
|
||||
var $displayRows = 15;
|
||||
|
||||
var $categories;
|
||||
|
||||
var $selectedCategories = array();
|
||||
|
||||
function SugarFeedDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings, $app_list_strings;
|
||||
require('modules/SugarFeed/metadata/dashletviewdefs.php');
|
||||
$this->myItemsOnly = false;
|
||||
parent::DashletGeneric($id, $def);
|
||||
$this->myItemsOnly = false;
|
||||
$this->isConfigurable = true;
|
||||
$this->hasScript = true;
|
||||
// Add in some default categories.
|
||||
$this->categories['ALL'] = translate('LBL_ALL','SugarFeed');
|
||||
// Need to get the rest of the active SugarFeed modules
|
||||
$module_list = SugarFeed::getActiveFeedModules();
|
||||
// Translate the category names
|
||||
if ( ! is_array($module_list) ) { $module_list = array(); }
|
||||
foreach ( $module_list as $module ) {
|
||||
if ( $module == 'UserFeed' ) {
|
||||
// Fake module, need to translate specially
|
||||
$this->categories[$module] = translate('LBL_USER_FEED','SugarFeed');
|
||||
} else {
|
||||
$this->categories[$module] = $app_list_strings['moduleList'][$module];
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
|
||||
if(!empty($def['rows']))$this->displayRows = $def['rows'];
|
||||
if(!empty($def['categories']))$this->selectedCategories = $def['categories'];
|
||||
$this->searchFields = $dashletData['SugarFeedDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['SugarFeedDashlet']['columns'];
|
||||
$catCount = count($this->categories);
|
||||
ACLController::filterModuleList($this->categories, false);
|
||||
if(count($this->categories) < $catCount){
|
||||
if(!empty($this->selectedCategories)){
|
||||
ACLController::filterModuleList($this->selectedCategories, true);
|
||||
}else{
|
||||
$this->selectedCategories = array_keys($this->categories);
|
||||
unset($this->selectedCategories[0]);
|
||||
}
|
||||
}
|
||||
$this->seedBean = new SugarFeed();
|
||||
}
|
||||
|
||||
function process($lvsParams = array()) {
|
||||
global $current_user;
|
||||
|
||||
$currentSearchFields = array();
|
||||
$configureView = true; // configure view or regular view
|
||||
$query = false;
|
||||
$whereArray = array();
|
||||
$lvsParams['massupdate'] = false;
|
||||
|
||||
// apply filters
|
||||
if(isset($this->filters) || $this->myItemsOnly) {
|
||||
$whereArray = $this->buildWhere();
|
||||
}
|
||||
|
||||
$this->lvs->export = false;
|
||||
$this->lvs->multiSelect = false;
|
||||
$this->lvs->quickViewLinks = false;
|
||||
// columns
|
||||
foreach($this->columns as $name => $val) {
|
||||
if(!empty($val['default']) && $val['default']) {
|
||||
$displayColumns[strtoupper($name)] = $val;
|
||||
$displayColumns[strtoupper($name)]['label'] = trim($displayColumns[strtoupper($name)]['label'], ':');
|
||||
}
|
||||
}
|
||||
|
||||
$this->lvs->displayColumns = $displayColumns;
|
||||
|
||||
$this->lvs->lvd->setVariableName($this->seedBean->object_name, array());
|
||||
|
||||
$lvsParams['overrideOrder'] = true;
|
||||
$lvsParams['orderBy'] = 'date_entered';
|
||||
$lvsParams['sortOrder'] = 'DESC';
|
||||
|
||||
// Get the real module list
|
||||
if (empty($this->selectedCategories)){
|
||||
$mod_list = $this->categories;
|
||||
} else {
|
||||
$mod_list = array_flip($this->selectedCategories);//27949, here the key of $this->selectedCategories is not module name, the value is module name, so array_flip it.
|
||||
}
|
||||
|
||||
$admin_modules = array();
|
||||
$owner_modules = array();
|
||||
$regular_modules = array();
|
||||
foreach($mod_list as $module => $ignore) {
|
||||
// Handle the UserFeed differently
|
||||
if ( $module == 'UserFeed') {
|
||||
$regular_modules[] = 'UserFeed';
|
||||
continue;
|
||||
}
|
||||
if (ACLAction::getUserAccessLevel($current_user->id,$module,'view') <= ACL_ALLOW_NONE ) {
|
||||
// Not enough access to view any records, don't add it to any lists
|
||||
continue;
|
||||
}
|
||||
if ( ACLAction::getUserAccessLevel($current_user->id,$module,'view') == ACL_ALLOW_OWNER ) {
|
||||
$owner_modules[] = $module;
|
||||
} else {
|
||||
$regular_modules[] = $module;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($this->displayTpl))
|
||||
{
|
||||
//MFH BUG #14296
|
||||
$where = '';
|
||||
if(!empty($whereArray)){
|
||||
$where = '(' . implode(') AND (', $whereArray) . ')';
|
||||
}
|
||||
|
||||
$module_limiter = " sugarfeed.related_module in ('" . implode("','", $regular_modules) . "')";
|
||||
|
||||
if ( count($owner_modules) > 0
|
||||
) {
|
||||
$module_limiter = " ((sugarfeed.related_module IN ('".implode("','", $regular_modules)."') "
|
||||
.") ";
|
||||
if ( count($owner_modules) > 0 ) {
|
||||
$module_limiter .= "OR (sugarfeed.related_module IN('".implode("','", $owner_modules)."') AND sugarfeed.assigned_user_id = '".$current_user->id."' "
|
||||
.") ";
|
||||
}
|
||||
$module_limiter .= ")";
|
||||
}
|
||||
if(!empty($where)) { $where .= ' AND '; }
|
||||
$where .= $module_limiter;
|
||||
|
||||
$this->lvs->setup($this->seedBean, $this->displayTpl, $where , $lvsParams, 0, $this->displayRows,
|
||||
array('name',
|
||||
'description',
|
||||
'date_entered',
|
||||
'created_by',
|
||||
'link_url',
|
||||
'link_type'));
|
||||
|
||||
foreach($this->lvs->data['data'] as $row => $data) {
|
||||
$this->lvs->data['data'][$row]['CREATED_BY'] = get_assigned_user_name($data['CREATED_BY']);
|
||||
$this->lvs->data['data'][$row]['NAME'] = str_replace("{this.CREATED_BY}",$this->lvs->data['data'][$row]['CREATED_BY'],$data['NAME']);
|
||||
}
|
||||
|
||||
// assign a baseURL w/ the action set as DisplayDashlet
|
||||
foreach($this->lvs->data['pageData']['urls'] as $type => $url) {
|
||||
// awu Replacing action=DisplayDashlet with action=DynamicAction&DynamicAction=DisplayDashlet
|
||||
if($type == 'orderBy')
|
||||
$this->lvs->data['pageData']['urls'][$type] = preg_replace('/(action=.*&)/Ui', 'action=DynamicAction&DynamicAction=displayDashlet&', $url);
|
||||
else
|
||||
$this->lvs->data['pageData']['urls'][$type] = preg_replace('/(action=.*&)/Ui', 'action=DynamicAction&DynamicAction=displayDashlet&', $url) . '&sugar_body_only=1&id=' . $this->id;
|
||||
}
|
||||
|
||||
$this->lvs->ss->assign('dashletId', $this->id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function deleteUserFeed() {
|
||||
if(!empty($_REQUEST['record'])) {
|
||||
$feed = new SugarFeed();
|
||||
$feed->retrieve($_REQUEST['record']);
|
||||
if(is_admin($GLOBALS['current_user']) || $feed->created_by == $GLOBALS['current_user']->id){
|
||||
$feed->mark_deleted($_REQUEST['record']);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
function pushUserFeed() {
|
||||
if(!empty($_REQUEST['text'])) {
|
||||
$text = htmlspecialchars($_REQUEST['text']);
|
||||
//allow for bold and italic user tags
|
||||
$text = preg_replace('/&lt;(\/*[bi])&gt;/i','<$1>', $text);
|
||||
SugarFeed::pushFeed($text, 'UserFeed', $GLOBALS['current_user']->id,
|
||||
$GLOBALS['current_user']->id,
|
||||
$_REQUEST['link_type'], $_REQUEST['link_url']
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
function displayOptions() {
|
||||
global $app_strings;
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('titleLBL', translate('LBL_TITLE', 'SugarFeed'));
|
||||
$ss->assign('categoriesLBL', translate('LBL_CATEGORIES', 'SugarFeed'));
|
||||
$ss->assign('rowsLBL', translate('LBL_ROWS', 'SugarFeed'));
|
||||
$ss->assign('saveLBL', $app_strings['LBL_SAVE_BUTTON_LABEL']);
|
||||
$ss->assign('title', $this->title);
|
||||
$ss->assign('categories', $this->categories);
|
||||
if ( empty($this->selectedCategories) ) {
|
||||
$this->selectedCategories['ALL'] = 'ALL';
|
||||
}
|
||||
$ss->assign('selectedCategories', $this->selectedCategories);
|
||||
$ss->assign('rows', $this->displayRows);
|
||||
$ss->assign('id', $this->id);
|
||||
|
||||
return $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* creats the values
|
||||
* @return
|
||||
* @param $req Object
|
||||
*/
|
||||
function saveOptions($req) {
|
||||
global $sugar_config, $timedate, $current_user, $theme;
|
||||
$options = array();
|
||||
$options['title'] = $_REQUEST['title'];
|
||||
$rows = intval($_REQUEST['rows']);
|
||||
if($rows <= 0) {
|
||||
$rows = 15;
|
||||
}
|
||||
if($rows > 100){
|
||||
$rows = 100;
|
||||
}
|
||||
$options['rows'] = $rows;
|
||||
$options['categories'] = $_REQUEST['categories'];
|
||||
foreach($options['categories'] as $cat){
|
||||
if($cat == 'ALL'){
|
||||
unset($options['categories']);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
function sugarFeedDisplayScript() {
|
||||
// Forces the quicksearch to reload anytime the dashlet gets refreshed
|
||||
return '<script type="text/javascript">
|
||||
enableQS(false);
|
||||
</script>';
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return javascript including QuickSearch for SugarFeeds
|
||||
*/
|
||||
function displayScript() {
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('saving', translate('LBL_SAVING', 'SugarFeed'));
|
||||
$ss->assign('saved', translate('LBL_SAVED', 'SugarFeed'));
|
||||
$ss->assign('id', $this->id);
|
||||
|
||||
$str = $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl');
|
||||
return $str; // return parent::display for title and such
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the fully rendered dashlet
|
||||
*/
|
||||
function display(){
|
||||
|
||||
$listview = parent::display();
|
||||
$GLOBALS['current_sugarfeed'] = $this;
|
||||
$listview = preg_replace_callback('/\{([^\}]+)\.([^\}]+)\}/', create_function(
|
||||
'$matches',
|
||||
'if($matches[1] == "this"){$var = $matches[2]; return $GLOBALS[\'current_sugarfeed\']->$var;}else{return translate($matches[2], $matches[1]);}'
|
||||
),$listview);
|
||||
$listview = preg_replace('/\[(\w+)\:([\w\-\d]*)\:([^\]]*)\]/', '<a href="index.php?module=$1&action=DetailView&record=$2"><img src="themes/default/images/$1.gif" border=0>$3</a>', $listview);
|
||||
|
||||
return $listview.'</div>';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the title and the user post form
|
||||
* @param $text Object
|
||||
*/
|
||||
function getHeader($text='') {
|
||||
return parent::getHeader($text) . $this->getPostForm().$this->getDisabledWarning().$this->sugarFeedDisplayScript().'<div class="sugarFeedDashlet">';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return a warning message if the sugar feed system is not enabled currently
|
||||
*/
|
||||
function getDisabledWarning(){
|
||||
/* Check to see if the sugar feed system is enabled */
|
||||
if ( ! $this->shouldDisplay() ) {
|
||||
// The Sugar Feeds are disabled, populate the warning message
|
||||
return translate('LBL_DASHLET_DISABLED','SugarFeed');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the form for users posting custom messages to the feed stream
|
||||
*/
|
||||
function getPostForm(){
|
||||
global $current_user;
|
||||
|
||||
if ( empty($this->categories['UserFeed']) ) {
|
||||
// The user feed system isn't enabled, don't let them post notes
|
||||
return '';
|
||||
}
|
||||
$user_name = ucfirst($GLOBALS['current_user']->user_name);
|
||||
$moreimg = SugarThemeRegistry::current()->getImage('advanced_search' , 'onclick="toggleDisplay(\'more_' . $this->id . '\'); toggleDisplay(\'more_img_'.$this->id.'\'); toggleDisplay(\'less_img_'.$this->id.'\');"');
|
||||
$lessimg = SugarThemeRegistry::current()->getImage('basic_search' , 'onclick="toggleDisplay(\'more_' . $this->id . '\'); toggleDisplay(\'more_img_'.$this->id.'\'); toggleDisplay(\'less_img_'.$this->id.'\');"');
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('LBL_TO', translate('LBL_TO', 'SugarFeed'));
|
||||
$ss->assign('LBL_POST', translate('LBL_POST', 'SugarFeed'));
|
||||
$ss->assign('LBL_SELECT', translate('LBL_SELECT', 'SugarFeed'));
|
||||
$ss->assign('LBL_IS', translate('LBL_IS', 'SugarFeed'));
|
||||
$ss->assign('id', $this->id);
|
||||
$ss->assign('more_img', $moreimg);
|
||||
$ss->assign('less_img', $lessimg);
|
||||
if($current_user->getPreference('use_real_names') == 'on'){
|
||||
$ss->assign('user_name', $current_user->full_name);
|
||||
}
|
||||
else {
|
||||
$ss->assign('user_name', $user_name);
|
||||
}
|
||||
$linkTypesIn = SugarFeed::getLinkTypes();
|
||||
$linkTypes = array();
|
||||
foreach ( $linkTypesIn as $key => $value ) {
|
||||
$linkTypes[$key] = translate('LBL_LINK_TYPE_'.$value,'SugarFeed');
|
||||
}
|
||||
$ss->assign('link_types', $linkTypes);
|
||||
return $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl');
|
||||
|
||||
}
|
||||
|
||||
// This is called from the include/MySugar/DashletsDialog/DashletsDialog.php and determines if we should display the SugarFeed dashlet as an option or not
|
||||
static function shouldDisplay() {
|
||||
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
|
||||
if ( !isset($admin->settings['sugarfeed_enabled']) || $admin->settings['sugarfeed_enabled'] != '1' ) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
0
modules/SugarFeed/Forms.php
Executable file
0
modules/SugarFeed/Forms.php
Executable file
46
modules/SugarFeed/Menu.php
Executable file
46
modules/SugarFeed/Menu.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_menu = Array();
|
||||
?>
|
||||
417
modules/SugarFeed/SugarFeed.php
Executable file
417
modules/SugarFeed/SugarFeed.php
Executable file
@@ -0,0 +1,417 @@
|
||||
<?PHP
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class SugarFeed extends Basic {
|
||||
var $new_schema = true;
|
||||
var $module_dir = 'SugarFeed';
|
||||
var $object_name = 'SugarFeed';
|
||||
var $table_name = 'sugarfeed';
|
||||
var $importable = false;
|
||||
|
||||
var $id;
|
||||
var $name;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $modified_by_name;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $description;
|
||||
var $deleted;
|
||||
var $created_by_link;
|
||||
var $modified_user_link;
|
||||
var $assigned_user_id;
|
||||
var $assigned_user_name;
|
||||
var $assigned_user_link;
|
||||
|
||||
function SugarFeed(){
|
||||
parent::Basic();
|
||||
}
|
||||
|
||||
static function activateModuleFeed( $module, $updateDB = true ) {
|
||||
if ( $module != 'UserFeed' ) {
|
||||
// UserFeed is a fake module, used for the user postings to the feed
|
||||
// Don't try to load up any classes for it
|
||||
$fileList = SugarFeed::getModuleFeedFiles($module);
|
||||
|
||||
foreach ( $fileList as $fileName ) {
|
||||
$feedClass = substr(basename($fileName),0,-4);
|
||||
|
||||
require_once($fileName);
|
||||
$tmpClass = new $feedClass();
|
||||
$tmpClass->installHook($fileName,$feedClass);
|
||||
}
|
||||
}
|
||||
if ( $updateDB == true ) {
|
||||
|
||||
$admin = new Administration();
|
||||
$admin->saveSetting('sugarfeed','module_'.$admin->db->quote($module),'1');
|
||||
}
|
||||
}
|
||||
|
||||
static function disableModuleFeed( $module, $updateDB = true ) {
|
||||
if ( $module != 'UserFeed' ) {
|
||||
// UserFeed is a fake module, used for the user postings to the feed
|
||||
// Don't try to load up any classes for it
|
||||
$fileList = SugarFeed::getModuleFeedFiles($module);
|
||||
|
||||
foreach ( $fileList as $fileName ) {
|
||||
$feedClass = substr(basename($fileName),0,-4);
|
||||
|
||||
require_once($fileName);
|
||||
$tmpClass = new $feedClass();
|
||||
$tmpClass->removeHook($fileName,$feedClass);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $updateDB == true ) {
|
||||
|
||||
$admin = new Administration();
|
||||
$admin->saveSetting('sugarfeed','module_'.$admin->db->quote($module),'0');
|
||||
}
|
||||
}
|
||||
|
||||
static function flushBackendCache( ) {
|
||||
// This function will flush the cache files used for the module list and the link type lists
|
||||
sugar_cache_clear('SugarFeedModules');
|
||||
if ( file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/moduleCache.php') ) {
|
||||
unlink($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/moduleCache.php');
|
||||
}
|
||||
|
||||
sugar_cache_clear('SugarFeedLinkType');
|
||||
if ( file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/linkTypeCache.php') ) {
|
||||
unlink($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/linkTypeCache.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static function getModuleFeedFiles( $module ) {
|
||||
$baseDirList = array('modules/'.$module.'/SugarFeeds/', 'custom/modules/'.$module.'/SugarFeeds/');
|
||||
|
||||
// We store the files in a list sorted by the filename so you can override a default feed by
|
||||
// putting your replacement feed in the custom directory with the same filename
|
||||
$fileList = array();
|
||||
|
||||
foreach ( $baseDirList as $baseDir ) {
|
||||
if ( ! file_exists($baseDir) ) {
|
||||
continue;
|
||||
}
|
||||
$d = dir($baseDir);
|
||||
while ( $file = $d->read() ) {
|
||||
if ( $file{0} == '.' ) { continue; }
|
||||
if ( substr($file,-4) == '.php' ) {
|
||||
// We found one
|
||||
$fileList[$file] = $baseDir.$file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return($fileList);
|
||||
}
|
||||
|
||||
static function getActiveFeedModules( ) {
|
||||
// Stored in a cache somewhere
|
||||
$feedModules = sugar_cache_retrieve('SugarFeedModules');
|
||||
if ( $feedModules != null ) {
|
||||
return($feedModules);
|
||||
}
|
||||
|
||||
// Already stored in a file
|
||||
if ( file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/moduleCache.php') ) {
|
||||
require_once($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/moduleCache.php');
|
||||
sugar_cache_put('SugarFeedModules',$feedModules);
|
||||
return $feedModules;
|
||||
}
|
||||
|
||||
// Gotta go looking for it
|
||||
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
|
||||
$feedModules = array();
|
||||
if ( isset($admin->settings['sugarfeed_enabled']) && $admin->settings['sugarfeed_enabled'] == '1' ) {
|
||||
// Only enable modules if the feed system is enabled
|
||||
foreach ( $admin->settings as $key => $value ) {
|
||||
if ( strncmp($key,'sugarfeed_module_',17) === 0 ) {
|
||||
// It's a module setting
|
||||
if ( $value == '1' ) {
|
||||
$moduleName = substr($key,17);
|
||||
$feedModules[$moduleName] = $moduleName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sugar_cache_put('SugarFeedModules',$feedModules);
|
||||
if ( ! file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed') ) { mkdir_recursive($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed'); }
|
||||
$fd = fopen($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/moduleCache.php','w');
|
||||
fwrite($fd,'<'."?php\n\n".'$feedModules = '.var_export($feedModules,true).';');
|
||||
fclose($fd);
|
||||
|
||||
return $feedModules;
|
||||
}
|
||||
|
||||
static function getAllFeedModules( ) {
|
||||
// Uncached, only used from the admin panel and during installation currently
|
||||
$feedModules = array('UserFeed'=>'UserFeed');
|
||||
|
||||
$baseDirList = array('modules/', 'custom/modules/');
|
||||
foreach ( $baseDirList as $baseDir ) {
|
||||
if ( ! file_exists($baseDir) ) {
|
||||
continue;
|
||||
}
|
||||
$d = dir($baseDir);
|
||||
while ( $module = $d->read() ) {
|
||||
if ( file_exists($baseDir.$module.'/SugarFeeds/') ) {
|
||||
$dFeed = dir($baseDir.$module.'/SugarFeeds/');
|
||||
while ( $file = $dFeed->read() ) {
|
||||
if ( $file{0} == '.' ) { continue; }
|
||||
if ( substr($file,-4) == '.php' ) {
|
||||
// We found one
|
||||
$feedModules[$module] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return($feedModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* pushFeed2
|
||||
* This method is a wrapper to pushFeed
|
||||
*
|
||||
* @param $text String value of the feed's description
|
||||
* @param $bean The SugarBean that is triggering the feed
|
||||
* @param $link_type boolean value indicating whether or not feed is a link type
|
||||
* @param $link_url String value of the URL (for link types only)
|
||||
*/
|
||||
static function pushFeed2($text, $bean, $link_type=false, $link_url=false) {
|
||||
self::pushFeed($text, $bean->module_dir, $bean->id
|
||||
,$bean->assigned_user_id
|
||||
,$link_type
|
||||
,$link_url
|
||||
);
|
||||
}
|
||||
|
||||
static function pushFeed($text, $module, $id,
|
||||
$record_assigned_user_id=false,
|
||||
$link_type=false,
|
||||
$link_url=false
|
||||
) {
|
||||
$feed = new SugarFeed();
|
||||
if(empty($text) || !$feed->ACLAccess('save', true) )return;
|
||||
if(!empty($link_url)){
|
||||
$linkClass = SugarFeed::getLinkClass($link_type);
|
||||
if ( $linkClass !== FALSE ) {
|
||||
$linkClass->handleInput($feed,$link_type,$link_url);
|
||||
}
|
||||
}
|
||||
$text = strip_tags(from_html($text));
|
||||
$text = '<b>{this.CREATED_BY}</b> ' . $text;
|
||||
$feed->name = substr($text, 0, 255);
|
||||
if(strlen($text) > 255){
|
||||
$feed->description = substr($text, 255, 510);
|
||||
}
|
||||
|
||||
if ( $record_assigned_user_id === false ) {
|
||||
$feed->assigned_user_id = $GLOBALS['current_user']->id;
|
||||
} else {
|
||||
$feed->assigned_user_id = $record_assigned_user_id;
|
||||
}
|
||||
$feed->related_id = $id;
|
||||
$feed->related_module = $module;
|
||||
$feed->save();
|
||||
}
|
||||
|
||||
static function getLinkTypes() {
|
||||
static $linkTypeList = null;
|
||||
|
||||
// Fastest, already stored in the static variable
|
||||
if ( $linkTypeList != null ) {
|
||||
return $linkTypeList;
|
||||
}
|
||||
|
||||
// Second fastest, stored in a cache somewhere
|
||||
$linkTypeList = sugar_cache_retrieve('SugarFeedLinkType');
|
||||
if ( $linkTypeList != null ) {
|
||||
return($linkTypeList);
|
||||
}
|
||||
|
||||
// Third fastest, already stored in a file
|
||||
if ( file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/linkTypeCache.php') ) {
|
||||
require_once($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/linkTypeCache.php');
|
||||
sugar_cache_put('SugarFeedLinkType',$linkTypeList);
|
||||
return $linkTypeList;
|
||||
}
|
||||
|
||||
// Slow, have to actually collect the data
|
||||
$baseDirs = array('custom/modules/SugarFeed/linkHandlers/','modules/SugarFeed/linkHandlers');
|
||||
|
||||
$linkTypeList = array();
|
||||
|
||||
foreach ( $baseDirs as $dirName ) {
|
||||
if ( !file_exists($dirName) ) { continue; }
|
||||
$d = dir($dirName);
|
||||
while ( $file = $d->read() ) {
|
||||
if ( $file{0} == '.' ) { continue; }
|
||||
if ( substr($file,-4) == '.php' ) {
|
||||
// We found one
|
||||
$typeName = substr($file,0,-4);
|
||||
$linkTypeList[$typeName] = $typeName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sugar_cache_put('SugarFeedLinkType',$linkTypeList);
|
||||
if ( ! file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed') ) { mkdir_recursive($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed'); }
|
||||
$fd = fopen($GLOBALS['sugar_config']['cache_dir'].'modules/SugarFeed/linkTypeCache.php','w');
|
||||
fwrite($fd,'<'."?php\n\n".'$linkTypeList = '.var_export($linkTypeList,true).';');
|
||||
fclose($fd);
|
||||
|
||||
return $linkTypeList;
|
||||
}
|
||||
|
||||
static function getLinkClass( $linkName ) {
|
||||
$linkTypeList = SugarFeed::getLinkTypes();
|
||||
|
||||
// Have to make sure the linkName is on the list, so they can't pass in linkName's like ../../config.php ... not that they could get anywhere if they did
|
||||
if ( ! isset($linkTypeList[$linkName]) ) {
|
||||
// No class by this name...
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( file_exists('custom/modules/SugarFeed/linkHandlers/'.$linkName.'.php') ) {
|
||||
require_once('custom/modules/SugarFeed/linkHandlers/'.$linkName.'.php');
|
||||
} else {
|
||||
require_once('modules/SugarFeed/linkHandlers/'.$linkName.'.php');
|
||||
}
|
||||
|
||||
$linkClassName = 'FeedLinkHandler'.$linkName;
|
||||
|
||||
$linkClass = new $linkClassName();
|
||||
|
||||
return($linkClass);
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
$data = parent::get_list_view_data();
|
||||
if ( !isset($data['TEAM_NAME']) )
|
||||
$data['TEAM_NAME'] = '';
|
||||
$delete = '';
|
||||
if (ACLController::moduleSupportsACL($data['RELATED_MODULE']) && !ACLController::checkAccess($data['RELATED_MODULE'], 'view', $data['CREATED_BY'] == $GLOBALS['current_user']->id) && !ACLController::checkAccess($data['RELATED_MODULE'], 'list', $data['CREATED_BY'] == $GLOBALS['current_user']->id)){
|
||||
$data['NAME'] = '';
|
||||
return $data;
|
||||
}
|
||||
if(is_admin($GLOBALS['current_user']) || $data['CREATED_BY'] == $GLOBALS['current_user']->id)
|
||||
$delete = SugarThemeRegistry::current()->getImage('delete_inline', 'width="12" height="12" border="0" align="absmiddle" style="vertical-align: bottom;" onclick=\'SugarFeed.deleteFeed("'. $data['ID'] . '", "{this.id}")\'');
|
||||
$data['NAME'] .= $data['DESCRIPTION'];
|
||||
$data['NAME'] = '<div style="padding:3px">' . html_entity_decode($data['NAME']);
|
||||
if(!empty($data['LINK_URL'])){
|
||||
$linkClass = SugarFeed::getLinkClass($data['LINK_TYPE']);
|
||||
if ( $linkClass !== FALSE ) {
|
||||
$data['NAME'] .= $linkClass->getDisplay($data);
|
||||
}
|
||||
}
|
||||
$data['NAME'] .= '<div class="byLineBox"><span class="byLineLeft">';
|
||||
$data['NAME'] .= ' </span><div class="byLineRight"> '. $this->getTimeLapse($data['DATE_ENTERED']) . ' ' .$delete. '</div></div>';
|
||||
return $data ;
|
||||
}
|
||||
|
||||
function getTimeLapse($startDate)
|
||||
{
|
||||
$startDate = $GLOBALS['timedate']->to_db($startDate);
|
||||
$start = array();
|
||||
preg_match('/(\d+)\-(\d+)\-(\d+) (\d+)\:(\d+)\:(\d+)/', $startDate, $start);
|
||||
$end = gmdate('Y-m-d H:i:s');
|
||||
$start_time = gmmktime($start[4],$start[5], $start[6], $start[2], $start[3], $start[1] );
|
||||
$seconds = time()- $start_time;
|
||||
$minutes = $seconds/60;
|
||||
$seconds = $seconds % 60;
|
||||
$hours = floor( $minutes / 60);
|
||||
$minutes = $minutes % 60;
|
||||
$days = floor( $hours / 24);
|
||||
$hours = $hours % 24;
|
||||
$weeks = floor( $days / 7);
|
||||
$days = $days % 7;
|
||||
$result = '';
|
||||
if($weeks == 1){
|
||||
$result = translate('LBL_TIME_LAST_WEEK','SugarFeed').' ';
|
||||
return $result;
|
||||
}else if($weeks > 1){
|
||||
$result .= $weeks . ' '.translate('LBL_TIME_WEEKS','SugarFeed').' ';
|
||||
if($days > 0) {
|
||||
$result .= $days . ' '.translate('LBL_TIME_DAYS','SugarFeed').' ';
|
||||
}
|
||||
}else{
|
||||
if($days == 1){
|
||||
$result = translate('LBL_TIME_YESTERDAY','SugarFeed').' ';
|
||||
return $result;
|
||||
}else if($days > 1){
|
||||
$result .= $days . ' '. translate('LBL_TIME_DAYS','SugarFeed').' ';
|
||||
}else{
|
||||
if($hours == 1) {
|
||||
$result .= $hours . ' '.translate('LBL_TIME_HOUR','SugarFeed').' ';
|
||||
} else {
|
||||
$result .= $hours . ' '.translate('LBL_TIME_HOURS','SugarFeed').' ';
|
||||
}
|
||||
if($hours < 6){
|
||||
if($minutes == 1) {
|
||||
$result .= $minutes . ' ' . translate('LBL_TIME_MINUTE','SugarFeed'). ' ';
|
||||
} else {
|
||||
$result .= $minutes . ' ' . translate('LBL_TIME_MINUTES','SugarFeed'). ' ';
|
||||
}
|
||||
}
|
||||
if($hours == 0 && $minutes == 0) {
|
||||
if($seconds == 1 ) {
|
||||
$result = $seconds . ' ' . translate('LBL_TIME_SECOND','SugarFeed');
|
||||
} else {
|
||||
$result = $seconds . ' ' . translate('LBL_TIME_SECONDS','SugarFeed');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result . ' ' . translate('LBL_TIME_AGO','SugarFeed');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
64
modules/SugarFeed/SugarFeedFlush.php
Executable file
64
modules/SugarFeed/SugarFeedFlush.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class SugarFeedFlush {
|
||||
function flushStaleEntries($bean, $event, $arguments) {
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
|
||||
$td = new TimeDate();
|
||||
|
||||
$currDate = $td->get_gmt_db_date();
|
||||
if ( $admin->settings['sugarfeed_flushdate'] != $currDate ) {
|
||||
|
||||
|
||||
if ( isset($GLOBALS['db']) ) { $db = $GLOBALS['db']; }
|
||||
if ( ! isset($db) ) { $db = DBManagerFactory::getInstance(); }
|
||||
|
||||
$tmpTime = time();
|
||||
$tmpSF = new SugarFeed();
|
||||
$flushBefore = gmdate($td->dbDayFormat,gmmktime(0,0,0,gmdate('m'),gmdate('d')-14,gmdate('Y')));
|
||||
$db->query("DELETE FROM ".$tmpSF->table_name." WHERE date_entered < '".$db->quote($flushBefore)."'");
|
||||
$admin->saveSetting('sugarfeed','flushdate',$currDate);
|
||||
// Flush the cache
|
||||
$admin->retrieveSettings(FALSE,TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
52
modules/SugarFeed/feedLogicBase.php
Executable file
52
modules/SugarFeed/feedLogicBase.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class FeedLogicBase {
|
||||
var $module = '';
|
||||
|
||||
function pushFeed($bean, $event, $arguments){
|
||||
|
||||
}
|
||||
|
||||
function installHook($file,$className){
|
||||
check_logic_hook_file($this->module, "before_save", array(1, $this->module . " push feed", $file, $className, "pushFeed"));
|
||||
}
|
||||
|
||||
function removeHook($file,$className){
|
||||
remove_logic_hook($this->module, "before_save", array(1, $this->module . " push feed", $file, $className, "pushFeed"));
|
||||
}
|
||||
}
|
||||
112
modules/SugarFeed/language/en_us.lang.php
Executable file
112
modules/SugarFeed/language/en_us.lang.php
Executable file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$mod_strings = array (
|
||||
'LBL_TEAM' => 'Team',
|
||||
'LBL_TEAM_ID' => 'Team Id',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_DATE_ENTERED' => 'Date Created',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified By',
|
||||
'LBL_MODIFIED_ID' => 'Modified By Id',
|
||||
'LBL_MODIFIED_NAME' => 'Modified By Name',
|
||||
'LBL_CREATED' => 'Created By',
|
||||
'LBL_CREATED_ID' => 'Created By Id',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_SAVING'=>'Saving...',
|
||||
'LBL_SAVED'=>'Saved',
|
||||
'LBL_CREATED_USER' => 'Created by User',
|
||||
'LBL_MODIFIED_USER' => 'Modified by User',
|
||||
'LBL_LIST_FORM_TITLE' => 'Sugar Feed List',
|
||||
'LBL_MODULE_NAME' => 'Sugar Feed',
|
||||
'LBL_MODULE_TITLE' => 'Sugar Feed',
|
||||
'LBL_DASHLET_DISABLED' => 'Warning: The Sugar Feed system is disabled, no new feed entries will be posted until it is activated',
|
||||
'LBL_ADMIN_SETTINGS' => 'Sugar Feed Settings',
|
||||
'LBL_RECORDS_DELETED' => 'All previous Sugar Feed entries have been removed, if the Sugar Feed system is enabled, new entries will be generated automatically.',
|
||||
'LBL_CONFIRM_DELETE_RECORDS' => 'Are you sure you wish to delete all of the Sugar Feed entries?',
|
||||
'LBL_FLUSH_RECORDS' => 'Delete Feed Entries',
|
||||
'LBL_ENABLE_FEED' => 'Enable Sugar Feed',
|
||||
'LBL_ENABLE_MODULE_LIST' => 'Activate Feeds For',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My Sugar Feed',
|
||||
'LNK_NEW_RECORD' => 'Create Sugar Feed',
|
||||
'LNK_LIST' => 'Sugar Feed',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Search Sugar Feed',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'View History',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
|
||||
'LBL_SUGAR_FEED_SUBPANEL_TITLE' => 'Sugar Feed',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Sugar Feed',
|
||||
'LBL_ALL'=>'All',
|
||||
'LBL_USER_FEED' => 'User Feed',
|
||||
'LBL_ENABLE_USER_FEED' => 'Activate User Feed',
|
||||
'LBL_TO'=>'Send To Team',
|
||||
'LBL_IS'=>'is',
|
||||
'LBL_DONE'=>'Done',
|
||||
'LBL_TITLE'=>'Title',
|
||||
'LBL_ROWS'=>'Rows',
|
||||
'LBL_CATEGORIES'=>'Modules',
|
||||
'LBL_TIME_LAST_WEEK'=>'Last Week',
|
||||
'LBL_TIME_WEEKS' =>'Weeks',
|
||||
'LBL_TIME_DAYS' =>'Days',
|
||||
'LBL_TIME_YESTERDAY'=>'Yesterday',
|
||||
'LBL_TIME_HOURS' =>'Hours',
|
||||
'LBL_TIME_HOUR' =>'Hours',
|
||||
'LBL_TIME_MINUTES' =>'Minutes',
|
||||
'LBL_TIME_MINUTE' =>'Minute',
|
||||
'LBL_TIME_SECONDS' =>'Seconds',
|
||||
'LBL_TIME_SECOND' =>'Second',
|
||||
'LBL_TIME_AGO' =>'ago',
|
||||
|
||||
'CREATED_CONTACT'=>'created a <b>NEW</b> contact',
|
||||
'CREATED_OPPORTUNITY'=>'created a <b>NEW</b> opportunity',
|
||||
'CREATED_CASE'=>'created a <b>NEW</b> case',
|
||||
'CREATED_LEAD'=>'created a <b>NEW</b> lead',
|
||||
'FOR'=>'for',
|
||||
'CLOSED_CASE'=>'<b>CLOSED</b> a case ',
|
||||
'CONVERTED_LEAD'=>'<b>CONVERTED</b> a lead',
|
||||
'WON_OPPORTUNITY'=>'has <b>WON</b> an opportunity',
|
||||
'WITH' => 'with',
|
||||
|
||||
'LBL_LINK_TYPE_Link' => 'Link',
|
||||
'LBL_LINK_TYPE_Image' => 'Image',
|
||||
'LBL_LINK_TYPE_YouTube' => 'YouTube™',
|
||||
|
||||
'LBL_SELECT' => 'Select',
|
||||
'LBL_POST' => 'Post',
|
||||
);
|
||||
?>
|
||||
117
modules/SugarFeed/language/pl_pl.lang.php
Executable file
117
modules/SugarFeed/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_TEAM' => 'Zespół',
|
||||
'LBL_TEAM_ID' => 'ID zespołu',
|
||||
'LBL_ASSIGNED_TO_ID' => 'ID przydzielonego użytkownika',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_DATE_ENTERED' => 'Data utworzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowane przez',
|
||||
'LBL_MODIFIED_ID' => 'ID modyfikującego',
|
||||
'LBL_MODIFIED_NAME' => 'Nazwa modyfikującego',
|
||||
'LBL_CREATED' => 'Utworzone przez',
|
||||
'LBL_CREATED_ID' => 'ID tworzącego',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_DELETED' => 'Usunięto',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_SAVING'=>'Zachowuję...',
|
||||
'LBL_SAVED'=>'Zachowano',
|
||||
'LBL_CREATED_USER' => 'Utworzone przez użytkownika',
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowane przez użytkownika',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista zakładek Sugar',
|
||||
'LBL_MODULE_NAME' => 'Zakładka Sugar',
|
||||
'LBL_MODULE_TITLE' => 'Zakładka Sugar',
|
||||
'LBL_DASHLET_DISABLED' => 'Uwaga: System zakładek Sugar jest wyłączony, nie można dodawać żadnych nowych zakładek, dopóki nie zostanie włączony',
|
||||
'LBL_ADMIN_SETTINGS' => 'Ustawienia zakładek Sugar',
|
||||
'LBL_RECORDS_DELETED' => 'Jeśli system zakładek Sugar zostanie włączony, nowe wpisy zostaną wygenerowane automatycznie, a wszystkie poprzednio wprowadzone zakładki Sugar zostaną usunięte.',
|
||||
'LBL_CONFIRM_DELETE_RECORDS' => 'Czy na pewno chcesz usunąć wszystkie wpisy zakładek Sugar?',
|
||||
'LBL_FLUSH_RECORDS' => 'Usuwam wpisy zakładek',
|
||||
'LBL_ENABLE_FEED' => 'Włącz zakładki Sugar',
|
||||
'LBL_ENABLE_MODULE_LIST' => 'Aktywuj zakładki dla',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Moje zakładki Sugar',
|
||||
'LNK_NEW_RECORD' => 'Utwórz nową zakładke',
|
||||
'LNK_LIST' => 'Zakładka Sugar',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukaj zakładek',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Zobacz historię',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Działania',
|
||||
'LBL_SUGAR_FEED_SUBPANEL_TITLE' => 'Zakładka Sugar',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowa zakładka Sugar',
|
||||
'LBL_ALL'=>'Wszystko',
|
||||
'LBL_USER_FEED' => 'Zakładki użytkownika',
|
||||
'LBL_ENABLE_USER_FEED' => 'Aktywuj zakładki użytkownika',
|
||||
'LBL_TO'=>'Wyślij do',
|
||||
'LBL_IS'=>'jest',
|
||||
'LBL_DONE'=>'Zrobione',
|
||||
'LBL_TITLE'=>'Tytuł',
|
||||
'LBL_ROWS'=>'Wiersze',
|
||||
'LBL_CATEGORIES'=>'Moduły',
|
||||
'LBL_TIME_LAST_WEEK'=>'Miniony tydzień',
|
||||
'LBL_TIME_WEEKS' =>'Tygodnie',
|
||||
'LBL_TIME_DAYS' =>'Dni',
|
||||
'LBL_TIME_YESTERDAY'=>'Wczoraj',
|
||||
'LBL_TIME_HOURS' =>'Godziny',
|
||||
'LBL_TIME_HOUR' =>'Godzina',
|
||||
'LBL_TIME_MINUTES' =>'Minuty',
|
||||
'LBL_TIME_MINUTE' =>'Minuta',
|
||||
'LBL_TIME_SECONDS' =>'Sekundy',
|
||||
'LBL_TIME_SECOND' =>'Sekunda',
|
||||
'LBL_TIME_AGO' =>'od',
|
||||
|
||||
'CREATED_CONTACT'=>'utworzono <b>NOWY</b> kontakt',
|
||||
'CREATED_OPPORTUNITY'=>'utworzono <b>NOWY</b> okazję',
|
||||
'CREATED_CASE'=>'utworzono <b>NOWĄ</b> sprawę',
|
||||
'CREATED_LEAD'=>'utworzono <b>NOWĄ</b> adres',
|
||||
'FOR'=>'dla',
|
||||
'CLOSED_CASE'=>'<b>ZAMKNIĘTA</b> sprawa ',
|
||||
'CONVERTED_LEAD'=>'<b>PRZEKONWERTOWANY</b> adres',
|
||||
'WON_OPPORTUNITY'=>'<b>WYGRANA</b> okazja',
|
||||
'WITH' => 'z',
|
||||
|
||||
'LBL_LINK_TYPE_Link' => 'Link',
|
||||
'LBL_LINK_TYPE_Image' => 'Obrazek',
|
||||
'LBL_LINK_TYPE_YouTube' => 'YouTube™',
|
||||
|
||||
'LBL_SELECT' => 'Wybór',
|
||||
'LBL_POST' => 'Zamieść',
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
75
modules/SugarFeed/linkHandlers/Image.php
Executable file
75
modules/SugarFeed/linkHandlers/Image.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('modules/SugarFeed/linkHandlers/Link.php');
|
||||
|
||||
class FeedLinkHandlerImage extends FeedLinkHandlerLink {
|
||||
function getDisplay(&$data) {
|
||||
$imageData = unserialize(base64_decode($data['LINK_URL']));
|
||||
if ( $imageData['width'] != 0 ) {
|
||||
$image_style = 'width: '.$imageData['width'].'px; height: '.$imageData['height'].'px; border: 0px;';
|
||||
} else {
|
||||
// Unknown width/height
|
||||
// Set it to a max width of 425 px, and include a tweak so that IE 6 can actually handle it.
|
||||
$image_style = 'width: expression(this.scrollWidth > 425 ? \'425px\':\'auto\'); max-width: 425px;';
|
||||
}
|
||||
return '<div style="padding-left:10px"><img src="'. $imageData['url']. '" style="'.$image_style.'"></div>';
|
||||
}
|
||||
|
||||
function handleInput($feed, $link_type, $link_url) {
|
||||
parent::handleInput($feed, $link_type, $link_url);
|
||||
|
||||
// The FeedLinkHandlerLink class will help sort this url out for us
|
||||
$link_url = $feed->link_url;
|
||||
|
||||
$imageData = @getimagesize($link_url);
|
||||
|
||||
if ( ! isset($imageData) ) {
|
||||
// The image didn't pull down properly, could be a link and allow_url_fopen could be disabled
|
||||
$imageData[0] = 0;
|
||||
$imageData[1] = 0;
|
||||
} else {
|
||||
if ( max($imageData[0],$imageData[1]) > 425 ) {
|
||||
// This is a large image, we need to set some specific width/height properties so that the browser can scale it.
|
||||
$scale = 425 / max($imageData[0],$imageData[1]);
|
||||
$imageData[0] = floor($imageData[0]*$scale);
|
||||
$imageData[1] = floor($imageData[1]*$scale);
|
||||
}
|
||||
}
|
||||
|
||||
$feed->link_url = base64_encode(serialize(array('url'=>$link_url,'width'=>$imageData[0],'height'=>$imageData[1])));
|
||||
}
|
||||
}
|
||||
58
modules/SugarFeed/linkHandlers/Link.php
Executable file
58
modules/SugarFeed/linkHandlers/Link.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class FeedLinkHandlerLink {
|
||||
function getDisplay(&$data) {
|
||||
return '<div style="padding-left:10px"><a href="' . $data['LINK_URL'] . '" target="_blank">' .$data['LINK_URL'] .'</a></div>';
|
||||
}
|
||||
|
||||
function handleInput($feed, $link_type, $link_url) {
|
||||
$feed->link_type = $link_type;
|
||||
|
||||
//
|
||||
if ( $link_url{0} != '.' || $link_url{0} != '/' ) {
|
||||
// Automatically add http:// in front of the link_url if it doesn't already have it
|
||||
if ( strncmp($link_url,'http://',7) != 0 && strncmp($link_url,'https://',8) != 0 ) {
|
||||
$link_url = 'http://'.$link_url;
|
||||
}
|
||||
}
|
||||
// Make sure they aren't trying to do something nasty like break out of a quote or something
|
||||
$link_url = str_replace(array('<','>','"',"'"),array('<','>','"','''),$link_url);
|
||||
|
||||
$feed->link_url = $link_url;
|
||||
}
|
||||
}
|
||||
53
modules/SugarFeed/linkHandlers/YouTube.php
Executable file
53
modules/SugarFeed/linkHandlers/YouTube.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('modules/SugarFeed/linkHandlers/Link.php');
|
||||
|
||||
class FeedLinkHandlerYoutube extends FeedLinkHandlerLink {
|
||||
function getDisplay(&$data) {
|
||||
return '<div style="padding-left:10px"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/' . $data['LINK_URL'] . '&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="opaque" /><embed src="http://www.youtube.com/v/' . $data['LINK_URL'] . '&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="false" wmode="opaque" width="425" height="344"></embed></object></div>';
|
||||
}
|
||||
|
||||
function handleInput($feed, $link_type, $link_url) {
|
||||
$match = array();
|
||||
preg_match('/v=([^\&]+)/', $link_url, $match);
|
||||
|
||||
if(!empty($match[1])){
|
||||
$feed->link_type = $link_type;
|
||||
$feed->link_url = $match[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
44
modules/SugarFeed/metadata/SearchFields.php
Executable file
44
modules/SugarFeed/metadata/SearchFields.php
Executable file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$module_name = 'SugarFeed';
|
||||
$searchFields[$module_name] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
);
|
||||
?>
|
||||
52
modules/SugarFeed/metadata/dashletviewdefs.php
Executable file
52
modules/SugarFeed/metadata/dashletviewdefs.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['SugarFeedDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'date_modified' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['SugarFeedDashlet']['columns'] = array( 'name' => array('width' => '40',
|
||||
'label' => '',
|
||||
'link' => false,
|
||||
'sortable'=>false,
|
||||
'default' => true),
|
||||
|
||||
);
|
||||
72
modules/SugarFeed/metadata/detailviewdefs.php
Executable file
72
modules/SugarFeed/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$module_name = 'SugarFeed';
|
||||
$viewdefs[$module_name]['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',
|
||||
)),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
|
||||
'panels' =>array (
|
||||
|
||||
array (
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
63
modules/SugarFeed/metadata/editviewdefs.php
Executable file
63
modules/SugarFeed/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$module_name = 'Sugar_Feed';
|
||||
$viewdefs[$module_name]['EditView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
?>
|
||||
58
modules/SugarFeed/metadata/listviewdefs.php
Executable file
58
modules/SugarFeed/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$module_name = 'SugarFeed';
|
||||
$listViewDefs[$module_name] = array(
|
||||
'NAME' => array(
|
||||
'width' => '32',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'link' => false),
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '32',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'link' => false),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '9',
|
||||
'label' => 'LBL_ASSIGNED_TO_NAME',
|
||||
'default' => true),
|
||||
|
||||
);
|
||||
?>
|
||||
52
modules/SugarFeed/metadata/metafiles.php
Executable file
52
modules/SugarFeed/metadata/metafiles.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on August 2 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'SugarFeed';
|
||||
$metafiles[$module_name] = array(
|
||||
'detailviewdefs' => 'modules/' . $module_name . '/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/' . $module_name . '/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/' . $module_name . '/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/' . $module_name . '/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/' . $module_name . '/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/' . $module_name . '/metadata/SearchFields.php',
|
||||
);
|
||||
?>
|
||||
50
modules/SugarFeed/metadata/popupdefs.php
Executable file
50
modules/SugarFeed/metadata/popupdefs.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$module_name = 'SugarFeed';
|
||||
$_module_name = 'sugarfeed';
|
||||
$popupMeta = array('moduleMain' => $module_name,
|
||||
'varName' => $module_name,
|
||||
'orderBy' => $_module_name.'.name',
|
||||
'whereClauses' =>
|
||||
array('name' => $_module_name . '.name',
|
||||
),
|
||||
'searchInputs'=> array($_module_name. '_number', 'name', 'priority','status'),
|
||||
|
||||
);
|
||||
?>
|
||||
|
||||
|
||||
60
modules/SugarFeed/metadata/searchdefs.php
Executable file
60
modules/SugarFeed/metadata/searchdefs.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'SugarFeed';
|
||||
$searchdefs[$module_name] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'name',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'name',
|
||||
array('name' => 'assigned_user_id', 'label' => 'LBL_ASSIGNED_TO', 'type' => 'enum', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
70
modules/SugarFeed/metadata/subpanels/default.php
Executable file
70
modules/SugarFeed/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$module_name='SugarFeed';
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => $module_name),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '45%',
|
||||
),
|
||||
'date_modified'=>array(
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'width' => '45%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => $module_name,
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => $module_name,
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
132
modules/SugarFeed/vardefs.php
Executable file
132
modules/SugarFeed/vardefs.php
Executable file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.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 Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['SugarFeed'] = array(
|
||||
'table'=>'sugarfeed',
|
||||
'audited'=>false,
|
||||
'fields'=>array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'type' => 'name',
|
||||
'dbType' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 255,
|
||||
'comment' => 'Name of the feed',
|
||||
'unified_search' => true,
|
||||
'audited' => true,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
'description' =>
|
||||
array (
|
||||
'name' => 'description',
|
||||
'type' => 'name',
|
||||
'dbType' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 255,
|
||||
'comment' => 'Name of the feed',
|
||||
'unified_search' => true,
|
||||
'audited' => true,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
|
||||
'related_module' =>
|
||||
array (
|
||||
'name' => 'related_module',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 100,
|
||||
'comment' => 'related module',
|
||||
'unified_search' => true,
|
||||
'audited' => false,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
'related_id' =>
|
||||
array (
|
||||
'name' => 'related_id',
|
||||
'type' => 'id',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 36,
|
||||
'comment' => 'related module',
|
||||
'unified_search' => true,
|
||||
'audited' => false,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
'link_url' =>
|
||||
array (
|
||||
'name' => 'link_url',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 255,
|
||||
'comment' => 'Name of the feed',
|
||||
'unified_search' => true,
|
||||
'audited' => false,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
'link_type' =>
|
||||
array (
|
||||
'name' => 'link_type',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 30,
|
||||
'comment' => 'Name of the feed',
|
||||
'unified_search' => true,
|
||||
'audited' => false,
|
||||
'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
|
||||
//property value is case insensitive.
|
||||
),
|
||||
|
||||
),
|
||||
'relationships'=>array (
|
||||
),
|
||||
|
||||
'indices' => array (
|
||||
array('name' => 'sgrfeed_date',
|
||||
'type'=>'index',
|
||||
'fields'=>array('date_entered',
|
||||
'deleted',
|
||||
)),
|
||||
),
|
||||
|
||||
'optimistic_lock'=>true,
|
||||
);
|
||||
|
||||
VardefManager::createVardef('SugarFeed','SugarFeed', array('basic',
|
||||
'assignable'));
|
||||
Reference in New Issue
Block a user