Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

topic.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: topic.php 6553 2001-08-22 13:13:53Z jb $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "ezarticle/classes/eztopic.php" );
28
29 if( $Command == "data" ) // return all the data in the category
30 {
31 $topic = new eZTopic();
32 if ( $topic->get( $ID ) )
33 {
34 $ReturnData = new eZXMLRPCStruct( array( "Name" => new eZXMLRPCString( $topic->name() ),
35 "Description" => new eZXMLRPCArray( $topic->description() ) ) );
36 }
37 else
38 {
39 $Error = createErrorMessage( EZERROR_NONEXISTING_OBJECT );
40 }
41 }
42 else if( $Command == "delete" )
43 {
44 $topic = new eZTopic();
45 if ( $topic->get( $ID ) )
46 {
47 $topic->delete();
48 $ReturnData = new eZXMLRPCStruct( array( "Location" => createURLStruct( "ezarticle", "topic", $ID ),
49 "UpdateType" => new eZXMLRPCString( $Command )
50 ) );
51 $Command = "update";
52 }
53 else
54 $Error = createErrorMessage( EZERROR_NONEXISTING_OBJECT );
55 }
56 else if( $Command == "storedata" )
57 {
58 if ( isset( $Data["Name"] ) && isset( $Data["Description"] ) )
59 {
60 $topic = new eZTopic();
61 if ( $ID != 0 )
62 $topic->get( $ID );
63 $topic->setName( $Data["Name"]->value() );
64 $topic->setDescription( $Data["Description"]->value() );
65 $topic->store();
66
67 $ID = $topic->id();
68 $ReturnData = new eZXMLRPCStruct( array( "Location" => createURLStruct( "ezarticle", "topic", $ID ),
69 "UpdateType" => new eZXMLRPCString( $Command )
70 ) );
71 $Command = "update";
72 }
73 else
74 $Error = createErrorMessage( EZERROR_BAD_REQUEST_DATA );
75 }
76 ?>
$topic
foreach( $authorArray as $author) $topic
Definition: admin/articleedit.php:852
eZTopic
Definition: eztopic.php:41
eZXMLRPCArray
Definition: ezxmlrpcarray.php:37
eZXMLRPCString
Definition: ezxmlrpcstring.php:37
eZXMLRPCStruct
Definition: ezxmlrpcstruct.php:37
$Error
if(isset( $EditButton)) if(!empty( $CancelButton)) if(!empty( $PreviewButton)) if( $Action=="preview") switch( $Action) $Error
Definition: ezforum/user/messageedit.php:134
$ReturnData
$ReturnData
Definition: tag.php:48
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.