This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('include/MVC/View/views/view.list.php'); | |
class CustomAccountsViewList extends ViewList | |
{ | |
/** | |
* @see ViewList::preDisplay() | |
*/ | |
public function preDisplay() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CustomAccountsController extends SugarController | |
{ | |
public function action_displaypassedids() { | |
if ( !empty($_REQUEST['uid']) ) { | |
$recordIds = explode(',',$_REQUEST['uid']); | |
foreach ( $recordIds as $recordId ) { | |
$bean = SugarModule::get($_REQUEST['module'])->loadBean(); | |
$bean->retrieve($recordId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
function usage() | |
{ | |
print("usage: -i /path/to/instance -p /path/to/expanded/module -z /path/to/zipfile\n"); | |
exit(1); | |
} | |
$opts = getopt('i:p:z:'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
function usage() | |
{ | |
print("usage: -i /path/to/instance -p /path/to/expanded/module -z /path/to/zipfile\n"); | |
exit(1); | |
} | |
$opts = getopt('i:p:z:'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sugar_config_si = array( | |
'setup_db_host_name' => 'localhost', | |
'setup_db_sugarsales_user' => 'sugarcrm', //comment to use existing user | |
'setup_db_sugarsales_password' => 'DB_USER_PASSWORD', //comment to use existing user | |
'setup_db_database_name' => 'sugarcrm', | |
'setup_db_type' => 'mysql', | |
'setup_db_pop_demo_data' => false, | |
// create the database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//custom/modules/Cases/OpportunitiesForCaseLink.php | |
class OpportunitiesForCaseLink extends Link2 { | |
protected $db; | |
public function __construct($linkName, $bean, $linkDef = false) | |
{ | |
$this->focus = $bean; | |
$this->name = $linkName; | |
$this->db = DBManagerFactory::getInstance(); | |
if (empty($linkDef)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Creates an alert pop-up with the message 'Foo' */ | |
YAHOO.SUGAR.MessageBox.show({msg: 'Foo'} ); | |
/* Creates an alert pop-up with the message 'Foo' and title 'Bar' */ | |
YAHOO.SUGAR.MessageBox.show({msg: 'Foo', title: 'Bar'} ); | |
/* Creates a confirm pop-up with the message 'Foo' and title 'Bar' that does a particular action on callback based upon the button clicked */ | |
YAHOO.SUGAR.MessageBox.show({msg: 'Foo', title: 'Bar', type: 'confirm', | |
fn: function(confirm) { | |
if (confirm == 'yes') { | |
//do something if 'Yes' was clicked | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* PHP: Recursively Backup Files & Folders to ZIP-File | |
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
* contribution: Drew Toddsby | |
* contribution: sukum, http://stackoverflow.com/questions/15369291/how-to-ignore-directories-using-recursiveiteratoriterator | |
*/ | |
// Make sure the script can handle large folders/files | |
ini_set('max_execution_time', 600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My documentation: | |
# | |
# Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3 | |
# | |
# We have Interfaces, Members, Policyes y Rules: | |
# | |
# Interfaces: Allows to identify the wan interface, we just need to have it enabled` | |
# the others parameters are only to track if the interface it is up or down. | |
# | |
# Members: Can be defined in some metric and weight, both values will be important ambos when used in policyes. |
OlderNewer