Overview

Packages

  • admin
  • classes
    • media
  • CodeIgniter
    • Libraries
  • core
  • functions
  • JSMin
  • None
  • OpenID
  • PHP
  • PHPMailer
  • plugins
    • admin
    • development
    • feed
    • mail
    • media
    • misc
    • seo
    • spam
    • uploader
    • users
    • zenpage
    • zenphoto
      • news
  • Services
    • JSON

Classes

  • _zp_captcha
  • _zp_HTML_cache
  • admin_approval
  • Album
  • AlbumBase
  • AlbumZip
  • AMFReader
  • AMFStream
  • AnyFile
  • AnyFile_Options
  • Auth_OpenID
  • Auth_OpenID_AlreadySigned
  • Auth_OpenID_AssociateRequest
  • Auth_OpenID_Association
  • Auth_OpenID_AuthRequest
  • Auth_OpenID_AX
  • Auth_OpenID_AX_AttrInfo
  • Auth_OpenID_AX_Error
  • Auth_OpenID_AX_FetchRequest
  • Auth_OpenID_AX_FetchResponse
  • Auth_OpenID_AX_KeyValueMessage
  • Auth_OpenID_AX_Message
  • Auth_OpenID_AX_StoreRequest
  • Auth_OpenID_AX_StoreResponse
  • Auth_OpenID_BcMathWrapper
  • Auth_OpenID_CancelResponse
  • Auth_OpenID_CheckAuthRequest
  • Auth_OpenID_CheckIDRequest
  • Auth_OpenID_Consumer
  • Auth_OpenID_ConsumerResponse
  • Auth_OpenID_CryptUtil
  • Auth_OpenID_DatabaseConnection
  • Auth_OpenID_Decoder
  • Auth_OpenID_DiffieHellman
  • Auth_OpenID_DiffieHellmanSHA1ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA1ServerSession
  • Auth_OpenID_DiffieHellmanSHA256ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA256ServerSession
  • Auth_OpenID_DumbStore
  • Auth_OpenID_Encoder
  • Auth_OpenID_EncodingError
  • Auth_OpenID_Extension
  • Auth_OpenID_FailureResponse
  • Auth_OpenID_FileStore
  • Auth_OpenID_GenericConsumer
  • Auth_OpenID_GmpMathWrapper
  • Auth_OpenID_KVForm
  • Auth_OpenID_MalformedReturnURL
  • Auth_OpenID_MalformedTrustRoot
  • Auth_OpenID_Mapping
  • Auth_OpenID_MathLibrary
  • Auth_OpenID_MDB2Store
  • Auth_OpenID_MemcachedStore
  • Auth_OpenID_Message
  • Auth_OpenID_MySQLStore
  • Auth_OpenID_NamespaceMap
  • Auth_OpenID_NoReturnToError
  • Auth_OpenID_OpenIDStore
  • Auth_OpenID_PAPE_Request
  • Auth_OpenID_PAPE_Response
  • Auth_OpenID_Parse
  • Auth_OpenID_PlainTextConsumerSession
  • Auth_OpenID_PlainTextServerSession
  • Auth_OpenID_PostgreSQLStore
  • Auth_OpenID_Request
  • Auth_OpenID_Server
  • Auth_OpenID_ServerError
  • Auth_OpenID_ServerErrorContainer
  • Auth_OpenID_ServerRequest
  • Auth_OpenID_ServerResponse
  • Auth_OpenID_ServiceEndpoint
  • Auth_OpenID_ServiceEndpointLoader
  • Auth_OpenID_SessionNegotiator
  • Auth_OpenID_SetupNeededResponse
  • Auth_OpenID_Signatory
  • Auth_OpenID_SigningEncoder
  • Auth_OpenID_SQLiteStore
  • Auth_OpenID_SQLStore
  • Auth_OpenID_SRegBase
  • Auth_OpenID_SRegRequest
  • Auth_OpenID_SRegResponse
  • Auth_OpenID_SuccessResponse
  • Auth_OpenID_TrustRoot
  • Auth_OpenID_TypeURIMismatch
  • Auth_OpenID_UntrustedReturnURL
  • Auth_OpenID_WebResponse
  • Auth_Yadis_Discovery
  • Auth_Yadis_DiscoveryResult
  • Auth_Yadis_dom
  • Auth_Yadis_domxml
  • Auth_Yadis_HTTPFetcher
  • Auth_Yadis_HTTPResponse
  • Auth_Yadis_Manager
  • Auth_Yadis_ManagerLoader
  • Auth_Yadis_ParanoidHTTPFetcher
  • Auth_Yadis_ParseHTML
  • Auth_Yadis_PHPSession
  • Auth_Yadis_PlainHTTPFetcher
  • Auth_Yadis_ProxyResolver
  • Auth_Yadis_Service
  • Auth_Yadis_SessionLoader
  • Auth_Yadis_XMLParser
  • Auth_Yadis_XRDS
  • Auth_Yadis_Yadis
  • auto_backup
  • AVCSequenceParameterSetReader
  • bxslider
  • cacheManager
  • cacheManagerFeed
  • CI_jsmin
  • CI_load
  • cloneZenphoto
  • codeIgniter_kludge
  • colorbox
  • Comment
  • comment_form
  • contactformOptions
  • crop_image
  • cycle
  • defaultCodeblocks
  • deprecated_functions
  • DownloadList
  • dynamic_locale
  • dynamicAlbum
  • elFinder_options
  • email_new_user
  • exampleMacros
  • external_auth
  • ExternalFeed
  • externalFeed_options
  • favorites
  • favoritesOptions
  • federated_logon
  • feed
  • fieldExtender
  • flag_thumbnail
  • Gallery
  • galleryArticles
  • getID3
  • getid3_aac
  • getid3_apetag
  • getid3_flv
  • getid3_handler
  • getid3_id3v1
  • getid3_id3v2
  • getid3_lib
  • getid3_lyrics3
  • getid3_mp3
  • getid3_mpeg
  • getid3_quicktime
  • getid3_swf
  • GoogleMap
  • Googlemaps
  • googleVerifyOptions
  • hitcounter
  • HTML
  • htmlmetatags
  • http_auth
  • Image
  • image_effects
  • internal_deprecations
  • ipBlocker
  • jcarousel
  • jPlayer
  • jplayer_options
  • jquery_rating
  • JSMin
  • lib_GD_Options
  • lib_Imagick_Options
  • lib_NoGraphics
  • MediaObject
  • menu_manager
  • MergedRSS
  • MergedRSSOptions
  • mobile
  • Mobile_Detect
  • mobileTheme
  • multipleLayoutOptions
  • null_seo
  • OAuthConsumer
  • OAuthDataStore
  • OAuthRequest
  • OAuthServer
  • OAuthSignatureMethod
  • OAuthSignatureMethod_HMAC_SHA1
  • OAuthSignatureMethod_PLAINTEXT
  • OAuthSignatureMethod_RSA_SHA1
  • OAuthToken
  • OAuthUtil
  • pagedThumbsNav
  • pagedthumbsOptions
  • PclZip
  • PersistentObject
  • PHPMailer
  • PlainText
  • POP3
  • print_album_menu
  • pseudoPlayer
  • publishContent
  • quota_manager
  • reCaptcha
  • ReCaptchaResponse
  • register_user
  • rewriteRules
  • rewriteTokens
  • RSS
  • RSS_internal_deprecations
  • rss_options
  • search_statistics
  • SearchEngine
  • security_logger
  • seo_locale
  • Services_JSON
  • Services_JSON_Error
  • setupexternalFeed
  • setupRSS
  • show_not_loggedin
  • sitemap
  • slideshow
  • SMTP
  • static_html_cache
  • tagsuggest
  • TextObject
  • TextObject_internal_deprecations
  • TextObject_Options
  • ThemeObject
  • themeSwitcher
  • tinymce4Options
  • tinyURL
  • Transientimage
  • tweet
  • TwitterOAuth
  • UploadHandler
  • user_expiry
  • user_groups
  • user_logout_options
  • userAddressFields
  • utf8
  • Video
  • Video_internal_deprecations
  • VideoObject_Options
  • viewer_size_image_options
  • WEBdocs
  • WEBdocs_Options
  • xmpMetadata
  • Zenpage
  • Zenpage_internal_deprecations
  • ZenpageCategory
  • zenpagecms
  • ZenpageItems
  • ZenpageNews
  • ZenpagePage
  • ZenpageRoot
  • Zenphoto_Administrator
  • Zenphoto_Authority
  • zenphoto_org_news
  • zenphoto_seo
  • zenphotoDonate
  • ZipStream
  • zp_PHPMailer
  • zpCaptcha
  • zpFunctions
  • zpLegacySpam
  • zpMutex
  • zpSimpleSpam
  • zpTrivialSpam

Exceptions

  • BadFunctionCallException
  • BadMethodCallException
  • Exception
  • getid3_exception
  • JSMin_UnterminatedCommentException
  • JSMin_UnterminatedRegExpException
  • JSMin_UnterminatedStringException
  • LogicException
  • OAuthExcept
  • phpmailerException

