#include "__ifrow.h" #include "Exception.h" #include "MString.h" #include "__mysql.h" #include #include namespace jet { __ifrow::__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this, "else") { // NOT setting output=false here (an earlier version of this file // did) - that flag gates Tag::~Tag()'s own copyContainer(out, // parentOut) call, the mechanism that propagates whatever // processContainer() below actually wrote up to this tag's own // caller. 's entire purpose is to conditionally DISPLAY one // of its two branches (exactly like //, none of // which ever touch `output`) - unlike the tags that legitimately // do set it (///
/// // /, none of which have any visible content of // their own to emit), so setting it here silently discarded // EVERY 's rendered content, true branch or false, on every // single use. Confirmed live via gdb-style tracing: hasRow(), // the resolved session pointer, and container's own text were all // exactly correct at the point processContainer(container) ran - // the content just never reached parentOut because the destructor // skipped the copy. Never caught before because no real content // this session exercised an with real row data AND had // its rendered output actually inspected (account.page's own // usage always redirected before // reaching it, for lack of a login session). if(!hasContainer) throw coreutils::Exception("ifrow tag must have a container."); coreutils::MString sessionId = resolveKeyword("sessionid"); if(!global.sessionExists(sessionId)) throw coreutils::Exception("sessionid does not exist."); if(global.getSession(sessionId)->hasRow()) processContainer(container); else processContainer(container2); } }