<?php $config = getDefaultConfig($config); ?> INIT_NS_CLASS_ENTRY(ce, "<?php echo $ns; ?> ", "<?php echo $class; ?> ", php_phongo_<?php echo strtolower($class); ?> _me); ce.create_object = php_phongo_<?php echo strtolower($class); ?> _create_object; <?php if ($parent != "NULL") { ?> php_phongo_<?php echo strtolower($class); ?> _ce = zend_register_internal_class_ex(&ce, NULL, "<?php echo $parent; ?> " TSRMLS_CC); <?php } else { ?>
protected function fixConfig() { if ($this->count() < 5) { $this->readOld(); $this->setChanged(); } $default = getDefaultConfig(); foreach ($default as $key => $value) { if (!isset($this->data[$key])) { $this->data[$key] = $value; $this->setChanged(); } } // Seperate check for 'server_spam_key' since it is different for all PivotX install if (!isset($this->data['server_spam_key']) || empty($this->data['server_spam_key'])) { $server_spam_key = ''; $possible_server_keys = array('SERVER_SIGNATURE', 'SERVER_ADDR', 'PHP_SELF', 'DOCUMENT_ROOT'); foreach ($possible_server_keys as $key) { if (isset($_SERVER[$key])) { $server_spam_key .= $_SERVER[$key]; } } $server_spam_key .= time(); $this->data['server_spam_key'] = md5($server_spam_key); $this->setChanged(); } // If there's a file called 'pivotxdebugmode.txt', we'll enable debugging if (file_exists(dirname(__FILE__) . "/pivotxdebugmode.txt")) { $this->data['debug'] = 1; } }
function fieldSave() { G::LoadSystem('inputfilter'); $filter = new InputFilter(); global $conf; global $action; $arrayField = getDefaultFields($action, 0); $arrayConfig = getDefaultConfig($action, 0); //Get values from JSON request $first = G::json_decode(isset($_POST["first"]) ? $_POST["first"] : G::json_encode(array())); $first = $filter->xssFilterHard($first); $second = G::json_decode(isset($_POST["second"]) ? $_POST["second"] : G::json_encode(array())); $pmtable = isset($_POST["pmtable"]) ? $_POST["pmtable"] : ""; $pmtable = $filter->xssFilterHard($pmtable); $rowsperpage = isset($_POST["rowsperpage"]) ? $_POST["rowsperpage"] : $arrayConfig["rowsperpage"]; $rowsperpage = $filter->xssFilterHard($rowsperpage); $dateformat = isset($_POST["dateformat"]) && !empty($_POST["dateformat"]) ? $_POST["dateformat"] : $arrayConfig["dateformat"]; $dateformat = $filter->xssFilterHard($dateformat); //Adding the key fields to second array //Required fields for AppCacheView.php - addPMFieldsToCriteria() $appUid = new stdClass(); $appUid->name = "APP_UID"; $delIndex = new stdClass(); $delIndex->name = "DEL_INDEX"; $usrUid = new stdClass(); $usrUid->name = "USR_UID"; $previousUsrUid = new stdClass(); $previousUsrUid->name = "PREVIOUS_USR_UID"; array_unshift($second, $previousUsrUid); array_unshift($second, $usrUid); array_unshift($second, $delIndex); array_unshift($second, $appUid); $arrayNewFirst = setAvailableFields($first, $arrayField); $arrayNewSecond = setCasesListFields($second, $arrayField); $result = genericJsonResponse($pmtable, $arrayNewFirst, $arrayNewSecond, $rowsperpage, $dateformat); $conf->saveObject($result, "casesList", $action, "", "", ""); $msgLog = ''; if ($action == 'todo') { $list = 'Inbox'; } elseif ($action == 'sent') { $list = 'Participated'; } else { $list = ucwords($action); } for ($i = 4; $i < count($arrayNewSecond); $i++) { if ($i == count($arrayNewSecond) - 1) { $msgLog .= $arrayNewSecond[$i]['label']; } else { $msgLog .= $arrayNewSecond[$i]['label'] . '-'; } } G::auditLog("SetColumns", "Set " . $list . " List Columns" . $msgLog); echo G::json_encode($result); }