Quote from: rthrash at Jul 12, 2006, 03:56 PM
jlivingston, am I confused, or is the publishedon and publishedby values still reversed in that file you posted?
LOL...you caught that, huh?

Yeah, I noticed that zenmaster said to switch them, but if you look at the query:
$sql = "INSERT INTO $dbase.".$table_prefix."site_content(introtext,content, pagetitle, longtitle, type, description, alias, isfolder, richtext, published, parent, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, publishedon, publishedby, pub_date, unpub_date, contentType, content_dispo, donthit, menutitle, hidemenu)
VALUES('".$introtext."','".$content."', '".$pagetitle."', '".$longtitle."', '".$type."', '".$description."', '".$alias."', '".$isfolder."', '".$richtext."', '".$published."', '".$parent."', '".$template."', '".$menuindex."', '".$searchable."', '".$cacheable."', ".$modx->getLoginUserID().", ".time().", ".$modx->getLoginUserID().", ".time().", ".$publishedon.", ".$publishedby.", $pub_date, $unpub_date, '$contentType', '$contentdispo', '$donthit', '$menutitle', '$hidemenu')";
You’ll notice that the order in which the values are called matches the order in which they are inserted. I had to do a triple take at this, because zenmaster obviously knows what he’s doing. But I couldn’t see how switching would do anything but mess it up. The main thing that needed to happen was inserting the values for editedby and editedon before the two published settings, so that everything is in sync. I tested it out, both by placing a check mark in the published field and saving, and by right clicking in the document tree and selecting "Publish document" (which I understand doesn’t pertain to this method, but just to be safe). It works as expected; time gets placed in the "publishedon" field, and a user ID gets placed in "publishedby".
Please do let me know, anyone, if I have missed something. I definitely want it to be right.
Quote from: rthrash at Jul 12, 2006, 03:56 PM
Also, there was mention of altering something else later on; do we still need to consider that you think?
I’m not sure what you’re in reference to, but I’ll go as far as to say that I think the problem that I brought up in this thread has been completely resolved with this fix. I appreciate you being thorough.