[pLog-svn] r5400 - plog/branches/lifetype-1.2/class/net/xmlrpc
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Sat May 12 22:26:22 EDT 2007
Author: jondaley
Date: 2007-05-12 22:26:22 -0400 (Sat, 12 May 2007)
New Revision: 5400
Modified:
plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
Log:
cleaned up error messages
Modified: plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php 2007-05-13 02:23:03 UTC (rev 5399)
+++ plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php 2007-05-13 02:26:22 UTC (rev 5400)
@@ -76,7 +76,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if (!$userInfo) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$blogInfo = $blogsG->getBlogInfo( $blogid );
@@ -101,7 +101,7 @@
// some protection again blogs without categories
if( !$cats ) {
- return new IXR_Error(-1, 'This blog does not have categories!');
+ return new IXR_Error(-1, 'This blog does not have any categories!');
}
foreach($cats as $cat) {
@@ -152,7 +152,7 @@
$postid = $articles->addArticle($article);
if ($postid == 0) {
- return new IXR_Error(-1, 'Internal error occured creating your post!');
+ return new IXR_Error(-1, 'Internal error occurred while creating your post!');
}
// The post was successful
// Send the EVENT_POST_POST_ADD messages to the plugins
@@ -194,7 +194,7 @@
$userInfo = $users->getUserInfo( $username, $password);
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
if ($publish) {
$status = POST_STATUS_PUBLISHED;
@@ -244,7 +244,7 @@
// some protection again blogs without categories
if( !$cats ) {
- return new IXR_Error(-1, 'This blog does not have categories!');
+ return new IXR_Error(-1, 'This blog does not have any categories!');
}
if ( $catList != NULL )
@@ -320,7 +320,7 @@
$postid = $articles->addArticle($article);
if ($postid == 0){
- return new IXR_Error(-1, 'Internal error occured creating your post!');
+ return new IXR_Error(-1, 'Internal error occurred while creating your post!');
}
// The post was successful
@@ -377,7 +377,7 @@
$auth = $users->authenticateUser( $username, $password );
if (!$auth){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$blogInfo = $blogsG->getBlogInfo( $blogid );
if( !$blogInfo ) {
@@ -419,7 +419,7 @@
$auth = $users->authenticateUser( $username, $password );
if (!$auth){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$blogInfo = $blogsG->getBlogInfo( $blogid );
if( !$blogInfo ) {
@@ -464,7 +464,7 @@
$userInfo = $users->getUserInfo($username,$password);
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$item = $articles->getBlogArticle($postid,
-1, // blogId
@@ -507,7 +507,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
@@ -590,7 +590,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
// fake topic
@@ -613,7 +613,7 @@
$userInfo->getId());
if( !$article ) {
- return( new IXR_Error(-1, 'The article is not correct' ));
+ return( new IXR_Error(-1, 'The article id is not correct' ));
}
$blogInfo = $article->getBlogInfo();
@@ -672,7 +672,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
if ($publish) {
$status = POST_STATUS_PUBLISHED;
@@ -704,7 +704,7 @@
// check that the article is valid
if( !$article ) {
- return( new IXR_Error(-1, 'Incorrect article' ));
+ return( new IXR_Error(-1, 'Incorrect article id' ));
}
// see that the user can update articles
@@ -785,7 +785,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$article = $articles->getBlogArticle($postid,
-1, // blogId
@@ -796,7 +796,7 @@
// check if the article that was pulled is valid at all
if( !$article ) {
- return( new IXR_Error(-1, 'The article is not correct' ));
+ return( new IXR_Error(-1, 'The article id is not correct' ));
}
// check the permissions
@@ -849,7 +849,7 @@
$userInfo = $users->getUserInfo($username,$password);
if( !$userInfo ){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$blogInfo = $blogs->getBlogInfo( $blogid );
if( !$blogInfo ) {
@@ -903,7 +903,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$ret = array();
$list = $articles->getBlogArticles(
@@ -982,12 +982,12 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
// check if the blog id is valid
$blogInfo = $blogsG->getBlogInfo( $blogid );
if( !$blogInfo ) {
- return new IXR_Error(-1, 'The blog is not valid' );
+ return new IXR_Error(-1, 'The blog id is not valid' );
}
// and now check if the user has enough access to upload resources
@@ -1014,14 +1014,14 @@
// Open the file
if (!$handle = fopen( $tempFile, "wb" ) ) {
- return new IXR_Error(-1, 'Could not open file');
+ return new IXR_Error(-1, 'Could not open temp file');
}
// It appears that the data has already been decoded, no need to call base64_decode
$decodedBits = $file['bits'];
// Write the data to the file
if ( fwrite( $handle, $decodedBits ) === false ) {
- return new IXR_Error(-1, 'Could not write to file');
+ return new IXR_Error(-1, 'Could not write to temp file');
}
// Close the file
@@ -1066,7 +1066,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if (!$userInfo){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$ret = array();
@@ -1104,7 +1104,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if (!$userInfo){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
$blogs = $users->getUsersBlogs($userInfo->getId(), BLOG_STATUS_ACTIVE );
$ret = array();
@@ -1145,7 +1145,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ){
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
@@ -1159,7 +1159,7 @@
// check if the article is valid
if( !$item ) {
- return( new IXR_Error(-1, 'The article is not valid' ));
+ return( new IXR_Error(-1, 'The article id is not valid' ));
}
// and permissions
@@ -1196,7 +1196,7 @@
$userInfo = $users->getUserInfo( $username, $password );
if( !$userInfo ) {
- return new IXR_Error(-1, 'You did not provide the correct password');
+ return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
@@ -1209,7 +1209,7 @@
// check that the article is valid
if( !$article ) {
- return( new IXR_Error(-1, 'The article is not correct' ));
+ return( new IXR_Error(-1, 'The article id is not correct' ));
}
More information about the pLog-svn
mailing list