Functions

  • __autoload
  • _escape_xref
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • accessAllAlbums
  • add_context
  • addalbumsToDatabase
  • addCategoriesToDatabase
  • addGeoCoord
  • addItem
  • addPagesToDatabase
  • addPluginScript
  • addPluginType
  • addSubalbumMenus
  • admin_album_list
  • admin_securityChecks
  • admin_showupdate
  • adminPageNav
  • adminToolbox
  • albumNumber
  • applyMacros
  • Auth_OpenID_arrangeByType
  • Auth_OpenID_AX_checkAlias
  • Auth_OpenID_AX_toTypeURIs
  • Auth_OpenID_bestMatchingService
  • Auth_OpenID_checkFieldName
  • Auth_OpenID_checkSessionType
  • Auth_OpenID_checkTimestamp
  • Auth_OpenID_detectMathLibrary
  • Auth_OpenID_discover
  • Auth_OpenID_discoverURI
  • Auth_OpenID_discoverWithoutYadis
  • Auth_OpenID_discoverWithYadis
  • Auth_OpenID_discoverXRI
  • Auth_OpenID_extractReturnURL
  • Auth_OpenID_findOPLocalIdentifier
  • Auth_OpenID_getAllAssociationTypes
  • Auth_OpenID_getAllowedReturnURLs
  • Auth_OpenID_getAuthorityPattern
  • Auth_OpenID_getAvailableSessionTypes
  • Auth_OpenID_getDefaultAssociationOrder
  • Auth_OpenID_getDefaultGen
  • Auth_OpenID_getDefaultMod
  • Auth_OpenID_getDefaultNegotiator
  • Auth_OpenID_getEncodedPattern
  • Auth_OpenID_getEncryptedNegotiator
  • Auth_OpenID_getEscapeRE
  • Auth_OpenID_getMathLib
  • Auth_OpenID_getOnlyEncryptedOrder
  • Auth_OpenID_getOpenIDConsumerTypeURIs
  • Auth_OpenID_getOpenIDTypeName
  • Auth_OpenID_getOpenIDTypeURIs
  • Auth_OpenID_getOPOrUserServices
  • Auth_OpenID_getSecretSize
  • Auth_OpenID_getSessionTypes
  • Auth_OpenID_getSupportedAssociationTypes
  • Auth_OpenID_getUnreserved
  • Auth_OpenID_getURIPattern
  • Auth_OpenID_getURLIllegalCharRE
  • Auth_OpenID_HMACSHA1
  • Auth_OpenID_HMACSHA256
  • Auth_OpenID_include_init
  • Auth_OpenID_isError
  • Auth_OpenID_isOpenID1
  • Auth_OpenID_legacy_discover
  • Auth_OpenID_makeOpenIDEndpoints
  • Auth_OpenID_math_extensions
  • Auth_OpenID_mkNonce
  • Auth_OpenID_noMathSupport
  • Auth_OpenID_pct_encoded_replace
  • Auth_OpenID_pct_encoded_replace_unreserved
  • Auth_OpenID_registerNamespaceAlias
  • Auth_OpenID_remove_dot_segments
  • Auth_OpenID_removeNamespaceAlias
  • Auth_OpenID_returnToMatches
  • Auth_OpenID_setNoMathSupport
  • Auth_OpenID_SHA1
  • Auth_OpenID_SHA256
  • Auth_OpenID_splitNonce
  • Auth_OpenID_supportsSReg
  • Auth_OpenID_urinorm
  • Auth_OpenID_verifyReturnTo
  • Auth_Yadis_array_scramble
  • Auth_Yadis_escapeForIRI
  • Auth_Yadis_getCanonicalID
  • Auth_Yadis_getDefaultProxy
  • Auth_Yadis_getEscapeRE
  • Auth_Yadis_getIPrivateChars
  • Auth_Yadis_getNSMap
  • Auth_Yadis_getServiceEndpoints
  • Auth_Yadis_getSupportedExtensions
  • Auth_Yadis_getUCSChars
  • Auth_Yadis_getXMLParser
  • Auth_Yadis_getXRDExpiration
  • Auth_Yadis_getXrefRE
  • Auth_Yadis_getXRIAuthorities
  • Auth_Yadis_identifierScheme
  • Auth_Yadis_iriToURI
  • Auth_Yadis_pct_escape_unicode
  • Auth_Yadis_providerIsAuthoritative
  • Auth_Yadis_rootAuthority
  • Auth_Yadis_setDefaultParser
  • Auth_Yadis_startswith
  • Auth_Yadis_toIRINormal
  • Auth_Yadis_toURINormal
  • Auth_Yadis_XRI
  • Auth_Yadis_XRIAppendArgs
  • authorSelector
  • build_query
  • build_url
  • bulkActionRedirect
  • bulkTags
  • byteConvert
  • cacheImage
  • checkAccess
  • checkAlbumimagesort
  • checkAlbumParentid
  • checkAlbumPassword
  • checkChosenItemStatus
  • checkChosenMenuset
  • checked
  • checkFolder
  • checkForEmptyTitle
  • checkForGuest
  • checkForPage
  • checkForPassword
  • checkForUpdate
  • checkHitcounterDisplay
  • checkIfChecked
  • checkIfLockedNews
  • checkIfLockedPage
  • checkIfNew
  • checkInstall
  • checkLayoutUseForImages
  • checkNewsAccess
  • checkNewsCategoryPassword
  • checkObjectsThumb
  • checkPagePassword
  • checkPageValidity
  • checkParentLayouts
  • checkPublishDates
  • checkRequiredField
  • checkSelectedAlbum
  • checkSignature
  • cleanAlbum
  • cleanHTML
  • clearSitemapCache
  • clonedFrom
  • codeblocktabsJS
  • comment_form_addComment
  • comment_form_handle_comment
  • comment_form_PaginationJS
  • comment_form_postcomment
  • comment_form_print10Most
  • comment_form_visualEditor
  • commentFormUseCaptcha
  • commentReply
  • commentsAllowed
  • consolidatedEditMessages
  • copyLayoutSelection
  • copyThemeDirectory
  • countArticles
  • countCombiNews
  • createMenuIfNotExists
  • createRelatedItemsResultArray
  • cron_starter
  • currentRelativeURL
  • customOptions
  • dateDiff
  • datepickerJS
  • dateTimeConvert
  • db_affected_rows
  • db_close
  • db_collation
  • db_connect
  • db_count
  • db_create
  • db_create_table
  • db_error
  • db_fetch_assoc
  • db_fetch_row
  • db_free_result
  • db_getSQLmode
  • db_insert_id
  • db_LIKE_escape
  • db_list_fields
  • db_name
  • db_num_rows
  • db_permissions
  • db_quote
  • db_setSQLmode
  • db_show
  • db_software
  • db_table_update
  • db_truncate_table
  • debug404
  • debugLog
  • debugLogBacktrace
  • debugLogVar
  • defaultCodeblocks_codebox
  • deleteArticle
  • deleteCategory
  • deleteItem
  • deleteLayoutSelection
  • deletePage
  • deleteThemeDirectory
  • detect_fetcher
  • detect_math
  • detect_query_corruption
  • detect_random
  • detect_stores
  • detect_xml
  • dircopy
  • displayError
  • doIncludes
  • elFinder_admin_tabs
  • elFinder_tinymce
  • enableExtension
  • escape
  • executeRSS
  • exitZP
  • exposeZenPhotoInformations
  • extensionEnabled
  • fetchComments
  • filesystemToInternal
  • filter_extractReturnURL
  • filter_MatchesAnyOpenIDConsumerType
  • filter_MatchesAnyOpenIDType
  • filterImageQuery
  • fix_path_redirect
  • formatList
  • fullText
  • galleryAlbumsPerPage
  • genAlbumList
  • generateCaptcha
  • generateLanguageList
  • generateListFromArray
  • generateListFromFiles
  • generateRadiobuttonsFromArray
  • generateSitemapCacheFile
  • generateSitemapIndexCacheFile
  • generateUnorderedListFromArray
  • get_AnyFile_suffixes
  • get_context
  • get_filterScript
  • get_instance
  • get_language_string
  • getAdminThumb
  • getAlbumArray
  • getAlbumBreadcrumb
  • getAlbumBreadcrumbAdmin
  • getAlbumCustomData
  • getAlbumData
  • getAlbumDate
  • getAlbumDesc
  • getAlbumFolder
  • getAlbumGeodata
  • getAlbumId
  • getAlbumInherited
  • getAlbumLinkURL
  • getAlbumLocation
  • getAlbumPage
  • getAlbumPlace
  • getAlbumStatistic
  • getAlbumThumb
  • getAlbumTitle
  • getAlbumURL
  • getAllAccessibleAlbums
  • getAllAlbums
  • getAllArticleDates
  • getAllCategories
  • getAllDates
  • getAllowedTags
  • getAllSubAlbumIDs
  • getAllSubalbums
  • getAllTagsCount
  • getAllTagsFromAlbum
  • getAllTagsFromAlbum_multi_unique
  • getAllTagsFromZenpage
  • getAllTagsUnique
  • getAllTranslations
  • getAnnotatedAlbumTitle
  • getAnnotatedImageTitle
  • getArticles
  • getAuthor
  • getBare
  • getBareAlbumDesc
  • getBareAlbumTitle
  • getBareGalleryDesc
  • getBareGalleryTitle
  • getBareImageDesc
  • getBareImageTitle
  • getBareNewsAlbumTitle
  • getBareNewsTitle
  • getBarePageTitle
  • getCategory
  • getCategoryID
  • getCategoryLink
  • getCategoryParentID
  • getCategorySortOrder
  • getCategoryTitle
  • getCheckboxState
  • getCodeblock
  • getCombiNews
  • getCommentAddress
  • getCommentAuthorEmail
  • getCommentAuthorLink
  • getCommentAuthorName
  • getCommentAuthorSite
  • getCommentBody
  • getCommentCount
  • getCommentDate
  • getCommentDateTime
  • getCommentErrors
  • getCommentsAllowed
  • getCommentStored
  • getCommentTime
  • getConsumer
  • getContentShorten
  • getCurrentMenuItem
  • getCurrentNewsArchive
  • getCurrentNewsCategory
  • getCurrentNewsCategoryID
  • getCurrentNewsCategoryParentID
  • getCurrentNewsPage
  • getCurrentPage
  • getCurrentTheme
  • getCustomAlbumThumb
  • getCustomAlbumThumbMaxSpace
  • getCustomImageURL
  • getCustomPageURL
  • getCustomSizedImageMaxSpace
  • getCustomSizedImageThumbMaxSpace
  • getDefaultHeight
  • getDefaultSizedImage
  • getDefaultWidth
  • getDownloadLink
  • getdownloadList
  • getDownloadURL
  • getE
  • getEnabledPlugins
  • getExpiryDatePost
  • getFavoritesURL
  • getField
  • getFirstImageURL
  • getFullHeight
  • getFullImageURL
  • getFullNewsImage
  • getFullWidth
  • getGalleryDesc
  • getGalleryIndexURL
  • getGalleryTitle
  • getGeoCoord
  • getHeadTitle
  • getHitcounter
  • getImageArgs
  • getImageCacheFilename
  • getImageCachePostfix
  • getImageCity
  • getImageCountry
  • getImageCustomData
  • getImageData
  • getImageDate
  • getImageDesc
  • getImageEXIFData
  • getImageGeodata
  • getImageID
  • getImageLinkURL
  • getImageLocation
  • getImageMetaData
  • getImageParameters
  • getImageProcessorURI
  • getImageProcessorURIFromCacheName
  • getImageRotation
  • getImageSortOrder
  • getImageState
  • getImageStatistic
  • getImageThumb
  • getImageTitle
  • getImageURI
  • getImageURL
  • getItem
  • getItemByID
  • getItemTitleAndURL
  • getjPlayerSkinCSS
  • getjPlayerSkins
  • getLanguageArray
  • getLanguageFlag
  • getLastImageURL
  • getLatestComments
  • getLatestNews
  • getLatestZenpageComments
  • getLayout
  • getLayoutSelector
  • getLink
  • getLinkHTML
  • getLogTabs
  • getMacros
  • getMainSiteName
  • getMainSiteURL
  • getManagedAlbumList
  • getMaxSpaceContainer
  • getMenuFromLink
  • getMenuItemChilds
  • getMenuItems
  • getMenumanagerPredicessor
  • getMenumanagerSuccessor
  • getMenuSetSelector
  • getMenuVisibility
  • getMimeString
  • getNestedAlbumList
  • getNewsAdminOption
  • getNewsAdminOptionPath
  • getNewsAlbumName
  • getNewsAlbumTitle
  • getNewsAlbumURL
  • getNewsArchivePath
  • getNewsArchiveURL
  • getNewsAuthor
  • getNewsCategories
  • getNewsCategoryCustomData
  • getNewsCategoryDesc
  • getNewsCategoryPath
  • getNewsCategoryURL
  • getNewsContent
  • getNewsContentShorten
  • getNewsCustomData
  • getNewsDate
  • getNewsExtraContent
  • getNewsID
  • getNewsImageTags
  • getNewsIndexURL
  • getNewsLink
  • getNewsPagesStatistic
  • getNewsPathNav
  • getNewsReadMore
  • getNewsTitle
  • getNewsTitleLink
  • getNewsTitlePath
  • getNewsType
  • getNewsURL
  • getNewsVideoContent
  • getNextAlbum
  • getNextAlbumURL
  • getNextImageThumb
  • getNextImageURL
  • getNextNewsPageURL
  • getNextNewsURL
  • getNextPageURL
  • getNextPrevNews
  • getNotViewableAlbums
  • getNotViewableImages
  • getNumAlbums
  • getNumAllSubalbums
  • getNumImages
  • getNumNews
  • getNumPages
  • getNumSubalbums
  • getOpenIDURL
  • getOption
  • getOptionFromDB
  • getOptionList
  • getPageAuthor
  • getPageContent
  • getPageCustomData
  • getPageDate
  • getPageExtraContent
  • getPageID
  • getPageLastChangeDate
  • getPageLinkPath
  • getPageLinkURL
  • getPageNavList
  • getPageNumURL
  • getPageParentID
  • getPageRedirect
  • getPages
  • getPageSelector
  • getPageSortorder
  • getPageTitle
  • getPageTitleLink
  • getPageURL
  • getParentAlbums
  • getParentAlbumsAdmin
  • getParentBreadcrumb
  • getParentItems
  • getParentMenuItems
  • getParentNewsCategories
  • getParentPages
  • getPasswordProtectImage
  • getPHPFiles
  • getPlugin
  • getPluginFiles
  • getPluginTabs
  • getPrevAlbum
  • getPrevAlbumURL
  • getPrevImageThumb
  • getPrevImageURL
  • getPrevNewsPageURL
  • getPrevNewsURL
  • getPrevPageURL
  • getProtectedImageURL
  • getRandomImages
  • getRandomImagesAlbum
  • getRating
  • getRelatedItems
  • getRequestURI
  • getReturnTo
  • getRSSHeaderLink
  • getRSSLink
  • getScheme
  • getSearchDate
  • getSearchURL
  • getSearchWords
  • getSelectedLayout
  • getSerializedArray
  • getSetClause
  • getSiteHomeURL
  • getSitemapAlbumList
  • getSitemapAlbums
  • getSitemapGoogleImageVideoExtras
  • getSitemapGoogleLoopIndex
  • getSitemapImages
  • getSitemapIndexLinks
  • getSitemapZenpageNewsArticles
  • getSitemapZenpageNewsCategories
  • getSitemapZenpageNewsIndex
  • getSitemapZenpagePages
  • getSizeCustomImage
  • getSizeDefaultImage
  • getSizeDefaultThumb
  • getSizedImageURL
  • getSizeFullImage
  • getStore
  • getSubCategories
  • getSubtabs
  • getSuffix
  • getTagCountByAccess
  • getTagOrder
  • getTags
  • gettext_pl
  • gettext_th
  • getTheme
  • getThemeFiles
  • getThemeOption
  • getTimezones
  • getTinyMCE4ConfigFiles
  • getTitle
  • getTotalArticles
  • getTotalImagesIn
  • getTotalNewsPages
  • getTotalPages
  • getTrustRoot
  • getUnprotectedImageURL
  • getUrAlbum
  • getURL
  • getUserIP
  • getUserLocale
  • getVersion
  • getViewerImageSize
  • getWatermarkParam
  • getWatermarkPath
  • getWatermarks
  • getWhereClause
  • getXSRFToken
  • getZenpageHitcounter
  • getZenpageRSSHeaderLink
  • getZenpageRSSLink
  • getZenpageStatistic
  • googleVerifyHead
  • handleSearchParms
  • hasDynamicAlbumSuffix
  • hasNextImage
  • hasNextPage
  • hasPrevImage
  • hasPrevPage
  • hitcounter
  • html_decode
  • html_encode
  • html_encodeTagged
  • httpsRedirect
  • httpUploadHandler
  • httpUploadHandler_admin_tabs
  • i18nSetLocale
  • imageBlurGD
  • imageDebug
  • imageError
  • imageNumber
  • imgSrcURI
  • in_context
  • inNewsCategory
  • inProtectedNewsCategory
  • installSignature
  • instrument
  • inSubNewsCategoryOf
  • internalToFilesystem
  • inventMenuItem
  • iptc_make_tag
  • is_AdminEditPage
  • is_connected
  • is_GalleryNewsType
  • is_News
  • is_NewsArchive
  • is_NewsArticle
  • is_NewsCategory
  • is_NewsPage
  • is_NewsType
  • is_Pages
  • is_valid_email_zp
  • is_valid_image
  • is_valid_other_type
  • is_zip
  • isAlbumClass
  • isAlbumPage
  • isArchive
  • isHandledAlbum
  • isImageClass
  • isImagePage
  • isImagePhoto
  • isImageVideo
  • isLandscape
  • isMyAlbum
  • isMyNews
  • isMyPage
  • isolate
  • isProtectedAlbum
  • isProtectedNewsCategory
  • isProtectedPage
  • isSubNewsCategoryOf
  • isValidURL
  • jQueryUpload_head
  • jQueryUpload_headers
  • jQueryUploadHandler
  • jQueryUploadHandler_admin_tabs
  • js_encode
  • json_decode
  • json_encode
  • kses
  • kses_array_lc
  • kses_attr
  • kses_bad_protocol
  • kses_bad_protocol_once
  • kses_bad_protocol_once2
  • kses_check_attr_val
  • kses_decode_entities
  • kses_hair
  • kses_hook
  • kses_html_error
  • kses_js_entities
  • kses_no_null
  • kses_normalize_entities
  • kses_normalize_entities2
  • kses_split
  • kses_split2
  • kses_stripslashes
  • kses_version
  • ksesProcess
  • layoutSelector
  • layoutSelector_album
  • listDBUses
  • listDirectoryFiles
  • listUses
  • load_zenpage_news
  • load_zenpage_pages
  • loadLocalOptions
  • log_message
  • lookupSortKey
  • macro_admin_tabs
  • macroList_show
  • makeAlbumCurrent
  • makeImageCurrent
  • makeSpecialImageName
  • markRelease_button
  • mb_strlen
  • mb_strpos
  • mb_strrpos
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
  • menu_admin_toolbox_global
  • menu_tabs
  • minDiff
  • mkdir_recursive
  • my_truncate_string
  • myts_date
  • newAlbum
  • newImage
  • next_album
  • next_comment
  • next_image
  • next_news
  • next_page
  • ngettext_pl
  • ngettext_th
  • normalizeColumns
  • omsAdditions
  • openedForComments
  • parse_query
  • parse_size
  • parseAllowedTags
  • parseHttpAcceptLanguage
  • passAlbums
  • passImages
  • pathurlencode
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • PHPMailerAutoload
  • populateManagedObjectsList
  • postAlbumSort
  • postIndexDecode
  • postIndexEncode
  • prefix
  • prepareAlbumPage
  • prepareCustomPage
  • prepareImagePage
  • prepareIndexPage
  • print404status
  • print_language_string_list
  • printAddToFavorites
  • printAdminFooter
  • printAdminHeader
  • printAdminRightsTable
  • printAdminToolbox
  • printAlbumBreadcrumb
  • printAlbumButtons
  • printAlbumCustomData
  • printAlbumData
  • printAlbumDate
  • printAlbumDesc
  • printAlbumEditForm
  • printAlbumEditRow
  • printAlbumLegend
  • printAlbumLink
  • printAlbumLocation
  • printAlbumMap
  • printAlbumMenu
  • printAlbumMenuJump
  • printAlbumMenuList
  • printAlbumMenuListAlbum
  • printAlbumPlace
  • printAlbumRating
  • printAlbumsSelector
  • printAlbumStatistic
  • printAlbumStatisticItem
  • printAlbumThumbImage
  • printAlbumTitle
  • printAlbumURL
  • printAlbumZip
  • printAllDates
  • printAllNewsCategories
  • printAllTags
  • printAllTagsAs
  • printAllTagsFromAlbum
  • printAllTagsFromZenpage
  • printAnnotatedAlbumTitle
  • printAnnotatedImageTitle
  • printArticleCategories
  • printArticleDatesDropdown
  • printArticlesPerPageDropdown
  • printBareAlbumDesc
  • printBareAlbumTitle
  • printBareGalleryDesc
  • printBareGalleryTitle
  • printBareImageDesc
  • printBareImageTitle
  • printBareNewsTitle
  • printBarePageTitle
  • printBulkActions
  • printCaptcha
  • printCategoriesStatistic
  • printCategoryCheckboxListEntry
  • printCategoryDropdown
  • printCategoryListSortableTable
  • printCategorySelection
  • printCodeblock
  • printCodeblockEdit
  • printCommentAuthorLink
  • printCommentErrors
  • printCommentForm
  • printContactForm
  • printCurrentNewsArchive
  • printCurrentNewsCategory
  • printCustomAlbumThumbImage
  • printCustomAlbumThumbMaxSpace
  • printCustomMenu
  • printCustomPageSelector
  • printCustomPageURL
  • printCustomSizedImage
  • printCustomSizedImageMaxHeight
  • printCustomSizedImageMaxSpace
  • printCustomSizedImageThumbMaxSpace
  • printDefaultSizedImage
  • printDownloadAlbumZipURL
  • printDownloadLink
  • printDownloadLinkAlbumZip
  • printdownloadList
  • printDownloadURL
  • printEditable
  • printEditCommentLink
  • printEditDropdown
  • printExpired
  • printFavoritesLink
  • printFavoritesURL
  • printField
  • printGalleryDesc
  • printGalleryIndexURL
  • printGalleryTitle
  • printGoogleMap
  • printHeadTitle
  • printHomeLink
  • printImageCustomData
  • printImageData
  • printImageDate
  • printImageDesc
  • printImageDiv
  • printImageEXIFData
  • printImageID
  • printImageLink
  • printImageMap
  • printImageMetadata
  • printImageRating
  • printImageSortOrder
  • printImageStatistic
  • printImageThumb
  • printImageTitle
  • printImageURL
  • printItemEditLink
  • printItemsList
  • printItemsListTable
  • printItemStatusDropdown
  • printjCarouselThumbNav
  • printjPlayerPlaylist
  • printLanguageSelector
  • printLatestAlbums
  • printLatestComments
  • printLatestImages
  • printLatestImagesByDate
  • printLatestImagesByMtime
  • printLatestNews
  • printLatestUpdatedAlbums
  • printLatestZenpageComments
  • printLink
  • printLinkHTML
  • printLogoAndLinks
  • printManagedObjects
  • printMenuemanagerPageList
  • printMenuemanagerPageListWithNav
  • printMenumanagerBreadcrumb
  • printMenumanagerNextLink
  • printMenumanagerPrevLink
  • printMostPopularItems
  • printMostRatedAlbums
  • printMostRatedImages
  • printMostRatedItems
  • printNestedAlbumsList
  • printNestedItemsList
  • printNestedMenu
  • printNews
  • printNewsArchive
  • printNewsAuthor
  • printNewsCategories
  • printNewsCategoryCustomData
  • printNewsCategoryDesc
  • printNewsCategoryURL
  • printNewsContent
  • printNewsCustomData
  • printNewsDate
  • printNewsExtraContent
  • printNewsImageTags
  • printNewsIndexURL
  • printNewsLink
  • printNewsPageList
  • printNewsPageListWithNav
  • printNewsReadMoreLink
  • printNewsStatistic
  • printNewsTitle
  • printNewsTitleLink
  • printNewsURL
  • printNextNewsLink
  • printNextNewsPageLink
  • printNextPageLink
  • printNextPageURL
  • printPageArticleTags
  • printPageAuthor
  • printPageContent
  • printPageCustomData
  • printPageDate
  • printPagedThumbsNav
  • printPageExtraContent
  • printPageID
  • printPageLastChangeDate
  • printPageLinkURL
  • printPageList
  • printPageListWithNav
  • printPageMenu
  • printPageNav
  • printPageSelector
  • printPagesListTable
  • printPagesStatistic
  • printPageTitle
  • printPageTitleLink
  • printPageURL
  • printParentBreadcrumb
  • printParentPagesBreadcrumb
  • printPasswordForm
  • printPopularAlbums
  • printPopularImages
  • printPreloadScript
  • printPrevNewsLink
  • printPrevNewsPageLink
  • printPrevPageLink
  • printPrevPageURL
  • printPublished
  • printPublishIconLink
  • printRandomImages
  • printRating
  • printRegisterURL
  • printRegistrationForm
  • printRelatedItems
  • printRSSHeaderLink
  • printRSSLink
  • printSearchBreadcrumb
  • printSearchForm
  • printSiteHomeURL
  • printSizedImageLink
  • printSizedImageURL
  • printSlideShow
  • printSlideShowJS
  • printSlideShowLink
  • printSortableHead
  • printSortOrderDropdown
  • printSubPagesExcerpts
  • printSubtabs
  • printTabs
  • printTags
  • printThumbNav
  • printTopRatedAlbums
  • printTopRatedImages
  • printTopRatedItems
  • printUnpublishedDropdown
  • printUserLogin_out
  • printUserSizeImage
  • printUserSizeSelector
  • printVersion
  • printZenJavascripts
  • printZenpageIconLegend
  • printZenpageItemsBreadcrumb
  • printZenpageNewsCategorySelector
  • printZenpagePagesSelector
  • printZenpageRSSHeaderLink
  • printZenpageRSSLink
  • printZenpageStatistic
  • printZenphotoLink
  • process_language_string_save
  • processAlbumBulkActions
  • processAlbumEdit
  • processCodeblockSave
  • processCommentBulkActions
  • processCredentials
  • processCustomOptionSave
  • processEditSelection
  • processExpired
  • processImageBulkActions
  • processImageEdit
  • processManagedObjects
  • processMenuBulkActions
  • processOrder
  • processRights
  • processTags
  • processZenpageBulkActions
  • propSizes
  • publishItem
  • purgeOption
  • query
  • query_full_array
  • query_single_row
  • rc4
  • read_exif_data_protected
  • readTags
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • reconfigureAction
  • reconfigureCS
  • reconfigurePage
  • recordMissing
  • rem_context
  • removeParentAlbumNames
  • resetCurrentAlbum
  • restore_context
  • reveal
  • rewrite_get_album_image
  • rewrite_path
  • rewrite_path_zenpage
  • RSS_Channel
  • RSS_Retrieve
  • RSS_Tags
  • rulesList
  • run
  • safe_fnmatch
  • safe_glob
  • sanitize
  • sanitize_numeric
  • sanitize_path
  • sanitize_script
  • sanitize_string
  • sanitizeRedirect
  • save_context
  • saveLayoutSelection
  • saveZenphotoLayoutSelection
  • search_quote
  • secureServer
  • seo_cleanup_button
  • seoFriendly
  • seoFriendlyJS
  • set_context
  • setAlbumCustomData
  • setAlbumSubtabs
  • setImageCustomData
  • setMainDomain
  • setOption
  • setOptionDefault
  • setPluginDomain
  • setThemeColumns
  • setThemeDomain
  • setThemeOption
  • setThemeOptionDefault
  • setupAllowedMaps
  • setupCurrentLocale
  • setupDomain
  • setupTheme
  • shortenContent
  • showOrNotShowField
  • shuffle_assoc
  • signatureChange
  • site_upgrade_button
  • site_upgrade_status
  • sitemap_echonl
  • sitemap_getChangefreq
  • sitemap_getDateformat
  • sitemap_getDBLimit
  • sitemap_getISO8601Date
  • skipScheduledPublishing
  • sortByKey
  • sortByMultilingual
  • sortMultiArray
  • standardScripts
  • standardThemeOptions
  • stickyNews
  • storeConfig
  • storeTags
  • stripSuffix
  • submenuOf
  • switchLog
  • tagSelector
  • tagSuggestJS
  • tagSuggestJS_admin
  • tagSuggestJS_frontend
  • themeIsEditable
  • themeSetup
  • timezoneDiff
  • tinymce4ConfigJS
  • truncate_string
  • unpublishedZenphotoItemCheck
  • unpublishSubalbums
  • unQuote
  • unzip
  • updateArticle
  • updateCacheName
  • updateCategory
  • updateConfigItem
  • updateItemSortorder
  • updateItemsSortorder
  • updateMenuItem
  • updatePage
  • upload_extra
  • upload_form
  • upload_head
  • user_mailing_list_button
  • validateLocale
  • wordpress_import_button
  • wp_prefix
  • wp_query_full_array
  • wpimport_TryAgainError
  • XSRFdefender
  • XSRFToken
  • zenJavascript
  • zenpageAlbumImage
  • zenpageBulkActionMessage
  • zenpageHitcounter
  • zenpageJSCSS
  • zenpageOpenedForComments
  • zenpagePublish
  • zenphoto_PHPMailer
  • zenphoto_sendmail
  • zenPhotoTheme
  • zp_apply_filter
  • zp_clearCookie
  • zp_colorAllocate
  • zp_cookieEncode
  • zp_copyCanvas
  • zp_createImage
  • zp_drawRectangle
  • zp_error
  • zp_filter_slot
  • zp_filter_unique_id
  • zp_getCookie
  • zp_getFonts
  • zp_graphicsLibInfo
  • zp_handle_password
  • zp_handle_password_single
  • zp_has_filter
  • zp_image_types
  • zp_imageCanRotate
  • zp_imageColorTransparent
  • zp_imageDims
  • zp_imageFill
  • zp_imageFontHeight
  • zp_imageFontWidth
  • zp_imageFromString
  • zp_imageGet
  • zp_imageGray
  • zp_imageHeight
  • zp_imageIPTC
  • zp_imageKill
  • zp_imageLoadFont
  • zp_imageMerge
  • zp_imageOutput
  • zp_imageResizeAlpha
  • zp_imageUnsharpMask
  • zp_imageWidth
  • zp_load_album
  • zp_load_gallery
  • zp_load_image
  • zp_load_page
  • zp_load_request
  • zp_load_search
  • zp_loggedin
  • zp_mail
  • zp_register_filter
  • zp_remove_filter
  • zp_resampleImage
  • zp_rotateImage
  • zp_session_start
  • zp_setCookie
  • zp_writeString
  • zpErrorHandler
  • zpFormattedDate
  • zpRewriteURL
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: 
  3: /**
  4:  * Extension argument processing code
  5:  *
  6:  * @package OpenID
  7:  */
  8: 
  9: /**
 10:  * Import tools needed to deal with messages.
 11:  */
 12: require_once 'Auth/OpenID.php';
 13: require_once 'Auth/OpenID/KVForm.php';
 14: require_once 'Auth/Yadis/XML.php';
 15: require_once 'Auth/OpenID/Consumer.php'; // For Auth_OpenID_FailureResponse
 16: 
 17: // This doesn't REALLY belong here, but where is better?
 18: define('Auth_OpenID_IDENTIFIER_SELECT',
 19:        "http://specs.openid.net/auth/2.0/identifier_select");
 20: 
 21: // URI for Simple Registration extension, the only commonly deployed
 22: // OpenID 1.x extension, and so a special case
 23: define('Auth_OpenID_SREG_URI', 'http://openid.net/sreg/1.0');
 24: 
 25: // The OpenID 1.X namespace URI
 26: define('Auth_OpenID_OPENID1_NS', 'http://openid.net/signon/1.0');
 27: define('Auth_OpenID_THE_OTHER_OPENID1_NS', 'http://openid.net/signon/1.1');
 28: 
 29: function Auth_OpenID_isOpenID1($ns)
 30: {
 31:     return ($ns == Auth_OpenID_THE_OTHER_OPENID1_NS) ||
 32:         ($ns == Auth_OpenID_OPENID1_NS);
 33: }
 34: 
 35: // The OpenID 2.0 namespace URI
 36: define('Auth_OpenID_OPENID2_NS', 'http://specs.openid.net/auth/2.0');
 37: 
 38: // The namespace consisting of pairs with keys that are prefixed with
 39: // "openid."  but not in another namespace.
 40: define('Auth_OpenID_NULL_NAMESPACE', 'Null namespace');
 41: 
 42: // The null namespace, when it is an allowed OpenID namespace
 43: define('Auth_OpenID_OPENID_NS', 'OpenID namespace');
 44: 
 45: // The top-level namespace, excluding all pairs with keys that start
 46: // with "openid."
 47: define('Auth_OpenID_BARE_NS', 'Bare namespace');
 48: 
 49: // Sentinel for Message implementation to indicate that getArg should
 50: // return null instead of returning a default.
 51: define('Auth_OpenID_NO_DEFAULT', 'NO DEFAULT ALLOWED');
 52: 
 53: // Limit, in bytes, of identity provider and return_to URLs, including
 54: // response payload.  See OpenID 1.1 specification, Appendix D.
 55: define('Auth_OpenID_OPENID1_URL_LIMIT', 2047);
 56: 
 57: // All OpenID protocol fields.  Used to check namespace aliases.
 58: global $Auth_OpenID_OPENID_PROTOCOL_FIELDS;
 59: $Auth_OpenID_OPENID_PROTOCOL_FIELDS = array(
 60:     'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
 61:     'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
 62:     'dh_consumer_public', 'claimed_id', 'identity', 'realm',
 63:     'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
 64:     'assoc_handle', 'trust_root', 'openid');
 65: 
 66: // Global namespace / alias registration map.  See
 67: // Auth_OpenID_registerNamespaceAlias.
 68: global $Auth_OpenID_registered_aliases;
 69: $Auth_OpenID_registered_aliases = array();
 70: 
 71: /**
 72:  * Registers a (namespace URI, alias) mapping in a global namespace
 73:  * alias map.  Raises NamespaceAliasRegistrationError if either the
 74:  * namespace URI or alias has already been registered with a different
 75:  * value.  This function is required if you want to use a namespace
 76:  * with an OpenID 1 message.
 77:  */
 78: function Auth_OpenID_registerNamespaceAlias($namespace_uri, $alias)
 79: {
 80:     global $Auth_OpenID_registered_aliases;
 81: 
 82:     if (Auth_OpenID::arrayGet($Auth_OpenID_registered_aliases,
 83:                               $alias) == $namespace_uri) {
 84:         return true;
 85:     }
 86: 
 87:     if (in_array($namespace_uri,
 88:                  array_values($Auth_OpenID_registered_aliases))) {
 89:         return false;
 90:     }
 91: 
 92:     if (in_array($alias, array_keys($Auth_OpenID_registered_aliases))) {
 93:         return false;
 94:     }
 95: 
 96:     $Auth_OpenID_registered_aliases[$alias] = $namespace_uri;
 97:     return true;
 98: }
 99: 
100: /**
101:  * Removes a (namespace_uri, alias) registration from the global
102:  * namespace alias map.  Returns true if the removal succeeded; false
103:  * if not (if the mapping did not exist).
104:  */
105: function Auth_OpenID_removeNamespaceAlias($namespace_uri, $alias)
106: {
107:     global $Auth_OpenID_registered_aliases;
108: 
109:     if (Auth_OpenID::arrayGet($Auth_OpenID_registered_aliases,
110:                               $alias) === $namespace_uri) {
111:         unset($Auth_OpenID_registered_aliases[$alias]);
112:         return true;
113:     }
114: 
115:     return false;
116: }
117: 
118: /**
119:  * An Auth_OpenID_Mapping maintains a mapping from arbitrary keys to
120:  * arbitrary values.  (This is unlike an ordinary PHP array, whose
121:  * keys may be only simple scalars.)
122:  *
123:  * @package OpenID
124:  */
125: class Auth_OpenID_Mapping {
126:     /**
127:      * Initialize a mapping.  If $classic_array is specified, its keys
128:      * and values are used to populate the mapping.
129:      */
130:     function Auth_OpenID_Mapping($classic_array = null)
131:     {
132:         $this->keys = array();
133:         $this->values = array();
134: 
135:         if (is_array($classic_array)) {
136:             foreach ($classic_array as $key => $value) {
137:                 $this->set($key, $value);
138:             }
139:         }
140:     }
141: 
142:     /**
143:      * Returns true if $thing is an Auth_OpenID_Mapping object; false
144:      * if not.
145:      */
146:     static function isA($thing)
147:     {
148:         return (is_object($thing) &&
149:                 strtolower(get_class($thing)) == 'auth_openid_mapping');
150:     }
151: 
152:     /**
153:      * Returns an array of the keys in the mapping.
154:      */
155:     function keys()
156:     {
157:         return $this->keys;
158:     }
159: 
160:     /**
161:      * Returns an array of values in the mapping.
162:      */
163:     function values()
164:     {
165:         return $this->values;
166:     }
167: 
168:     /**
169:      * Returns an array of (key, value) pairs in the mapping.
170:      */
171:     function items()
172:     {
173:         $temp = array();
174: 
175:         for ($i = 0; $i < count($this->keys); $i++) {
176:             $temp[] = array($this->keys[$i],
177:                             $this->values[$i]);
178:         }
179:         return $temp;
180:     }
181: 
182:     /**
183:      * Returns the "length" of the mapping, or the number of keys.
184:      */
185:     function len()
186:     {
187:         return count($this->keys);
188:     }
189: 
190:     /**
191:      * Sets a key-value pair in the mapping.  If the key already
192:      * exists, its value is replaced with the new value.
193:      */
194:     function set($key, $value)
195:     {
196:         $index = array_search($key, $this->keys);
197: 
198:         if ($index !== false) {
199:             $this->values[$index] = $value;
200:         } else {
201:             $this->keys[] = $key;
202:             $this->values[] = $value;
203:         }
204:     }
205: 
206:     /**
207:      * Gets a specified value from the mapping, associated with the
208:      * specified key.  If the key does not exist in the mapping,
209:      * $default is returned instead.
210:      */
211:     function get($key, $default = null)
212:     {
213:         $index = array_search($key, $this->keys);
214: 
215:         if ($index !== false) {
216:             return $this->values[$index];
217:         } else {
218:             return $default;
219:         }
220:     }
221: 
222:     /**
223:      * @access private
224:      */
225:     function _reflow()
226:     {
227:         // PHP is broken yet again.  Sort the arrays to remove the
228:         // hole in the numeric indexes that make up the array.
229:         $old_keys = $this->keys;
230:         $old_values = $this->values;
231: 
232:         $this->keys = array();
233:         $this->values = array();
234: 
235:         foreach ($old_keys as $k) {
236:             $this->keys[] = $k;
237:         }
238: 
239:         foreach ($old_values as $v) {
240:             $this->values[] = $v;
241:         }
242:     }
243: 
244:     /**
245:      * Deletes a key-value pair from the mapping with the specified
246:      * key.
247:      */
248:     function del($key)
249:     {
250:         $index = array_search($key, $this->keys);
251: 
252:         if ($index !== false) {
253:             unset($this->keys[$index]);
254:             unset($this->values[$index]);
255:             $this->_reflow();
256:             return true;
257:         }
258:         return false;
259:     }
260: 
261:     /**
262:      * Returns true if the specified value has a key in the mapping;
263:      * false if not.
264:      */
265:     function contains($value)
266:     {
267:         return (array_search($value, $this->keys) !== false);
268:     }
269: }
270: 
271: /**
272:  * Maintains a bijective map between namespace uris and aliases.
273:  *
274:  * @package OpenID
275:  */
276: class Auth_OpenID_NamespaceMap {
277:     function Auth_OpenID_NamespaceMap()
278:     {
279:         $this->alias_to_namespace = new Auth_OpenID_Mapping();
280:         $this->namespace_to_alias = new Auth_OpenID_Mapping();
281:         $this->implicit_namespaces = array();
282:     }
283: 
284:     function getAlias($namespace_uri)
285:     {
286:         return $this->namespace_to_alias->get($namespace_uri);
287:     }
288: 
289:     function getNamespaceURI($alias)
290:     {
291:         return $this->alias_to_namespace->get($alias);
292:     }
293: 
294:     function iterNamespaceURIs()
295:     {
296:         // Return an iterator over the namespace URIs
297:         return $this->namespace_to_alias->keys();
298:     }
299: 
300:     function iterAliases()
301:     {
302:         // Return an iterator over the aliases"""
303:         return $this->alias_to_namespace->keys();
304:     }
305: 
306:     function iteritems()
307:     {
308:         return $this->namespace_to_alias->items();
309:     }
310: 
311:     function isImplicit($namespace_uri)
312:     {
313:         return in_array($namespace_uri, $this->implicit_namespaces);
314:     }
315: 
316:     function addAlias($namespace_uri, $desired_alias, $implicit=false)
317:     {
318:         // Add an alias from this namespace URI to the desired alias
319:         global $Auth_OpenID_OPENID_PROTOCOL_FIELDS;
320: 
321:         // Check that desired_alias is not an openid protocol field as
322:         // per the spec.
323:         if (in_array($desired_alias, $Auth_OpenID_OPENID_PROTOCOL_FIELDS)) {
324:             Auth_OpenID::log("\"%s\" is not an allowed namespace alias",
325:                             $desired_alias);
326:             return null;
327:         }
328: 
329:         // Check that desired_alias does not contain a period as per
330:         // the spec.
331:         if (strpos($desired_alias, '.') !== false) {
332:             Auth_OpenID::log('"%s" must not contain a dot', $desired_alias);
333:             return null;
334:         }
335: 
336:         // Check that there is not a namespace already defined for the
337:         // desired alias
338:         $current_namespace_uri =
339:             $this->alias_to_namespace->get($desired_alias);
340: 
341:         if (($current_namespace_uri !== null) &&
342:             ($current_namespace_uri != $namespace_uri)) {
343:             Auth_OpenID::log('Cannot map "%s" because previous mapping exists',
344:                             $namespace_uri);
345:             return null;
346:         }
347: 
348:         // Check that there is not already a (different) alias for
349:         // this namespace URI
350:         $alias = $this->namespace_to_alias->get($namespace_uri);
351: 
352:         if (($alias !== null) && ($alias != $desired_alias)) {
353:             Auth_OpenID::log('Cannot map %s to alias %s. ' .
354:                             'It is already mapped to alias %s',
355:                             $namespace_uri, $desired_alias, $alias);
356:             return null;
357:         }
358: 
359:         assert((Auth_OpenID_NULL_NAMESPACE === $desired_alias) ||
360:                is_string($desired_alias));
361: 
362:         $this->alias_to_namespace->set($desired_alias, $namespace_uri);
363:         $this->namespace_to_alias->set($namespace_uri, $desired_alias);
364:         if ($implicit) {
365:             array_push($this->implicit_namespaces, $namespace_uri);
366:         }
367: 
368:         return $desired_alias;
369:     }
370: 
371:     function add($namespace_uri)
372:     {
373:         // Add this namespace URI to the mapping, without caring what
374:         // alias it ends up with
375: 
376:         // See if this namespace is already mapped to an alias
377:         $alias = $this->namespace_to_alias->get($namespace_uri);
378: 
379:         if ($alias !== null) {
380:             return $alias;
381:         }
382: 
383:         // Fall back to generating a numerical alias
384:         $i = 0;
385:         while (1) {
386:             $alias = 'ext' . strval($i);
387:             if ($this->addAlias($namespace_uri, $alias) === null) {
388:                 $i += 1;
389:             } else {
390:                 return $alias;
391:             }
392:         }
393: 
394:         // Should NEVER be reached!
395:         return null;
396:     }
397: 
398:     function contains($namespace_uri)
399:     {
400:         return $this->isDefined($namespace_uri);
401:     }
402: 
403:     function isDefined($namespace_uri)
404:     {
405:         return $this->namespace_to_alias->contains($namespace_uri);
406:     }
407: }
408: 
409: /**
410:  * In the implementation of this object, null represents the global
411:  * namespace as well as a namespace with no key.
412:  *
413:  * @package OpenID
414:  */
415: class Auth_OpenID_Message {
416: 
417:     function Auth_OpenID_Message($openid_namespace = null)
418:     {
419:         // Create an empty Message
420:         $this->allowed_openid_namespaces = array(
421:                                Auth_OpenID_OPENID1_NS,
422:                                Auth_OpenID_THE_OTHER_OPENID1_NS,
423:                                Auth_OpenID_OPENID2_NS);
424: 
425:         $this->args = new Auth_OpenID_Mapping();
426:         $this->namespaces = new Auth_OpenID_NamespaceMap();
427:         if ($openid_namespace === null) {
428:             $this->_openid_ns_uri = null;
429:         } else {
430:             $implicit = Auth_OpenID_isOpenID1($openid_namespace);
431:             $this->setOpenIDNamespace($openid_namespace, $implicit);
432:         }
433:     }
434: 
435:     function isOpenID1()
436:     {
437:         return Auth_OpenID_isOpenID1($this->getOpenIDNamespace());
438:     }
439: 
440:     function isOpenID2()
441:     {
442:         return $this->getOpenIDNamespace() == Auth_OpenID_OPENID2_NS;
443:     }
444: 
445:     static function fromPostArgs($args)
446:     {
447:         // Construct a Message containing a set of POST arguments
448:         $obj = new Auth_OpenID_Message();
449: 
450:         // Partition into "openid." args and bare args
451:         $openid_args = array();
452:         foreach ($args as $key => $value) {
453: 
454:             if (is_array($value)) {
455:                 return null;
456:             }
457: 
458:             $parts = explode('.', $key, 2);
459: 
460:             if (count($parts) == 2) {
461:                 list($prefix, $rest) = $parts;
462:             } else {
463:                 $prefix = null;
464:             }
465: 
466:             if ($prefix != 'openid') {
467:                 $obj->args->set(array(Auth_OpenID_BARE_NS, $key), $value);
468:             } else {
469:                 $openid_args[$rest] = $value;
470:             }
471:         }
472: 
473:         if ($obj->_fromOpenIDArgs($openid_args)) {
474:             return $obj;
475:         } else {
476:             return null;
477:         }
478:     }
479: 
480:     static function fromOpenIDArgs($openid_args)
481:     {
482:         // Takes an array.
483: 
484:         // Construct a Message from a parsed KVForm message
485:         $obj = new Auth_OpenID_Message();
486:         if ($obj->_fromOpenIDArgs($openid_args)) {
487:             return $obj;
488:         } else {
489:             return null;
490:         }
491:     }
492: 
493:     /**
494:      * @access private
495:      */
496:     function _fromOpenIDArgs($openid_args)
497:     {
498:         global $Auth_OpenID_registered_aliases;
499: 
500:         // Takes an Auth_OpenID_Mapping instance OR an array.
501: 
502:         if (!Auth_OpenID_Mapping::isA($openid_args)) {
503:             $openid_args = new Auth_OpenID_Mapping($openid_args);
504:         }
505: 
506:         $ns_args = array();
507: 
508:         // Resolve namespaces
509:         foreach ($openid_args->items() as $pair) {
510:             list($rest, $value) = $pair;
511: 
512:             $parts = explode('.', $rest, 2);
513: 
514:             if (count($parts) == 2) {
515:                 list($ns_alias, $ns_key) = $parts;
516:             } else {
517:                 $ns_alias = Auth_OpenID_NULL_NAMESPACE;
518:                 $ns_key = $rest;
519:             }
520: 
521:             if ($ns_alias == 'ns') {
522:                 if ($this->namespaces->addAlias($value, $ns_key) === null) {
523:                     return false;
524:                 }
525:             } else if (($ns_alias == Auth_OpenID_NULL_NAMESPACE) &&
526:                        ($ns_key == 'ns')) {
527:                 // null namespace
528:                 if ($this->setOpenIDNamespace($value, false) === false) {
529:                     return false;
530:                 }
531:             } else {
532:                 $ns_args[] = array($ns_alias, $ns_key, $value);
533:             }
534:         }
535: 
536:         if (!$this->getOpenIDNamespace()) {
537:             if ($this->setOpenIDNamespace(Auth_OpenID_OPENID1_NS, true) ===
538:                 false) {
539:                 return false;
540:             }
541:         }
542: 
543:         // Actually put the pairs into the appropriate namespaces
544:         foreach ($ns_args as $triple) {
545:             list($ns_alias, $ns_key, $value) = $triple;
546:             $ns_uri = $this->namespaces->getNamespaceURI($ns_alias);
547:             if ($ns_uri === null) {
548:                 $ns_uri = $this->_getDefaultNamespace($ns_alias);
549:                 if ($ns_uri === null) {
550: 
551:                     $ns_uri = Auth_OpenID_OPENID_NS;
552:                     $ns_key = sprintf('%s.%s', $ns_alias, $ns_key);
553:                 } else {
554:                     $this->namespaces->addAlias($ns_uri, $ns_alias, true);
555:                 }
556:             }
557: 
558:             $this->setArg($ns_uri, $ns_key, $value);
559:         }
560: 
561:         return true;
562:     }
563: 
564:     function _getDefaultNamespace($mystery_alias)
565:     {
566:         global $Auth_OpenID_registered_aliases;
567:         if ($this->isOpenID1()) {
568:             return @$Auth_OpenID_registered_aliases[$mystery_alias];
569:         }
570:         return null;
571:     }
572: 
573:     function setOpenIDNamespace($openid_ns_uri, $implicit)
574:     {
575:         if (!in_array($openid_ns_uri, $this->allowed_openid_namespaces)) {
576:             Auth_OpenID::log('Invalid null namespace: "%s"', $openid_ns_uri);
577:             return false;
578:         }
579: 
580:         $succeeded = $this->namespaces->addAlias($openid_ns_uri,
581:                                                  Auth_OpenID_NULL_NAMESPACE,
582:                                                  $implicit);
583:         if ($succeeded === false) {
584:             return false;
585:         }
586: 
587:         $this->_openid_ns_uri = $openid_ns_uri;
588: 
589:         return true;
590:     }
591: 
592:     function getOpenIDNamespace()
593:     {
594:         return $this->_openid_ns_uri;
595:     }
596: 
597:     static function fromKVForm($kvform_string)
598:     {
599:         // Create a Message from a KVForm string
600:         return Auth_OpenID_Message::fromOpenIDArgs(
601:                      Auth_OpenID_KVForm::toArray($kvform_string));
602:     }
603: 
604:     function copy()
605:     {
606:         return $this;
607:     }
608: 
609:     function toPostArgs()
610:     {
611:         // Return all arguments with openid. in front of namespaced
612:         // arguments.
613: 
614:         $args = array();
615: 
616:         // Add namespace definitions to the output
617:         foreach ($this->namespaces->iteritems() as $pair) {
618:             list($ns_uri, $alias) = $pair;
619:             if ($this->namespaces->isImplicit($ns_uri)) {
620:                 continue;
621:             }
622:             if ($alias == Auth_OpenID_NULL_NAMESPACE) {
623:                 $ns_key = 'openid.ns';
624:             } else {
625:                 $ns_key = 'openid.ns.' . $alias;
626:             }
627:             $args[$ns_key] = $ns_uri;
628:         }
629: 
630:         foreach ($this->args->items() as $pair) {
631:             list($ns_parts, $value) = $pair;
632:             list($ns_uri, $ns_key) = $ns_parts;
633:             $key = $this->getKey($ns_uri, $ns_key);
634:             $args[$key] = $value;
635:         }
636: 
637:         return $args;
638:     }
639: 
640:     function toArgs()
641:     {
642:         // Return all namespaced arguments, failing if any
643:         // non-namespaced arguments exist.
644:         $post_args = $this->toPostArgs();
645:         $kvargs = array();
646:         foreach ($post_args as $k => $v) {
647:             if (strpos($k, 'openid.') !== 0) {
648:                 // raise ValueError(
649:                 //   'This message can only be encoded as a POST, because it '
650:                 //   'contains arguments that are not prefixed with "openid."')
651:                 return null;
652:             } else {
653:                 $kvargs[substr($k, 7)] = $v;
654:             }
655:         }
656: 
657:         return $kvargs;
658:     }
659: 
660:     function toFormMarkup($action_url, $form_tag_attrs = null,
661:                           $submit_text = "Continue")
662:     {
663:         $form = "<form accept-charset=\"UTF-8\" ".
664:             "enctype=\"application/x-www-form-urlencoded\"";
665: 
666:         if (!$form_tag_attrs) {
667:             $form_tag_attrs = array();
668:         }
669: 
670:         $form_tag_attrs['action'] = $action_url;
671:         $form_tag_attrs['method'] = 'post';
672: 
673:         unset($form_tag_attrs['enctype']);
674:         unset($form_tag_attrs['accept-charset']);
675: 
676:         if ($form_tag_attrs) {
677:             foreach ($form_tag_attrs as $name => $attr) {
678:                 $form .= sprintf(" %s=\"%s\"", $name, $attr);
679:             }
680:         }
681: 
682:         $form .= ">\n";
683: 
684:         foreach ($this->toPostArgs() as $name => $value) {
685:             $form .= sprintf(
686:                         "<input type=\"hidden\" name=\"%s\" value=\"%s\" />\n",
687:                         $name, urldecode($value));
688:         }
689: 
690:         $form .= sprintf("<input type=\"submit\" value=\"%s\" />\n",
691:                          $submit_text);
692: 
693:         $form .= "</form>\n";
694: 
695:         return $form;
696:     }
697: 
698:     function toURL($base_url)
699:     {
700:         // Generate a GET URL with the parameters in this message
701:         // attached as query parameters.
702:         return Auth_OpenID::appendArgs($base_url, $this->toPostArgs());
703:     }
704: 
705:     function toKVForm()
706:     {
707:         // Generate a KVForm string that contains the parameters in
708:         // this message. This will fail if the message contains
709:         // arguments outside of the 'openid.' prefix.
710:         return Auth_OpenID_KVForm::fromArray($this->toArgs());
711:     }
712: 
713:     function toURLEncoded()
714:     {
715:         // Generate an x-www-urlencoded string
716:         $args = array();
717: 
718:         foreach ($this->toPostArgs() as $k => $v) {
719:             $args[] = array($k, $v);
720:         }
721: 
722:         sort($args);
723:         return Auth_OpenID::httpBuildQuery($args);
724:     }
725: 
726:     /**
727:      * @access private
728:      */
729:     function _fixNS($namespace)
730:     {
731:         // Convert an input value into the internally used values of
732:         // this object
733: 
734:         if ($namespace == Auth_OpenID_OPENID_NS) {
735:             if ($this->_openid_ns_uri === null) {
736:                 return new Auth_OpenID_FailureResponse(null,
737:                     'OpenID namespace not set');
738:             } else {
739:                 $namespace = $this->_openid_ns_uri;
740:             }
741:         }
742: 
743:         if (($namespace != Auth_OpenID_BARE_NS) &&
744:               (!is_string($namespace))) {
745:             //TypeError
746:             $err_msg = sprintf("Namespace must be Auth_OpenID_BARE_NS, ".
747:                               "Auth_OpenID_OPENID_NS or a string. got %s",
748:                               print_r($namespace, true));
749:             return new Auth_OpenID_FailureResponse(null, $err_msg);
750:         }
751: 
752:         if (($namespace != Auth_OpenID_BARE_NS) &&
753:             (strpos($namespace, ':') === false)) {
754:             // fmt = 'OpenID 2.0 namespace identifiers SHOULD be URIs. Got %r'
755:             // warnings.warn(fmt % (namespace,), DeprecationWarning)
756: 
757:             if ($namespace == 'sreg') {
758:                 // fmt = 'Using %r instead of "sreg" as namespace'
759:                 // warnings.warn(fmt % (SREG_URI,), DeprecationWarning,)
760:                 return Auth_OpenID_SREG_URI;
761:             }
762:         }
763: 
764:         return $namespace;
765:     }
766: 
767:     function hasKey($namespace, $ns_key)
768:     {
769:         $namespace = $this->_fixNS($namespace);
770:         if (Auth_OpenID::isFailure($namespace)) {
771:             return false;
772:         } else {
773:             return $this->args->contains(array($namespace, $ns_key));
774:         }
775:     }
776: 
777:     function getKey($namespace, $ns_key)
778:     {
779:         // Get the key for a particular namespaced argument
780:         $namespace = $this->_fixNS($namespace);
781:         if (Auth_OpenID::isFailure($namespace)) {
782:             return $namespace;
783:         }
784:         if ($namespace == Auth_OpenID_BARE_NS) {
785:             return $ns_key;
786:         }
787: 
788:         $ns_alias = $this->namespaces->getAlias($namespace);
789: 
790:         // No alias is defined, so no key can exist
791:         if ($ns_alias === null) {
792:             return null;
793:         }
794: 
795:         if ($ns_alias == Auth_OpenID_NULL_NAMESPACE) {
796:             $tail = $ns_key;
797:         } else {
798:             $tail = sprintf('%s.%s', $ns_alias, $ns_key);
799:         }
800: 
801:         return 'openid.' . $tail;
802:     }
803: 
804:     function getArg($namespace, $key, $default = null)
805:     {
806:         // Get a value for a namespaced key.
807:         $namespace = $this->_fixNS($namespace);
808: 
809:         if (Auth_OpenID::isFailure($namespace)) {
810:             return $namespace;
811:         } else {
812:             if ((!$this->args->contains(array($namespace, $key))) &&
813:               ($default == Auth_OpenID_NO_DEFAULT)) {
814:                 $err_msg = sprintf("Namespace %s missing required field %s",
815:                                    $namespace, $key);
816:                 return new Auth_OpenID_FailureResponse(null, $err_msg);
817:             } else {
818:                 return $this->args->get(array($namespace, $key), $default);
819:             }
820:         }
821:     }
822: 
823:     function getArgs($namespace)
824:     {
825:         // Get the arguments that are defined for this namespace URI
826: 
827:         $namespace = $this->_fixNS($namespace);
828:         if (Auth_OpenID::isFailure($namespace)) {
829:             return $namespace;
830:         } else {
831:             $stuff = array();
832:             foreach ($this->args->items() as $pair) {
833:                 list($key, $value) = $pair;
834:                 list($pair_ns, $ns_key) = $key;
835:                 if ($pair_ns == $namespace) {
836:                     $stuff[$ns_key] = $value;
837:                 }
838:             }
839: 
840:             return $stuff;
841:         }
842:     }
843: 
844:     function updateArgs($namespace, $updates)
845:     {
846:         // Set multiple key/value pairs in one call
847: 
848:         $namespace = $this->_fixNS($namespace);
849: 
850:         if (Auth_OpenID::isFailure($namespace)) {
851:             return $namespace;
852:         } else {
853:             foreach ($updates as $k => $v) {
854:                 $this->setArg($namespace, $k, $v);
855:             }
856:             return true;
857:         }
858:     }
859: 
860:     function setArg($namespace, $key, $value)
861:     {
862:         // Set a single argument in this namespace
863:         $namespace = $this->_fixNS($namespace);
864: 
865:         if (Auth_OpenID::isFailure($namespace)) {
866:             return $namespace;
867:         } else {
868:             $this->args->set(array($namespace, $key), $value);
869:             if ($namespace !== Auth_OpenID_BARE_NS) {
870:                 $this->namespaces->add($namespace);
871:             }
872:             return true;
873:         }
874:     }
875: 
876:     function delArg($namespace, $key)
877:     {
878:         $namespace = $this->_fixNS($namespace);
879: 
880:         if (Auth_OpenID::isFailure($namespace)) {
881:             return $namespace;
882:         } else {
883:             return $this->args->del(array($namespace, $key));
884:         }
885:     }
886: 
887:     function getAliasedArg($aliased_key, $default = null)
888:     {
889:         if ($aliased_key == 'ns') {
890:             // Return the namespace URI for the OpenID namespace
891:             return $this->getOpenIDNamespace();
892:         }
893: 
894:         $parts = explode('.', $aliased_key, 2);
895: 
896:         if (count($parts) != 2) {
897:             $ns = null;
898:         } else {
899:             list($alias, $key) = $parts;
900: 
901:             if ($alias == 'ns') {
902:               // Return the namespace URI for a namespace alias
903:               // parameter.
904:               return $this->namespaces->getNamespaceURI($key);
905:             } else {
906:               $ns = $this->namespaces->getNamespaceURI($alias);
907:             }
908:         }
909: 
910:         if ($ns === null) {
911:             $key = $aliased_key;
912:             $ns = $this->getOpenIDNamespace();
913:         }
914: 
915:         return $this->getArg($ns, $key, $default);
916:     }
917: }
918: 
919: 
920: 
Zenphoto doc API documentation generated by ApiGen