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
| this.parseUnits = function() { | |
| if(this.jsonResultsReady === false) return; | |
| if(this.currentResult && this.nResults) | |
| if(this.currentResult >= this.nResults) return; | |
| //for pager: | |
| var showStart = this.currentResult + 1, | |
| showEnd = this.currentResult + itemsPerResponse; | |
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
| /** | |
| * Returns back true/false for a given permission or the raw value if not 1/0 bool | |
| * @param string $name | |
| * @return mixed | |
| */ | |
| public function getPermission($name) { | |
| $companyId = $this->getId(); | |
| $planId = $this->getPlan()->getId(); | |
| $con = Propel::getConnection(); |
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
| SELECT ( | |
| ( | |
| SELECT cp.value | |
| FROM company_permission cp | |
| LEFT JOIN default_permission dp | |
| ON cp.default_permission_id = dp.id | |
| WHERE cp.company_id = :companyId | |
| AND dp.name = :permissionName | |
| AND cp.value IS NOT NULL | |
| ) |
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
| /** | |
| * Returns back true/false for a given permission or the raw value if not 1/0 bool | |
| * @param string $name | |
| * @return mixed | |
| */ | |
| public function getPermission($name) { | |
| $companyId = $this->getId(); | |
| $planId = $this->getPlan()->getId(); | |
| $con = Propel::getConnection(); |
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
| /** | |
| * Returns back the value for the setting name passed | |
| * @param string $name | |
| * @return mixed | |
| */ | |
| public function getSetting($name) { | |
| $companyId = $this->getId(); | |
| $planId = $this->getPlanId(); | |
| $con = Propel::getConnection(); |
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
| /** | |
| * Builds the SELECT part of a SQL statement based on a Criteria | |
| * taking into account select columns and 'as' columns (i.e. columns aliases) | |
| * Move from BasePeer to DBAdapter and turn from static to non static | |
| * | |
| * @param Criteria $criteria | |
| * @param array $fromClause | |
| * @param boolean $aliasAll | |
| * | |
| * @return string |
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
| ################## | |
| # Function: is_faq | |
| # Inputs: | |
| # page - optional english file name | |
| # Returns: boolean | |
| # Note: | |
| # This function returns true if the current page or the page argument is a faq page | |
| # false otherwise | |
| private function is_faq($page = FALSE){ | |
| # return early if we know we are on a faq page |
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
| /** | |
| * Global function for returning back an array from a function with possible error string | |
| * @param string $error | |
| * @return array | |
| */ | |
| function returnError($error = "Error performing this operation") { | |
| return array("success" => false, "error" => $error); | |
| } | |
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
| /** | |
| * Convert date/time to user's timezone | |
| * | |
| * @access public | |
| * @param mixed $dateTime | |
| * @param string $format | |
| * @return string | |
| */ | |
| public function toUserTimezone($dateTime, $format) { | |
| //validate date/time value |
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
| [xdebug] | |
| zend_extension="/usr/local/Cellar/php54-xdebug/2.2.1/xdebug.so" | |
| xdebug.idekey = "macgdbp" | |
| xdebug.remote_enable = 0 | |
| ;xdebug.file_link_format="txmt://open?url=file://%f&line=%1" | |
| ;xdebug.remote_autostart = 1 | |
| xdebug.remote_handler = "dbgp" | |
| xdebug.remote_host = "127.0.0.1" | |
| xdebug.cli_color = 1 |