contenido\classes\class.update.notifier.php
Project:
Contenido Content Management System
Description: Contenido Update Notifier Functions
Requirements:
- Author
- Dominik Ziegler
- Con_php_req
- 5.0
- Con_php_req
- simplexml
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend classes
- Since
- file available since contenido release 4.8.7 {@internal created 2008-06-21 modified 2008-07-01 timo trautmann - added rss update functionality modified 2008-07-02, Dominik Ziegler, added language support for rss modified 2009-10-01, Dominik Ziegler, added some checks for directory write permissions modified 2010-10-01, Dominik Ziegler, added resource check of fsockopen stream modified 2011-03-18, Murat Purc, fixed thrown errors while invalid socket handles, see [CON-366] $Id: class.update.notifier.php 1331 2011-03-18 22:14:29Z xmurrix $: }}
- Version
- 1.0.2
\Contenido_UpdateNotifier
Package: Default



































Properties

array $aCfg = array()Contenido configuration array
Default value
array()Details- Type
- array
- Access
- protected

array $aPropConf = array("itemType" => "update", "itemID" => 1, "type" => "file_check", "name" => "xml")Property configuration array
Default value
array("itemType" => "update", "itemID" => 1, "type" => "file_check", "name" => "xml")Details- Type
- array
- Access
- protected

array $aSysPropConf = array("type" => "update", "name" => "check")System property configuration array for update notification
Default value
array("type" => "update", "name" => "check")Details- Type
- array
- Access
- protected

array $aSysPropConfPeriod = array("type" => "update", "name" => "check_period")System property configuration array for update period
Default value
array("type" => "update", "name" => "check_period")Details- Type
- array
- Access
- protected

array $aSysPropConfRss = array("type" => "update", "name" => "news_feed")System property configuration array for rss notification
Default value
array("type" => "update", "name" => "news_feed")Details- Type
- array
- Access
- protected

boolean $bEnableCheck = falseCheck for system setting
Default value
falseDetails- Type
- boolean
- Access
- protected

boolean $bEnableCheckRss = falseCheck for system setting Rss
Default value
falseDetails- Type
- boolean
- Access
- protected

boolean $bEnableView = falseDisplay update notification based on user rights (sysadmin only)
Default value
falseDetails- Type
- boolean
- Access
- protected

boolean $bNoWritePermissions = falseIf true contenido displays a special error message due to missing write permissions.
Default value
falseDetails- Type
- boolean
- Access
- protected

boolean $bUpdateNecessity = falseUpdate necessity
Default value
falseDetails- Type
- boolean
- Access
- protected

integer $iCacheDuration = 60Cache duration in minutes
Default value
60Details- Type
- integer
- Access
- protected

integer $iConnectTimeout = 3Timeout for the fsockopen connection
Default value
3Details- Type
- integer
- Access
- protected

string $sBackendLanguage = ""Current backend language
Default value
""Details- Type
- string
- Access
- protected

string $sMinorRelease = ""Minor release for the simplexml xpath() method
Default value
""Details- Type
- string
- Access
- protected

string $sRSSContent = ""Content of the language specific RSS file
Default value
""Details- Type
- string
- Access
- protected

string $sTimestampCacheFile = "update.txt"Timestamp cache file
Default value
"update.txt"Details- Type
- string
- Access
- protected

string $sVendorHost = "www.contenido.org"Host for vendor XML
Default value
"www.contenido.org"Details- Type
- string
- Access
- protected

string $sVendorHostPath = "con_version_check_feeds/"Path to files
Default value
"con_version_check_feeds/"Details- Type
- string
- Access
- protected

string $sVendorRssDeFile = "rss_de.xml"German Vendor RSS file
Default value
"rss_de.xml"Details- Type
- string
- Access
- protected

string $sVendorRssEnFile = "rss_en.xml"English Vendor RSS file
Default value
"rss_en.xml"Details- Type
- string
- Access
- protected

string $sVendorURL = "http://www.contenido.org/de/redir"Download URL
Default value
"http://www.contenido.org/de/redir"Details- Type
- string
- Access
- protected

string $sVendorVersion = ""Current available vendor version
Default value
""Details- Type
- string
- Access
- protected

string $sVendorXMLFile = "vendor.xml"Vendor XML file
Default value
"vendor.xml"Details- Type
- string
- Access
- protected
Methods

__construct( $aCfg, $oUser, $oPerm, $oSession, $sBackendLanguage) : voidConstructor of Contenido_UpdateNotifier
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $aCfg | ||
| $oUser | ||
| $oPerm | ||
| $oSession | ||
| $sBackendLanguage |
- Access
- public

checkPatchLevel() : stringChecks the patch level of system and vendor version
Returns
Details
| Type | Description |
|---|---|
| string |
- Access
- protected

checkUpdateNecessity() : voidChecks if the xml files must be loaded from the vendor host or local cache
Details
- Access
- protected

detectMinorRelease() : voidDetects and converts the minor release of the system version
Details
- Access
- protected

getDownloadURL() : stringGenerates the download URL
Returns
Details
| Type | Description |
|---|---|
| string |
- Access
- protected

getHashProperty() : stringGets the xml file hash from the property table
Returns
Details
| Type | Description |
|---|---|
| string |
- Access
- protected

getVendorHostFiles() : arrayConnects with vendor host and gets the xml files
Returns
Details
| Type | Description |
|---|---|
| array |
- Access
- protected

handleVendorUpdate( $aXMLContent) : voidHandles the update of files coming per vendor host
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $aXMLContent |
- Access
- protected

readVendorContent() : voidReads the xml files from vendor host or cache and checks for file manipulations
Details
- Access
- protected

renderOutput( $sMessage) : stringGenerates the output for the backend
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $sMessage | string |
| Type | Description |
|---|---|
| string |
- Access
- protected

renderRss( $oTpl) : \contenidoGenerates the output for the rss informations
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $oTpl |
| Type | Description |
|---|---|
| \contenido | template object |
- Access
- protected

updateCacheFiles( $aRSSContent) : voidUpdates the files in cache
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $aRSSContent | array |
- Access
- protected

updateHashProperty( $aXMLContent) : voidUpdates the xml file hash in the property table
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $aXMLContent |
- Access
- protected