rss hack for full content migration
authorAlexandros C. Couloumbis <alex@ozo.com>
Wed, 27 Nov 2019 16:01:51 +0000 (18:01 +0200)
committerAlexandros C. Couloumbis <alex@ozo.com>
Wed, 27 Nov 2019 16:01:51 +0000 (18:01 +0200)
class/action/rssaction.class.php
rss2.php [new file with mode: 0644]

index 98d4f30e6ca9cf56d499f1b7a7442122c4f16c2b..58abe66452c0403ae0bbaaf68cab0db8573c2be5 100644 (file)
 
             // fetch the posts, though we are going to fetch the same amount in both branches
                        $hardLimit = SiteConfig::getHardRecentPostsMax();
-                       $amount = $blogSettings->getValue( "recent_posts_max", 15 );                    
+                       if (defined('TSUNG')) {
+                               $hardLimit = 30000;
+                               $amount = 30000;
+                       } else {
+                               $amount = $blogSettings->getValue( "recent_posts_max", 15 );                    
+                       }
                        if( $amount > $hardLimit ) $amount = $hardLimit;
 
                        $t = new Timestamp();
             return true;
         }
     }
-?>
\ No newline at end of file
+?>
diff --git a/rss2.php b/rss2.php
new file mode 100644 (file)
index 0000000..f7fa42a
--- /dev/null
+++ b/rss2.php
@@ -0,0 +1,46 @@
+<?php
+
+    define('TSUNG', 1);
+
+    if (!defined( "PLOG_CLASS_PATH" )) {
+        define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
+    }
+
+       include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
+    lt_include( PLOG_CLASS_PATH."class/controller/controller.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/session/sessioninfo.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/session/sessionmanager.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
+       lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+
+    // create our own action map
+    $actionMap = Array( "Default" => "RssAction" );
+    $controller = new Controller( $actionMap, "op" );
+       
+       $request = HttpVars::getRequest();
+       if( isset($request["summary"])) {
+               $request["op"] = "rss";
+               HttpVars::setRequest( $request );
+               lt_include( PLOG_CLASS_PATH."summary.php" );
+               die();
+       }
+
+    //
+    // if there is no session object, we better create one
+    //
+    SessionManager::Init();
+    $session = HttpVars::getSession();
+    if( empty( $session["SessionInfo"] ) ) {
+        $session["SessionInfo"] = new SessionInfo();
+        HttpVars::setSession( $session );
+    }
+       
+    // load the plugins, this needs to be done *before* we call the
+    // Controller::process() method, as some of the plugins _might_
+    // add new actions to the controller
+    $pluginManager =& PluginManager::getPluginManager();
+    $pluginManager->loadPlugins();     
+
+    // and call the controller
+    $controller->process( HttpVars::getRequest());
+?>