| [ Index ] |
PHP Cross Reference of PivotX trunk SVN |
[Source view] [Print]
(no description)
| File Size: | 3794 lines (110 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 2 files pivotx/modules/pages_sql.php pivotx/modules/pages_flat.php |
BaseConfig:: (12 methods):
__construct()
setUpgraded()
setChanged()
loadConfig()
verifyConfig()
fixConfig()
organizeConfig()
initConfig()
saveConfig()
count()
print_r()
save()
Config:: (9 methods):
__construct()
Config()
verifyConfig()
fixConfig()
readOld()
getConfigArray()
set()
del()
get()
Users:: (20 methods):
__construct()
Users()
verifyConfig()
fixConfig()
organizeConfig()
readOld()
addUser()
deleteUser()
updateUser()
checkPassword()
hashPassword()
isUser()
getUser()
getUserByNickname()
getUsernames()
getUserNicknames()
getUserEmail()
getUsers()
allowEdit()
sort()
Weblogs:: (27 methods):
__construct()
Weblogs()
verifyConfig()
fixConfig()
initConfig()
organizeConfig()
readOld()
sort()
getWeblogs()
getWeblogNames()
isWeblog()
getWeblogsWithCat()
getCategories()
getWeblog()
getSubweblog()
getSubweblogs()
setCurrent()
setCurrentFromCategory()
getCurrent()
getDefault()
add()
delete()
export()
set()
get()
_getLink()
deleteCategoryFromWeblogs()
Categories:: (18 methods):
__construct()
Categories()
verifyConfig()
fixConfig()
organizeConfig()
sort()
saveCategories()
readOld()
setCategory()
getCategories()
allowedCategories()
allowUser()
disallowUser()
getCategory()
getCategorynames()
isCategory()
getSearchCategorynames()
deleteCategory()
Session:: (20 methods):
Session()
setCookie()
isLoggedIn()
login()
logFailedLogin()
checkFailedLogins()
logout()
getMessage()
currentUser()
setUser()
currentUsername()
minLevel()
checkCSRF()
getCSRF()
savePermsessions()
loadPermsessions()
saveLogins()
loadLogins()
setValue()
getValue()
Pages:: (16 methods):
Pages()
getIndex()
getChapter()
addChapter()
delChapter()
updateChapter()
saveIndex()
getPage()
getPageInAllLanguages()
getPageByUri()
getCurrentPage()
getLatestPages()
delPage()
savePage()
chapSort()
checkTimedPublish()
Paging:: (4 methods):
Paging()
sanity_check()
setup()
doit()
Simplecache:: (7 methods):
SimpleCache()
set()
setMultiple()
get()
trim()
stats()
clear()
Minify:: (7 methods):
Minify()
minifyURLS()
_getHead()
_getScripts()
_minifyScriptURLs()
_getStylesheets()
_minifyStylesheetURLs()
Class: BaseConfig - X-Ref
Base Configuration Class| __construct($filename, $db_path = false) X-Ref |
| Constructor param: filename configuration filename param: db_path path to pivotx db directory, when false we assume config has been loaded |
| setUpgraded($upgraded=true) X-Ref |
| Set upgraded |
| setChanged($changed=true) X-Ref |
| Set changed flag |
| loadConfig() X-Ref |
| Load and verify config |
| verifyConfig() X-Ref |
| Verify configuration (this should be overwritten in subclass) return: boolean true if configuration is ok |
| fixConfig() X-Ref |
| Fix configuration (this should be overwritten in subclass) This is called when verifyConfig() fails. |
| organizeConfig() X-Ref |
| Organize configuration param: boolean true, if configuration can be saved |
| initConfig() X-Ref |
| Initialise configuration after has been read, fixed and organized. |
| saveConfig($force_changed=false) X-Ref |
| Save configuration if 'safe' to do so |
| count() X-Ref |
| Return configuration-array size |
| print_r() X-Ref |
| Print a comprehensible representation of the users |
| save() X-Ref |
| Old save version This function force a save anyway. |
| __construct($sites_path = '') X-Ref |
| No description |
| Config($sites_path = '') X-Ref |
| No description |
| verifyConfig() X-Ref |
| No description |
| fixConfig() X-Ref |
| No description |
| readOld() X-Ref |
| If the config file is missing, we check if there's a pivot 1.x config file that we can use. This function does some comversions to get it up to date, and sets it in $this->data |
| getConfigArray() X-Ref |
| Return the entire config as a big array.. It's probable better to use $PIVOTX['config']->get() if you only need one or few items. return: array |
| set($key, $value) X-Ref |
| Sets a configuration value, and then saves it. param: string $key param: unknown_type $value |
| del($key) X-Ref |
| Delete a configuration value. Use with extreme caution. Saves the configuration afterwards param: string $key |
| get($key) X-Ref |
| Gets a single value from the configuration. param: string $key return: string |
| __construct() X-Ref |
| No description |
| Users() X-Ref |
| No description |
| verifyConfig() X-Ref |
| No description |
| fixConfig() X-Ref |
| No description |
| organizeConfig() X-Ref |
| No description |
| readOld() X-Ref |
| No description |
| addUser($user) X-Ref |
| Add a user to Pivot param: array $user |
| deleteUser($username) X-Ref |
| No description |
| updateUser($username, $properties) X-Ref |
| Update a given property of a user param: string $username param: array $properties |
| checkPassword($username, $password) X-Ref |
| Check if a given password matches the one stored. param: string $username param: string $password return: boolean |
| hashPassword($user, $password) X-Ref |
| Hash a given password (for a given user). param: array $user param: string $password return: boolean |
| isUser($username) X-Ref |
| Check if a given $username is a user. param: string $name return: boolean |
| getUser($username) X-Ref |
| Get the specifics for a given user by its username. param: string $username return: array |
| getUserByNickname($username) X-Ref |
| Get the specifics for a given user by its nickname. param: string $username return: array |
| getUsernames() X-Ref |
| Get a list of the Usernames return: array |
| getUserNicknames() X-Ref |
| Get a list of the Users Nicknames return: array |
| getUserEmail() X-Ref |
| Get a list of the Users Email adresses return: array |
| getUsers() X-Ref |
| Get all users as an array return: array |
| allowEdit($contenttype, $contentowner="", $currentuser="") X-Ref |
| Determines if $currentuser (or 'the current user', if left empty) is allowed to edit a page or entry that's owned by $contentowner. param: string $contentowner param: string $currentuser return: boolean |
| sort($a, $b) X-Ref |
| Sort the users based on string comparison of username. param: array $a param: array $b return: int |
| __construct() X-Ref |
| No description |
| Weblogs() X-Ref |
| No description |
| verifyConfig() X-Ref |
| No description |
| fixConfig() X-Ref |
| No description |
| initConfig() X-Ref |
| No description |
| organizeConfig() X-Ref |
| No description |
| readOld() X-Ref |
| Read old weblogs data.. |
| sort($a, $b) X-Ref |
| Sort the weblogs based on string comparison of name. param: array $a param: array $b return: int |
| getWeblogs() X-Ref |
| Return all weblogs as an array return: array |
| getWeblogNames() X-Ref |
| Returns an array with the weblog names. return: array |
| isWeblog($weblogname) X-Ref |
| Check if a given $name is a weblog. param: string $name return: boolean |
| getWeblogsWithCat($categories) X-Ref |
| Return the weblogs that have the given category or categories assigned to them. param: array $categories |
| getCategories($weblogname='') X-Ref |
| Get the categories from a certain weblog. param: string $weblogname return: array |
| getWeblog($weblogname='') X-Ref |
| Returns the given weblog as an array. If no weblogname was given, use the current weblog. param: string $weblogname return: array |
| getSubweblog($weblogname='', $subweblogname) X-Ref |
| Return a subweblog as an array param: string $weblogname return: array |
| getSubweblogs($weblogname='') X-Ref |
| Return the subweblogs of a given weblog as an array. It does this by grabbing all [[weblog]] and [[ subweblog ]] tags from the templates in the same folder as the template that was selected as the frontpage template. Updates the subweblog info in the weblogs object. param: string $weblogname return: array |
| setCurrent($weblogname='') X-Ref |
| Sets a given weblog as 'current' and returns false if the weblog doesn't exist. param: string $weblogname return: boolean |
| setCurrentFromCategory($categories) X-Ref |
| Sets a given weblog as 'current' based on a given category and returns false if no matching weblog could be set. param: mixed $categories return: boolean |
| getCurrent() X-Ref |
| Gets the currently active weblog. return: |
| getDefault() X-Ref |
| Gets the default weblog. return: |
| add($internal, $name, $theme) X-Ref |
| Add a new weblog, based on $theme. returns the internal name used for the weblog. param: string $internal param: string $name param: string $theme return: string |
| delete($weblogname) X-Ref |
| Delete a weblog param: string $weblogname |
| export($weblogname) X-Ref |
| Export a weblog as a theme file. The file is saved in the same folder as the weblog's frontpage template. param: string $weblogname |
| set($weblogname, $key, $value) X-Ref |
| Sets a property of a given weblog param: string $weblogname param: string $key param: string $value |
| get($weblogname, $key) X-Ref |
| Gets a property of a given weblog param: string $weblogname param: string $key |
| _getLink($weblogname, $value) X-Ref |
| Calculates the link for a given weblog param: string $value param: string $weblogname |
| deleteCategoryFromWeblogs($name) X-Ref |
| No description |
Class: Categories - X-Ref
This class deals with the categories| __construct() X-Ref |
| No description |
| Categories() X-Ref |
| No description |
| verifyConfig() X-Ref |
| No description |
| fixConfig() X-Ref |
| No description |
| organizeConfig() X-Ref |
| No description |
| sort($a, $b) X-Ref |
| Sort the categories based on the order and string comparison of display name if order is identical. param: array $a param: array $b return: int |
| saveCategories() X-Ref |
| Old save function |
| readOld() X-Ref |
| No description |
| setCategory($name, $cat) X-Ref |
| change the settings for an existing category, or modify an existing one. param: string $name param: array $cat |
| getCategories() X-Ref |
| Get an array with all the categories. We filter the users to make sure we only return users that still exist return: array |
| allowedCategories($username) X-Ref |
| Get a list of categories the user is allowed to post into |
| allowUser($catname, $username) X-Ref |
| Allow a user to post in this category param: string $catname param: string $username |
| disallowUser($catname, $username) X-Ref |
| Disallow a user to post in this category param: string $catname param: string $username |
| getCategory($name) X-Ref |
| Get a single category param: string $name return: array |
| getCategorynames() X-Ref |
| Get a list of all category names return: array |
| isCategory($name) X-Ref |
| Check if a given $name is a category. param: string $name return: boolean |
| getSearchCategorynames() X-Ref |
| Get a list of all category names in which we should NOT search return: array |
| deleteCategory($name) X-Ref |
| Delete a single category param: string $name |
| Session() X-Ref |
| Initialisation return: Session |
| setCookie($name, $value, $time='') X-Ref |
| Sets a cookie taking into account the path, domain, secure connection and if "HTTP only" is supported. Basically a wrapper around setcookie. param: string $name param: string $value param: string $time |
| isLoggedIn() X-Ref |
| Verify if whomever requested the current page is logged in as a user, or else attempt to (transparently) continue from a saved session. return: boolean |
| login($username, $password, $stay) X-Ref |
| Attempt to log in a user, using the passed credentials. If succesfull, the session info is updated and 'true' is returned. When unsuccesful the session remains unaltered, and false is returned param: string $username param: string $password param: int $stay return: boolean |
| logFailedLogin() X-Ref |
| Logs failed login attempts so PivotX can block brute force attacks. |
| checkFailedLogins() X-Ref |
| Checks failed login attempts so PivotX can block brute force attacks. |
| logout() X-Ref |
| Log out a user: clear the session, and delete the cookie |
| getMessage() X-Ref |
| Returns the latest/current message. return: array |
| currentUser() X-Ref |
| Returns the current user. return: array |
| setUser($user) X-Ref |
| Sets the specifics for the current user.. param: array $user |
| currentUsername() X-Ref |
| Returns the username of the current user. return: array |
| minLevel($level) X-Ref |
| Checks if the currently logged in user has at least the required level to view the page he/she is trying to access. If not, the user is logged out of the system. param: int $level |
| checkCSRF($value) X-Ref |
| Checks if the current request is accompanied by the correct CSRF check. If not, the user is logged out of the system. param: int $value |
| getCSRF() X-Ref |
| Get the key to use in the CSRF checks. |
| savePermsessions() X-Ref |
| Save permanent sessions to the filesystem, for users that check 'keep me logged in'. The sessions are saved in db/ser_sessions.php, and they look somewhat like Array ( [8nkvr62i3s37] => Array ( [username] => admin [ip] => 127.0.0.1 [lastseen] => 1168177821 ) ) |
| loadPermsessions() X-Ref |
| Load the permanent sessions from the filesystem. |
| saveLogins() X-Ref |
| Save login attempts from the filesystem. |
| loadLogins() X-Ref |
| Load stored login attempts from the filesystem. |
| setValue($key, $value=false) X-Ref |
| Sets a session value, and then saves it. param: string $key param: unknown_type $value |
| getValue($key) X-Ref |
| Gets a single session value param: string $key return: string |
| Pages() X-Ref |
| Initialisation return: Pages |
| getIndex($excerpts=false, $links=false) X-Ref |
| Get the index of the available chapters and pages. return: array |
| getChapter($id) X-Ref |
| Get the information for a specific Chapter param: integer $id return: array |
| addChapter($chapter) X-Ref |
| Add a chapter, and save the index param: array $chapter |
| delChapter($uid) X-Ref |
| Delete a chapter, and save the index param: integer $uid |
| updateChapter($uid,$chapter) X-Ref |
| Update the information for a chapter, and save the index param: integer $uid param: array $chapter |
| saveIndex($reindex=true) X-Ref |
| Save the index to the DB, using the selected model. param: boolean $reindex |
| getPage($uid, $language=false) X-Ref |
| Get a single page param: integer $uid return: array |
| getPageInAllLanguages($uid) X-Ref |
| Get a single page in all languages param: integer $uid return: array |
| getPageByUri($uri,$language=false) X-Ref |
| Get a single page, as defined by its URI param: string $uri return: array |
| getCurrentPage() X-Ref |
| Gets the current page |
| getLatestPages($amount, $filter_user="") X-Ref |
| Gets the $amount latest pages as an array, suitable for displaying an overview param: integer $amount |
| delPage($uid) X-Ref |
| Delete a single page param: integer $uid |
| savePage($page) X-Ref |
| Save a single page. Returns the uid of the inserted page. param: array $page return: integer. |
| chapSort($a, $b) X-Ref |
| Sort the chapters based on the order and string comparison of chapter name if order is identical. param: array $a param: array $b return: int |
| checkTimedPublish() X-Ref |
| Checks if any pages set to 'timed publish' should be published. |
Class: Simplecache - X-Ref
A Class that provides for very simple, in-memory caching.| SimpleCache() X-Ref |
| No description |
| set($type="general", $key, $value) X-Ref |
| Set a single item in the cache param: string $type param: string $key param: mixed $value return: bool |
| setMultiple($type="general", $values) X-Ref |
| Set multiple items in the cache param: string $type param: array $values return: bool |
| get($type="general", $key) X-Ref |
| Get a single item from the cache. Returns the value on success, or false when it's a miss. So, storing booleans in the cache isn't very convenient. param: string $type param: string $key return: mixed |
| trim() X-Ref |
| Trims the cache, if it's getting too large. |
| stats() X-Ref |
| Return some basic statistics for the cache.. return: array |
| clear() X-Ref |
| No description |
| Minify($html) X-Ref |
| No description |
| minifyURLS() X-Ref |
| No description |
| _getHead() X-Ref |
| Get the head section. |
| _getScripts() X-Ref |
| Get the scripts from the head section. |
| _minifyScriptURLs() X-Ref |
| convert the found js files into one minify-link.. |
| _getStylesheets() X-Ref |
| Get the stylesheets from the entire document. |
| _minifyStylesheetURLs() X-Ref |
| convert the found css files into one minify-link.. |
| Generated: Tue May 22 01:08:46 2012 | Cross-referenced by PHPXref 0.6 |