@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | { |
| 4 | 4 | function renderHtml() |
| 5 | 5 | { |
| 6 | - return get_class($this) . ' has intentionally been left blank'; |
|
| 6 | + return get_class($this).' has intentionally been left blank'; |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | function getPrivateKey() |
@@ -23,17 +23,17 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | function getContactClient() |
| 25 | 25 | { |
| 26 | - return new IntrafacePublic_Contact_XMLRPC_Client($this->getCredentials(), false, INTRAFACE_XMLPRC_SERVER_PATH . "contact/server.php"); |
|
| 26 | + return new IntrafacePublic_Contact_XMLRPC_Client($this->getCredentials(), false, INTRAFACE_XMLPRC_SERVER_PATH."contact/server.php"); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | function getNewsletterClient() |
| 30 | 30 | { |
| 31 | - return new IntrafacePublic_Newsletter_XMLRPC_Client($this->getCredentials(), false, INTRAFACE_XMLPRC_SERVER_PATH . "newsletter/server.php"); |
|
| 31 | + return new IntrafacePublic_Newsletter_XMLRPC_Client($this->getCredentials(), false, INTRAFACE_XMLPRC_SERVER_PATH."newsletter/server.php"); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | function getDebtorClient() |
| 35 | 35 | { |
| 36 | - return new IntrafacePublic_Debtor_XMLRPC_Client($this->getCredentials(), true, INTRAFACE_XMLPRC_SERVER_PATH . "debtor/server.php"); |
|
| 36 | + return new IntrafacePublic_Debtor_XMLRPC_Client($this->getCredentials(), true, INTRAFACE_XMLPRC_SERVER_PATH."debtor/server.php"); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | function execute() |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $this->getCredentials(), |
| 44 | 44 | $list_id, |
| 45 | 45 | $debug, |
| 46 | - INTRAFACE_XMLPRC_SERVER_PATH . "newsletter/server0101.php", |
|
| 46 | + INTRAFACE_XMLPRC_SERVER_PATH."newsletter/server0101.php", |
|
| 47 | 47 | 'utf-8'); // , 'iso-8859-1', 'xmlrpcext' |
| 48 | 48 | return $client; |
| 49 | 49 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | private function getCredentials() |
| 42 | 42 | { |
| 43 | 43 | return array("private_key" => $this->context->getPrivateKey(), |
| 44 | - "session_id" => md5($this->session()->sessionId())); |
|
| 44 | + "session_id" => md5($this->session()->sessionId())); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | private function intranetHasOnlinePaymentAccess() |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | { |
| 4 | 4 | function renderHtml() |
| 5 | 5 | { |
| 6 | - return get_class($this) . ' has intentionally been left blank'; |
|
| 6 | + return get_class($this).' has intentionally been left blank'; |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | function getPrivateKey() |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | private function getCredentials() |
| 42 | 42 | { |
| 43 | 43 | return array("private_key" => $this->context->getPrivateKey(), |
| 44 | - "session_id" => md5($this->session()->sessionId())); |
|
| 44 | + "session_id" => md5($this->session()->sessionId())); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | private function intranetHasOnlinePaymentAccess() |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->getCredentials(), |
| 61 | 61 | $shop_id, |
| 62 | 62 | $debug, |
| 63 | - INTRAFACE_XMLPRC_SERVER_PATH . "shop/server0100.php", |
|
| 63 | + INTRAFACE_XMLPRC_SERVER_PATH."shop/server0100.php", |
|
| 64 | 64 | 'utf-8'); // 'iso-8859-1', 'xmlrpcext' |
| 65 | 65 | return new IntrafacePublic_Shop($client, $this->cache); |
| 66 | 66 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | new IntrafacePublic_OnlinePayment_Client_XMLRPC( |
| 74 | 74 | $this->getCredentials(), |
| 75 | 75 | $debug, |
| 76 | - INTRAFACE_XMLPRC_SERVER_PATH . "onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext' |
|
| 76 | + INTRAFACE_XMLPRC_SERVER_PATH."onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext' |
|
| 77 | 77 | 'utf-8' |
| 78 | 78 | ), |
| 79 | 79 | $this->cache |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | function renderHtml() |
| 12 | 12 | { |
| 13 | - return get_class($this) . ' intentionally left blank'; |
|
| 13 | + return get_class($this).' intentionally left blank'; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | function getPrivateKey() |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | $HTTP_RAW_POST_DATA = file_get_contents('php://input'); |
| 33 | 33 | |
| 34 | 34 | k() |
| 35 | - ->setIdentityLoader(new MyIdentityLoader()) |
|
| 36 | - // Use container for wiring of components |
|
| 37 | - ->setComponentCreator(new k_InjectorAdapter(new bucket_Container(new Intraface_Factory))) |
|
| 38 | - // Enable file logging |
|
| 39 | - //->setLog(dirname(__FILE__) . '/../log/debug.log') |
|
| 40 | - // Uncomment the next line to enable in-browser debugging |
|
| 41 | - //->setDebug() |
|
| 42 | - // Dispatch request |
|
| 43 | - ->run('Intraface_XMLRPC_Controller') |
|
| 44 | - ->out(); |
|
| 35 | + ->setIdentityLoader(new MyIdentityLoader()) |
|
| 36 | + // Use container for wiring of components |
|
| 37 | + ->setComponentCreator(new k_InjectorAdapter(new bucket_Container(new Intraface_Factory))) |
|
| 38 | + // Enable file logging |
|
| 39 | + //->setLog(dirname(__FILE__) . '/../log/debug.log') |
|
| 40 | + // Uncomment the next line to enable in-browser debugging |
|
| 41 | + //->setDebug() |
|
| 42 | + // Dispatch request |
|
| 43 | + ->run('Intraface_XMLRPC_Controller') |
|
| 44 | + ->out(); |
|
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -require_once dirname(__FILE__) . '/../../common.php'; |
|
| 2 | +require_once dirname(__FILE__).'/../../common.php'; |
|
| 3 | 3 | require_once 'konstrukt/konstrukt.inc.php'; |
| 4 | 4 | require_once 'Ilib/ClassLoader.php'; |
| 5 | 5 | require_once 'konstrukt/konstrukt.inc.php'; |
@@ -310,7 +310,7 @@ |
||
| 310 | 310 | * Translates a string. |
| 311 | 311 | */ |
| 312 | 312 | function __($str) { |
| 313 | - return $GLOBALS['k_current_context']->translator()->translate($str); |
|
| 313 | + return $GLOBALS['k_current_context']->translator()->translate($str); |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | if (realpath($_SERVER['SCRIPT_FILENAME']) == __FILE__) { |
@@ -285,7 +285,9 @@ |
||
| 285 | 285 | public $options; |
| 286 | 286 | function options() |
| 287 | 287 | { |
| 288 | - if (empty($this->options)) return array(); |
|
| 288 | + if (empty($this->options)) { |
|
| 289 | + return array(); |
|
| 290 | + } |
|
| 289 | 291 | return $this->options; |
| 290 | 292 | } |
| 291 | 293 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -$config_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . '/../config.local.php'; |
|
| 2 | +$config_file = dirname(__FILE__).DIRECTORY_SEPARATOR.'/../config.local.php'; |
|
| 3 | 3 | |
| 4 | 4 | if (!file_exists($config_file)) { |
| 5 | 5 | die('The config.local.php file is missing. Please create it.'); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | set_error_handler('intraface_exceptions_error_handler', error_reporting()); |
| 19 | 19 | |
| 20 | -require_once dirname(__FILE__) . '/../../../vendor/autoload.php'; |
|
| 20 | +require_once dirname(__FILE__).'/../../../vendor/autoload.php'; |
|
| 21 | 21 | require_once 'Intraface/common.php'; |
| 22 | 22 | spl_autoload_register('k_autoload'); |
| 23 | 23 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $res = $translation2->setLang($lang); |
| 131 | 131 | |
| 132 | 132 | if (PEAR::isError($res)) { |
| 133 | - throw new Exception('Could not setLang():' . $res->getMessage()); |
|
| 133 | + throw new Exception('Could not setLang():'.$res->getMessage()); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | $this->page = $translation2->getPage('common'); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | { |
| 221 | 221 | function create($filename) |
| 222 | 222 | { |
| 223 | - $filename = $filename . '.tpl.php'; |
|
| 223 | + $filename = $filename.'.tpl.php'; |
|
| 224 | 224 | $__template_filename__ = k_search_include_path($filename); |
| 225 | 225 | if (!is_file($__template_filename__)) { |
| 226 | 226 | throw new Exception("Failed opening '".$filename."' for inclusion. (include_path=".ini_get('include_path').")"); |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | /** |
| 3 | 3 | * Set environment for the crontabs |
| 4 | 4 | */ |
| 5 | -$config_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.local.php'; |
|
| 5 | +$config_file = dirname(__FILE__).DIRECTORY_SEPARATOR.'config.local.php'; |
|
| 6 | 6 | if (!file_exists($config_file)) { |
| 7 | 7 | die('The config.local.php file is missing. Please create it.'); |
| 8 | 8 | } |
@@ -17,29 +17,29 @@ |
||
| 17 | 17 | |
| 18 | 18 | while ($row = $result->fetchRow()) { |
| 19 | 19 | |
| 20 | - $auth_adapter = new Intraface_Auth_PublicKeyLogin(MDB2::singleton(DB_DSN), md5(session_id()), $row['public_key']); |
|
| 21 | - $weblogin = $auth_adapter->auth(); |
|
| 20 | + $auth_adapter = new Intraface_Auth_PublicKeyLogin(MDB2::singleton(DB_DSN), md5(session_id()), $row['public_key']); |
|
| 21 | + $weblogin = $auth_adapter->auth(); |
|
| 22 | 22 | |
| 23 | - if (!$weblogin) { |
|
| 24 | - throw new Exception('Access to the intranet denied. The private key is probably wrong.'); |
|
| 25 | - } |
|
| 23 | + if (!$weblogin) { |
|
| 24 | + throw new Exception('Access to the intranet denied. The private key is probably wrong.'); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | 27 | $kernel = new Intraface_Kernel(); |
| 28 | 28 | $kernel->intranet = new Intraface_Intranet($weblogin->getActiveIntranetId()); |
| 29 | 29 | $kernel->setting = new Intraface_Setting($kernel->intranet->get('id')); |
| 30 | 30 | |
| 31 | - if (!$kernel->intranet->hasModuleAccess('order')) { |
|
| 32 | - continue; |
|
| 33 | - } |
|
| 31 | + if (!$kernel->intranet->hasModuleAccess('order')) { |
|
| 32 | + continue; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - $gateway = new Intraface_modules_order_OrderGateway($kernel); |
|
| 36 | - if ($number = $gateway->anyNew()) { |
|
| 37 | - //echo $kernel->intranet->get('name') . ' has ' . $number . ' new orders'; |
|
| 35 | + $gateway = new Intraface_modules_order_OrderGateway($kernel); |
|
| 36 | + if ($number = $gateway->anyNew()) { |
|
| 37 | + //echo $kernel->intranet->get('name') . ' has ' . $number . ' new orders'; |
|
| 38 | 38 | |
| 39 | - // @hack |
|
| 40 | - if ($kernel->intranet->get('name') == 'Discimport.dk') { |
|
| 41 | - mail('[email protected]', $number . ' new orders', 'Do not come back complaining I did not warn you about new orders in Intraface.dk.'); |
|
| 42 | - } |
|
| 43 | - } |
|
| 39 | + // @hack |
|
| 40 | + if ($kernel->intranet->get('name') == 'Discimport.dk') { |
|
| 41 | + mail('[email protected]', $number . ' new orders', 'Do not come back complaining I did not warn you about new orders in Intraface.dk.'); |
|
| 42 | + } |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | 45 | } |
| 46 | 46 | \ No newline at end of file |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | // @hack |
| 40 | 40 | if ($kernel->intranet->get('name') == 'Discimport.dk') { |
| 41 | - mail('[email protected]', $number . ' new orders', 'Do not come back complaining I did not warn you about new orders in Intraface.dk.'); |
|
| 41 | + mail('[email protected]', $number.' new orders', 'Do not come back complaining I did not warn you about new orders in Intraface.dk.'); |
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |