Created
May 4, 2013 00:35
-
-
Save oojacoboo/5515411 to your computer and use it in GitHub Desktop.
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 | |
| # and no argument provide | |
| if(!$page && $this->is_faq) return TRUE; | |
| # set page based on func arg or file name | |
| $page = ($page) ? $page: $this->english_file_name; | |
| $q = "SELECT 1 FROM $this->content_faq WHERE url = '$page' LIMIT 1"; | |
| $result = $this->db->execute($q); | |
| return ($result && mysql_num_rows($result)); | |
| }// is_faq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment