[pLog-svn] r558 - in plog/trunk/class: action net

Oscar Renalias phunkphorce at gmail.com
Wed Dec 22 14:20:18 GMT 2004


this a big, unplanned and annoying change this late and that's why I
said that we should monitor it closely... Please report any problems
with this!! (try to enable 'custom urls')

Oscar


On Wed, 22 Dec 2004 14:09:13 +0000 (GMT), oscar at devel.plogworld.net
<oscar at devel.plogworld.net> wrote:
> Author: oscar
> Date: 2004-12-22 14:09:13 +0000 (Wed, 22 Dec 2004)
> New Revision: 558
> 
> Modified:
>    plog/trunk/class/action/blogaction.class.php
>    plog/trunk/class/action/defaultaction.class.php
>    plog/trunk/class/action/resourceserveraction.class.php
>    plog/trunk/class/action/viewalbumaction.class.php
>    plog/trunk/class/action/viewarticleaction.class.php
>    plog/trunk/class/action/viewarticletrackbacksaction.class.php
>    plog/trunk/class/action/viewresourceaction.class.php
>    plog/trunk/class/net/customurlhandler.class.php
> Log:
> fixed issue http://bugs.plogworld.net/view.php?id=90, where the current implementation would mistake a category name as "123123" as a category id instead of a category name and of course, it wasn't working...
> I had to change the implementation and whenever there is an id, suchas articleId keep it and add a new one called articleName whenever an article is referred by name (and articleCategoryName, albumName, blogName, etc) All the changes to the core have been done but we should monitor this close in case it causes any problems!!!
> 
> Modified: plog/trunk/class/action/blogaction.class.php
> ===================================================================
> --- plog/trunk/class/action/blogaction.class.php        2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/blogaction.class.php        2004-12-22 14:09:13 UTC (rev 558)
> @@ -143,18 +143,20 @@
> 
>                                 $this->log->debug($result);
>                         }
> +
> +               $blogId = $this->_request->getValue( 'blogId' );
> +               $blogName = $this->_request->getValue( 'blogName' );
> +               $userId = $this->_request->getValue( 'userId' );
> +               $userName = $this->_request->getValue( 'userName' );
> 
>              // if there is a "blogId" parameter, it takes precedence over the
>              // "user" parameter.
> -            if( $this->_request->getValue('blogId'))
> -               $blogId = $this->_request->getValue('blogId');
> -            else {
> +           if( !$blogId && !$blogName ) {
>                 // check if there was a user parameter
> -                $userParam = $this->_request->getValue( 'user' );
>                  if( $userParam ) {
>                         // if so, check to which blogs the user belongs
>                         $users = new Users();
> -                       $userInfo = $users->getUserInfoFromUsername( $userParam );
> +                       $userInfo = $users->getUserInfoFromUsername( $userName );
>                      // if the user exists and is valid...
>                         if( $userInfo ) {
>                         $userBlogs = $users->getUsersBlogs( $userInfo->getId());
> @@ -175,10 +177,10 @@
> 
>              // fetch the BlogInfo object
>              $blogs = new Blogs();
> -            if( is_numeric($blogId))
> +            if( $blogId )
>                  $this->_blogInfo = $blogs->getBlogInfo( $blogId );
>              else
> -                $this->_blogInfo = $blogs->getBlogInfoByName( $blogId );
> +                $this->_blogInfo = $blogs->getBlogInfoByName( $blogName );
> 
>              // security checks...
>              if( $this->_blogInfo == false ) {
> 
> Modified: plog/trunk/class/action/defaultaction.class.php
> ===================================================================
> --- plog/trunk/class/action/defaultaction.class.php     2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/defaultaction.class.php     2004-12-22 14:09:13 UTC (rev 558)
> @@ -21,7 +21,9 @@
>                 var $_config;
>          var $_date;
>          var $_categoryId;
> +               var $_categoryName;
>                 var $_userId;
> +               var $_userName;
>                 var $_postAmount;
> 
>                 function DefaultAction( $actionInfo, $request )
> @@ -34,6 +36,7 @@
>              // value of the Date parameter from the request
>              $this->_date = $this->_request->getValue( "Date", -1 );
> 
> +               $this->_categoryName = $this->_request->getValue( 'postCategoryName' );
>              $this->_categoryId = $this->_request->getValue( 'postCategoryId' );
>              if( $this->_categoryId == '' )
>                 if( $this->_date == -1 )
> @@ -42,6 +45,7 @@
>                         $this->_categoryId = -1;
> 
>                         $this->_userId = $this->_request->getValue( 'userId', -1 );
> +                       $this->_userName = $this->_request->getValue( 'userName' );
> 
>              return true;
>          }
> @@ -60,9 +64,11 @@
>              // prepare the view
>                 $this->_view = new DefaultView( $this->_blogInfo,
>                                                         Array( "categoryId" => $this->_categoryId,
> -                                                                                              "blogId" => $this->_blogInfo->getId(),
> -                                                                                                  "date" => $this->_date,
> -                                                                                                  "userId" => $this->_userId ));
> +                                                              "blogId" => $this->_blogInfo->getId(),
> +                                                              "categoryName" => $this->_categoryName,
> +                                                          "date" => $this->_date,
> +                                                          "userName" => $this->_userName,
> +                                                          "userId" => $this->_userId ));
> 
>                         // check if everything's cached because if it is, then we don't have to
>                         // do any work... it's already been done before and we should "safely" assume
> @@ -74,9 +80,9 @@
>              // if we got a category name instead of a category id, then we
>              // should first look up this category in the database and see if
>              // it exists
> -            $categories = new ArticleCategories();
> -            if( !is_numeric($this->_categoryId)) {
> -                $category = $categories->getCategoryByName( $this->_categoryId, $this->_blogInfo->getId());
> +            $categories = new ArticleCategories();
> +            if( $this->_categoryName ) {
> +                $category = $categories->getCategoryByName( $this->_categoryName, $this->_blogInfo->getId());
>                  if( !$category ) {
>                      $this->_view = new ErrorView( $this->_blogInfo );
>                      $this->_view->setValue( 'message', "error_incorrect_category_id" );
> @@ -106,9 +112,9 @@
>              // if we got a user name instead of a user id, then we
>              // should first look up this user in the database and see if
>              // it exists
> -            if( is_string($this->_userId)) {
> +            if( $this->_userName ) {
>                                 $users = new Users();
> -                $user = $users->getUserInfoFromUsername( $this->_userId );
> +                $user = $users->getUserInfoFromUsername( $this->_userName );
>                  if( !$user ) {
>                      $this->_view = new ErrorView( $this->_blogInfo );
>                      $this->_view->setValue( 'message', 'error_incorrect_user_id' );
> @@ -119,6 +125,9 @@
>                  // if everything went fine...
>                  $this->_userId = $user->getId();
>              }
> +
> +               // export the user
> +               $this->_view->setValue( "user", $user );
> 
>              $t = new Timestamp();
>              $todayTimestamp = $t->getTimestamp();
> 
> Modified: plog/trunk/class/action/resourceserveraction.class.php
> ===================================================================
> --- plog/trunk/class/action/resourceserveraction.class.php      2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/resourceserveraction.class.php      2004-12-22 14:09:13 UTC (rev 558)
> @@ -38,9 +38,12 @@
>           */
>          function _getBlogInfo()
>          {
> +               $blogId = $this->_config->getValue('default_blog_id');
> +
>                         // see if we're using subdomains
> -                       if( $this->_config->getValue( "subdomains_enabled" )) {
> -                               $url = new Url( $this->_config->getValue( "subdomains_base_url"));
> +                       $config =& Config::getConfig();
> +                       if( $config->getValue( "subdomains_enabled" )) {
> +                               $url = new Url( $config->getValue( "subdomains_base_url"));
>                                 $lp =  new LinkParser( $url->getHost());
>                                 $server = HttpVars::getServer();
>                                 $httpHost = $server["HTTP_HOST"];
> @@ -50,19 +53,23 @@
>                                         $this->_request->setValue( 'user', $result["username"] );
>                                 if( $result["blogname"] != "" && $this->_request->getValue( 'blogId' ) == "" )
>                                         $this->_request->setValue( 'blogId', $result["blogname"] );
> +
> +                               $this->log->debug($result);
>                         }
> +
> +               $blogId = $this->_request->getValue( 'blogId' );
> +               $blogName = $this->_request->getValue( 'blogName' );
> +               $userId = $this->_request->getValue( 'userId' );
> +               $userName = $this->_request->getValue( 'userName' );
> 
>              // if there is a "blogId" parameter, it takes precedence over the
>              // "user" parameter.
> -            if( $this->_request->getValue('blogId'))
> -               $blogId = $this->_request->getValue('blogId');
> -            else {
> +           if( !$blogId && !$blogName ) {
>                 // check if there was a user parameter
> -                $userParam = $this->_request->getValue( 'user' );
>                  if( $userParam ) {
>                         // if so, check to which blogs the user belongs
>                         $users = new Users();
> -                       $userInfo = $users->getUserInfoFromUsername( $userParam );
> +                       $userInfo = $users->getUserInfoFromUsername( $userName );
>                      // if the user exists and is valid...
>                         if( $userInfo ) {
>                         $userBlogs = $users->getUsersBlogs( $userInfo->getId());
> @@ -73,14 +80,20 @@
>                          }
>                      }
>                  }
> +                else {
> +                    // if there is no user parameter, we take the blogId from the session
> +                    if( $this->_session->getValue('blogId') != '' ) {
> +                       $blogId = $this->_session->getValue('blogId');
> +                    }
> +                }
>              }
> 
>              // fetch the BlogInfo object
>              $blogs = new Blogs();
> -            if( is_numeric($blogId))
> +            if( $blogId )
>                  $this->_blogInfo = $blogs->getBlogInfo( $blogId );
>              else
> -                $this->_blogInfo = $blogs->getBlogInfoByName( $blogId );
> +                $this->_blogInfo = $blogs->getBlogInfoByName( $blogName );
>          }
> 
>                 function validate()
> @@ -123,14 +136,15 @@
>                         $this->_resName = $this->_request->getValue( "resource" );
>                         $this->_resId = $this->_request->getValue( "resId" );
>                         $this->_albumId = $this->_request->getValue( "albumId" );
> +                       $this->_albumName = $this->_request->getValue( "albumName" );
>                         $this->_mode = $this->_request->getValue( "mode" );
> 
>                         // check if we need to load the album to figure out the correct album id
>                         // because we got an album name instead of an album id
> -                       if( !empty($this->_albumId)) {
> -                               if( !is_numeric($this->_albumId)) {
> +                       if( !empty($this->_albumId) || !empty($this->_albumName)) {
> +                               if( $this->_albumName ) {
>                                         $albums = new GalleryAlbums();
> -                                       $album = $albums->getAlbumByName( $this->_albumId );
> +                                       $album = $albums->getAlbumByName( $this->_albumName );
>                                         if( !$album ) {
>                                                 $this->_view = new ResourceServerView();
>                                                 $this->_view->addHeaderResponse( "HTTP/1.1 404 Not Found" );
> 
> Modified: plog/trunk/class/action/viewalbumaction.class.php
> ===================================================================
> --- plog/trunk/class/action/viewalbumaction.class.php   2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/viewalbumaction.class.php   2004-12-22 14:09:13 UTC (rev 558)
> @@ -31,12 +31,9 @@
>          // checks that the articleId is valid
>          function validate()
>          {
> -               $this->_albumId = $this->_request->getValue( "albumId" );
> +               $this->_albumId = $this->_request->getValue( "albumId", 0 );
> +               $this->_albumName = $this->_request->getValue( "albumName" );
> 
> -                       if( !$this->_albumId ) {
> -                               $this->_albumId = 0;
> -                       }
> -
>              return true;
>          }
> 
> @@ -44,9 +41,11 @@
>          {
>                 $galleryResources = new GalleryResources();
>              $galleryAlbums = new GalleryAlbums();
> +
> +               $browseRootAlbum = ( $this->_albumId == 0 && $this->_albumName == "" );
> 
>                         // check which template we should use
> -            if( is_numeric($this->_albumId) && $this->_albumId == 0 )
> +            if( $browseRootAlbum )
>                                 $template = VIEW_ALBUMS_TEMPLATE;
>              else
>                                 $template = VIEW_ALBUM_TEMPLATE;
> @@ -55,14 +54,14 @@
>                         $this->_view = new BlogView( $this->_blogInfo,
>                                                      $template,
>                                                                                  SMARTY_VIEW_CACHE_CHECK,
> -                                                                                Array( "albumId" => $this->_albumId ));
> +                                                                                Array( "albumId" => $this->_albumId, "albumName" => $this->_albumName ));
>                         if( $this->_view->isCached()) {
>                                 // nothing to do if it is cached!
>                                 return true;
>                         }
> 
>              // fetch the album we're trying to browse
> -            if( is_numeric($this->_albumId) && $this->_albumId == 0 ) {
> +            if( $browseRootAlbum ) {
>                 // fetch only the first level albums
>                  $blogAlbums = $galleryAlbums->getChildAlbums( 0, $this->_blogInfo->getId(), true );
>                                 if( count($blogAlbums) == 0 ) {
> @@ -77,8 +76,8 @@
>              else {
>                 // the third parameter is telling _not_ to fetch all those albums that have
>                  // been disabled and are not to be shown in the page when browsing the album
> -                               if( !is_numeric($this->_albumId )) {
> -                                       $album = $galleryAlbums->getAlbumByName( $this->_albumId, $this->_blogInfo->getId(), true, true );
> +                               if( $this->_albumName ) {
> +                                       $album = $galleryAlbums->getAlbumByName( $this->_albumName, $this->_blogInfo->getId(), true, true );
>                                 }
>                                 else {
>                                         $album = $galleryAlbums->getAlbum( $this->_albumId, $this->_blogInfo->getId(), true, true );
> 
> Modified: plog/trunk/class/action/viewarticleaction.class.php
> ===================================================================
> --- plog/trunk/class/action/viewarticleaction.class.php 2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/viewarticleaction.class.php 2004-12-22 14:09:13 UTC (rev 558)
> @@ -23,9 +23,12 @@
> 
>         var $_config;
>          var $_articleId;
> +       var $_articleName;
>                 var $_date;
>                 var $_userId;
> +               var $_userName;
>                 var $_categoryId;
> +               var $_categoryName;
> 
>                 function ViewArticleAction( $actionInfo, $request )
>          {
> @@ -36,11 +39,14 @@
>          function validate()
>          {
>                 $this->_articleId = $this->_request->getValue( "articleId" );
> +               $this->_articleName = $this->_request->getValue( "articleName" );
> 
>                         // find some other additional parameters and use some 'null' values
>                         // in casuse they're empty
>                         $this->_categoryId = $this->_request->getValue( "postCategoryId", -1 );
> +                       $this->_categoryName = $this->_request->getValue( "postCategoryName" );
>                         $this->_userId = $this->_request->getValue( "userId", -1 );
> +                       $this->_userName = $this->_request->getValue( "userName" );
>                         $this->_date = $this->_request->getValue( "Date", -1 );
>                         $this->_isCommentAdded = ($this->_request->getValue( "op" ) == "AddComment" );
> 
> @@ -59,8 +65,11 @@
> 
>                 $this->_view = new ViewArticleView( $this->_blogInfo,
>                                                     Array( "articleId" => $this->_articleId,
> -                                                          "categoryid" => $this->_categoryId,
> +                                                          "articleName" => $this->_articleName,
> +                                                          "categoryId" => $this->_categoryId,
> +                                                          "categoryName" => $this->_categoryName,
>                                                            "userId" => $this->_userId,
> +                                                          "userName" => $this->_userName,
>                                                            "date" => $this->_date ));
> 
>                         if( $this->_view->isCached()) {
> @@ -74,9 +83,9 @@
>                         // and then proceed
>                         // ---
>                         // users...
> -                       if( !is_numeric( $this->_userId )) {
> +                       if( $this->_userName ) {
>                                 $users = new Users();
> -                               $user = $users->getUserInfoFromUsername( $this->_userId );
> +                               $user = $users->getUserInfoFromUsername( $this->_userName );
>                                 if( !$user ) {
>                                         $this->_setErrorView();
>                                         return false;
> @@ -85,9 +94,9 @@
>                                 $this->_userId = $user->getId();
>                         }
>                         // ...and categories...
> -                       if( !is_numeric( $this->_categoryId )) {
> +                       if( $this->_categoryName ) {
>                                 $categories = new ArticleCategories();
> -                               $category = $categories->getCategoryByName( $this->_categoryId );
> +                               $category = $categories->getCategoryByName( $this->_categoryName );
>                                 if( !$category ) {
>                                         $this->_setErrorView();
>                                         return false;
> @@ -98,13 +107,13 @@
> 
>              // fetch the article
>              // the article identifier can be either its internal id number or its mangled topic
> -            if( is_numeric($this->_articleId )) {
> +            if( $this->_articleId ) {
>                  $article  = $this->articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId(), false,
>                                                                        $this->_date, $this->_categoryId, $this->_userId,
>                                                                                                            POST_STATUS_PUBLISHED );
>                         }
>              else {
> -                $article  = $this->articles->getBlogArticleByTitle( $this->_articleId, $this->_blogInfo->getId(), false,
> +                $article  = $this->articles->getBlogArticleByTitle( $this->_articleName, $this->_blogInfo->getId(), false,
>                                                                               $this->_date, $this->_categoryId, $this->_userId,
>                                                                                                                           POST_STATUS_PUBLISHED );
>                         }
> 
> Modified: plog/trunk/class/action/viewarticletrackbacksaction.class.php
> ===================================================================
> --- plog/trunk/class/action/viewarticletrackbacksaction.class.php       2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/viewarticletrackbacksaction.class.php       2004-12-22 14:09:13 UTC (rev 558)
> @@ -22,8 +22,11 @@
>         {
> 
>          var $_articleId;
> +       var $_articleName;
>                 var $_categoryId;
> +               var $_categoryName;
>                 var $_userId;
> +               var $_userName;
>                 var $_date;
> 
>                 function ViewArticleTrackbacksAction( $actionInfo, $request )
> @@ -35,8 +38,11 @@
>          function validate()
>          {
>                 $this->_articleId = $this->_request->getValue( "articleId" );
> +               $this->_articleName = $this->_request->getValue( "articleName" );
>                         $this->_categoryId = $this->_request->getValue( "postCategoryId", -1 );
> +                       $this->_categoryName = $this->_request->getValue( "postCategoryName" );
>                         $this->_userId     = $this->_request->getValue( "userId", -1 );
> +                       $this->_userName     = $this->_request->getValue( "userName" );
>                         $this->_date       = $this->_request->getValue( "Date", -1 );
> 
>              return true;
> @@ -48,8 +54,11 @@
>                                              VIEW_TRACKBACKS_TEMPLATE,
>                                              SMARTY_VIEW_CACHE_CHECK,
>                                              Array( "articleId" => $this->_articleId,
> +                                                   "articleName" => $this->_articleName,
> +                                                   "categoryName" => $this->_categoryName,
>                                                     "categoryId" => $this->_categoryId,
>                                                     "userId" => $this->_userId,
> +                                                   "userName" => $this->_userName,
>                                                     "date" => $this->_date ));
> 
>                          if( $this->_view->isCached()) {
> @@ -62,9 +71,9 @@
>                         // and then proceed
>                         // ---
>                         // users...
> -                       if( !is_numeric( $this->_userId )) {
> +                       if( $this->_userName ) {
>                                 $users = new Users();
> -                               $user = $users->getUserInfoFromUsername( $this->_userId );
> +                               $user = $users->getUserInfoFromUsername( $this->_userName );
>                                 if( !$user ) {
>                                         $this->_setErrorView();
>                                         return false;
> @@ -73,9 +82,9 @@
>                                 $this->_userId = $user->getId();
>                         }
>                         // ...and categories...
> -                       if( !is_numeric( $this->_categoryId )) {
> +                       if( $this->_categoryName ) {
>                                 $categories = new ArticleCategories();
> -                               $category = $categories->getCategoryByName( $this->_categoryId );
> +                               $category = $categories->getCategoryByName( $this->_categoryName );
>                                 if( !$category ) {
>                                         $this->_setErrorView();
>                                         return false;
> @@ -86,12 +95,12 @@
> 
>              // fetch the article
>              $articles = new Articles();
> -                       if( is_numeric( $this->_articleId )) {
> +                       if( $this->_articleId ) {
>                                 $article  = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId(),
>                                                                        false, $this->_date, $this->_categoryId, $this->_userId );
>                         }
>                         else {
> -                               $article = $articles->getBlogArticleByTitle( $this->_articleId, $this->_blogInfo->getId(),
> +                               $article = $articles->getBlogArticleByTitle( $this->_articleName, $this->_blogInfo->getId(),
>                                                                            false, $this->_date, $this->_categoryId, $this->_userId );
>                         }
> 
> Modified: plog/trunk/class/action/viewresourceaction.class.php
> ===================================================================
> --- plog/trunk/class/action/viewresourceaction.class.php        2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/action/viewresourceaction.class.php        2004-12-22 14:09:13 UTC (rev 558)
> @@ -20,6 +20,7 @@
> 
>          var $_resourceId;
>                 var $_albumId;
> +               var $_albumName;
>                 var $_resourceName;
> 
>                 function ViewResourceAction( $actionInfo, $request )
> @@ -33,6 +34,7 @@
>                 $this->_resourceId = $this->_request->getValue( "resId" );
>              $this->_resourceName = $this->_request->getValue( "resource" );
>                         $this->_albumId = $this->_request->getValue( "albumId" );
> +                       $this->_albumName = $this->_request->getValue( "albumName" );
> 
>              if( $this->_resourceName == "" ) {
>                 $validator = new IntegerValidator();
> @@ -46,7 +48,7 @@
>              }
> 
>                         // if no album id parameter in the url, forget about the whole thing
> -                       if( $this->_albumId == "" )
> +                       if( $this->_albumId == "" && $this->_albumName == "")
>                                 $this->_albumId = -1;
> 
>              return true;
> @@ -62,6 +64,7 @@
>                                                                                  VIEW_RESOURCE_TEMPLATE,
>                                                                                  Array( "resourceId" => $this->_resourceId,
>                                                                                         "resourceName" => $this->_resourceName,
> +                                                                                       "albumName" => $this->_albumName,
>                                                                                         "albumId" => $this->_albumId ));
>                         // if it's cached, do nothing
>                         if( $this->_view->isCached()) {
> @@ -71,8 +74,8 @@
>                         // otherwise continue as normal...
> 
>                         // try to find the album to which this resource belongs
> -                       if( !is_numeric($this->_albumId )) {
> -                               $album = $galleryAlbums->getAlbumByName( $this->_albumId, $this->_blogInfo->getId(), false, true );
> +                       if( $this->_albumName ) {
> +                               $album = $galleryAlbums->getAlbumByName( $this->_albumName, $this->_blogInfo->getId(), false, true );
>                                 if( !$album ) {
>                                         $this->_view = new ErrorView( $this->_blogInfo );
>                                         $this->_view->setValue( "message", "error_fetching_resource" );
> 
> Modified: plog/trunk/class/net/customurlhandler.class.php
> ===================================================================
> --- plog/trunk/class/net/customurlhandler.class.php     2004-12-22 12:47:12 UTC (rev 557)
> +++ plog/trunk/class/net/customurlhandler.class.php     2004-12-22 14:09:13 UTC (rev 558)
> @@ -50,35 +50,35 @@
>                                 $this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
>                                 $this->_params["op"] = "ViewArticle";
>                                 $this->_vars = Array( "postid" => "articleId",
> -                                                          "postname" => "articleId",
> +                                                          "postname" => "articleName",
>                                                            "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "userid" => "userId",
> -                                                          "username" => "userId",
> +                                                          "username" => "userName",
>                                                            "catid" => "postCategoryId",
> -                                                          "catname" => "postCategoryId",
> +                                                          "catname" => "postCategoryName",
>                                                            "date" => "Date" );
>                         }
>                         elseif( $this->_format == "blog_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["op"] = "Default";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId" );
> +                                                          "blogname" => "blogName" );
>                         }
>                         elseif( $this->_format == "category_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["op"] = "Default";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "catid" => "postCategoryId",
> -                                                          "catname" => "postCategoryId" );
> +                                                          "catname" => "postCategoryName" );
>                         }
>                         elseif( $this->_format == "archive_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
>                                 $this->_params["op"] = "Default";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "date" => "Date" );
>                         }
>                         elseif( $this->_format == "user_posts_link_format" ) {
> @@ -86,25 +86,25 @@
>                                 $this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
>                                 $this->_params["op"] = "Default";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "date" => "Date",
>                                                            "userid" => "userId",
>                                                            "catid" => "postCategoryId",
> -                                                          "catname" => "postCategoryId",
> -                                                          "username" => "userId" );
> +                                                          "catname" => "postCategoryName",
> +                                                          "username" => "userName" );
>                         }
>                         elseif( $this->_format == "post_trackbacks_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["op"] = "Trackbacks";
>                                 $this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "postid" => "articleId",
> -                                                          "postname" => "articleId",
> +                                                          "postname" => "articleName",
>                                                            "userid" => "userId",
> -                                                          "username" => "userId",
> +                                                          "username" => "userName",
>                                                            "catid" => "postCategoryId",
> -                                                          "catname" => "postCategoryId",
> +                                                          "catname" => "postCategoryName",
>                                                            "date" => "Date" );
>                         }
>                         elseif( $this->_format == "template_link_format" ) {
> @@ -112,32 +112,32 @@
>                                 $this->_params["op"] = "Template";
>                                 $this->_vars = Array( "templatename" => "show",
>                                                            "blogid" => "blogId",
> -                                                          "blogname" => "blogId" );
> +                                                          "blogname" => "blogName" );
>                         }
>                         elseif( $this->_format == "album_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["op"] = "ViewAlbum";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "albumid" => "albumId",
> -                                                          "albumname" => "albumId" );
> +                                                          "albumname" => "albumName" );
>                         }
>                         elseif( $this->_format == "resource_link_format" ) {
>                                 $this->_includeFile = "index.php";
>                                 $this->_params["op"] = "ViewResource";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "albumid" => "albumId",
> -                                                          "albumname" => "albumId",
> +                                                          "albumname" => "albumName",
>                                                            "resourceid" => "resId",
>                                                            "resourcename" => "resource" );
>                         }
>                         elseif( $this->_format == "resource_download_link_format" ) {
>                                 $this->_includeFile = "resserver.php";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "albumid" => "albumId",
> -                                                          "albumname" => "albumId",
> +                                                          "albumname" => "albumName",
>                                                            "resourceid" => "resId",
>                                                            "resourcename" => "resource" );
>                         }
> @@ -145,9 +145,9 @@
>                                 $this->_includeFile = "resserver.php";
>                                 $this->_params["mode"] = "preview";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "albumid" => "albumId",
> -                                                          "albumname" => "albumId",
> +                                                          "albumname" => "albumName",
>                                                            "resourceid" => "resId",
>                                                            "resourcename" => "resource",
>                                                            "mode" => "mode");
> @@ -156,9 +156,9 @@
>                                 $this->_includeFile = "resserver.php";
>                                 $this->_params["mode"] = "medium";
>                                 $this->_vars = Array( "blogid" => "blogId",
> -                                                          "blogname" => "blogId",
> +                                                          "blogname" => "blogName",
>                                                            "albumid" => "albumId",
> -                                                          "albumname" => "albumId",
> +                                                          "albumname" => "albumName",
>                                                            "resourceid" => "resId",
>                                                            "resourcename" => "resource",
>                                                            "mode" => "mode");
> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list