View Single Post
  #9  
Old 28th May 2010, 19:09
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

The permissions were only temporary.

I had tried both with and without the ().

Now it gives:
Fatal error: Call to a member function quote() on a non-object in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 280

...

OK, got it working but had to modify the ISPConfig 3 code slightly. Not sure if the modification is a work around or a bug fix. Will leave that to others to decide.

in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php the $old_rec variable is empty and not being seen as an object. Added the line "$old_rec = $new_rec;" as shown below to define it and now my script works. Comments? Does this break something else?
Code:
	public function datalogInsert($tablename, $insert_data, $index_field) {
		global $app;
		
		$old_rec = array();
		$this->query("INSERT INTO $tablename $insert_data");
		$index_value = $this->insertID();
		$new_rec = $this->queryOneRecord("SELECT * FROM $tablename WHERE $index_field = '$index_value'");
		$old_rec = $new_rec;  // Added.
		$this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec);
		
		return $index_value;
	}
Also added a shell script so can be run as root instead of from the web server. When there is confirmation that this doesn't break something else I'll post the full scripts with the entire mail_content_filters.csv attached.
__________________
System6Hosting.com, ISPConfig 3, Debian.

Last edited by BorderAmigos; 28th May 2010 at 20:51.
Reply With Quote