contenido\classes\class.update.notifier.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VPropertyprotectedarray $aCfg = array()
Contenido configuration array
Default valuearray()Details
Type
array
Access
protected  
>VPropertyprotectedarray $aPropConf = array("itemType" => "update", "itemID" => 1, "type" => "file_check", "name" => "xml")
Property configuration array
Default valuearray("itemType" => "update", "itemID" => 1, "type" => "file_check", "name" => "xml")Details
Type
array
Access
protected  
>VPropertyprotectedarray $aSysPropConf = array("type" => "update", "name" => "check")
System property configuration array for update notification
Default valuearray("type" => "update", "name" => "check")Details
Type
array
Access
protected  
>VPropertyprotectedarray $aSysPropConfPeriod = array("type" => "update", "name" => "check_period")
System property configuration array for update period
Default valuearray("type" => "update", "name" => "check_period")Details
Type
array
Access
protected  
>VPropertyprotectedarray $aSysPropConfRss = array("type" => "update", "name" => "news_feed")
System property configuration array for rss notification
Default valuearray("type" => "update", "name" => "news_feed")Details
Type
array
Access
protected  
>VPropertyprotectedboolean $bEnableCheck = false
Check for system setting
Default valuefalseDetails
Type
boolean
Access
protected  
>VPropertyprotectedboolean $bEnableCheckRss = false
Check for system setting Rss
Default valuefalseDetails
Type
boolean
Access
protected  
>VPropertyprotectedboolean $bEnableView = false
Display update notification based on user rights (sysadmin only)
Default valuefalseDetails
Type
boolean
Access
protected  
>VPropertyprotectedboolean $bNoWritePermissions = false
If true contenido displays a special error message due to missing write permissions.
Default valuefalseDetails
Type
boolean
Access
protected  
>VPropertyprotectedboolean $bUpdateNecessity = false
Update necessity
Default valuefalseDetails
Type
boolean
Access
protected  
>VPropertyprotectedinteger $iCacheDuration = 60
Cache duration in minutes
Default value60Details
Type
integer
Access
protected  
>VPropertyprotectedinteger $iConnectTimeout = 3
Timeout for the fsockopen connection
Default value3Details
Type
integer
Access
protected  
>VPropertyprotectedobject $oProperties = null
Properties object
Default valuenullDetails
Type
object
Access
protected  
>VPropertyprotectedobject $oSession = null
Session object
Default valuenullDetails
Type
object
Access
protected  
>VPropertyprotectedobject $oXML = null
SimpleXML object
Default valuenullDetails
Type
object
Access
protected  
>VPropertyprotectedstring $sBackendLanguage = ""
Current backend language
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sCacheDirectory = ""
Contains the cache path.
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sMinorRelease = ""
Minor release for the simplexml xpath() method
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sRSSContent = ""
Content of the language specific RSS file
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sRSSFile = ""
Language specific RSS file
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sTimestampCacheFile = "update.txt"
Timestamp cache file
Default value"update.txt"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorHost = "www.contenido.org"
Host for vendor XML
Default value"www.contenido.org"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorHostPath = "con_version_check_feeds/"
Path to files
Default value"con_version_check_feeds/"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorRssDeFile = "rss_de.xml"
German Vendor RSS file
Default value"rss_de.xml"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorRssEnFile = "rss_en.xml"
English Vendor RSS file
Default value"rss_en.xml"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorURL = "http://www.contenido.org/de/redir"
Download URL
Default value"http://www.contenido.org/de/redir"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorVersion = ""
Current available vendor version
Default value""Details
Type
string
Access
protected  
>VPropertyprotectedstring $sVendorXMLFile = "vendor.xml"
Vendor XML file
Default value"vendor.xml"Details
Type
string
Access
protected  
>VPropertyprotectedstring $sXMLContent = ""
Content of the XML file
Default value""Details
Type
string
Access
protected  

Methods

methodpublic__construct( $aCfg,  $oUser,  $oPerm,  $oSession,  $sBackendLanguage) : void

Constructor of Contenido_UpdateNotifier

Parameters
NameTypeDescription
$aCfg
$oUser
$oPerm
$oSession
$sBackendLanguage
Details
Access
public  
methodprotectedcheckPatchLevel() : string

Checks the patch level of system and vendor version

Returns
TypeDescription
string
Details
Access
protected  
methodprotectedcheckUpdateNecessity() : void

Checks if the xml files must be loaded from the vendor host or local cache

Details
Access
protected  
methodprotecteddetectMinorRelease() : void

Detects and converts the minor release of the system version

Details
Access
protected  
methodpublicdisplayOutput() : string

Displays the rendered output

Returns
TypeDescription
string
Details
Access
public  
methodprotectedgetDownloadURL() : string

Generates the download URL

Returns
TypeDescription
string
Details
Access
protected  
methodprotectedgetHashProperty() : string

Gets the xml file hash from the property table

Returns
TypeDescription
string
Details
Access
protected  
methodprotectedgetVendorHostFiles() : array

Connects with vendor host and gets the xml files

Returns
TypeDescription
array
Details
Access
protected  
methodprotectedhandleVendorUpdate( $aXMLContent) : void

Handles the update of files coming per vendor host

Parameters
NameTypeDescription
$aXMLContent
Details
Access
protected  
methodprotectedreadVendorContent() : void

Reads the xml files from vendor host or cache and checks for file manipulations

Details
Access
protected  
methodprotectedrenderOutput( $sMessage) : string

Generates the output for the backend

Parameters
NameTypeDescription
$sMessage

string

Returns
TypeDescription
string
Details
Access
protected  
methodprotectedrenderRss( $oTpl) : \contenido

Generates the output for the rss informations

Parameters
NameTypeDescription
$oTpl
Returns
TypeDescription
\contenidotemplate object
Details
Access
protected  
methodprotectedsetCachePath() : void

Sets the cache path

Details
Access
protected  
methodprotectedsetRSSFile() : void

Sets the actual RSS file for the reader

Details
Access
protected  
methodprotectedupdateCacheFiles( $aRSSContent) : void

Updates the files in cache

Parameters
NameTypeDescription
$aRSSContent

array

Details
Access
protected  
methodprotectedupdateHashProperty( $aXMLContent) : void

Updates the xml file hash in the property table

Parameters
NameTypeDescription
$aXMLContent
Details
Access
protected  
methodprotectedupdateSystemProperty( $sAction) : void

Updates the system property for activation/deactivation requests

Parameters
NameTypeDescription
$sAction

string

Details
Access
protected  
Documentation was generated by phpDocumentor 2.0.0a12.