Patch for making the code work with PHP5.3

 * changed arrays
 * updated post_to_posts
 * removed self to fetch global variable
 * added $this-> to call a function of this class