toggleEscaping() public method

* toogleEscaping Changes the escaping status
public toggleEscaping ( $toggle = TRUE )
Example #1
0
 function __construct($toggleEscaping = true)
 {
     if ($toggleEscaping) {
         Pommo::logErrors();
         // PHP Errors are logged, turns display_errors off.
         Pommo::toggleEscaping();
         // Wraps _T and logger responses with htmlspecialchars()
     }
     $this->_output = array('success' => false, 'messages' => array(), 'errors' => array());
     $this->_successMsg = $this->_failMsg = false;
 }
Example #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with program; see the file docs/LICENSE. If not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
require '../bootstrap.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Subscribers.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Fields.php';
require_once Pommo::$_baseDir . 'classes/Pommo_Groups.php';
Pommo::init();
$logger =& Pommo::$_logger;
$dbo =& Pommo::$_dbo;
Pommo::toggleEscaping(TRUE);
$state = Pommo_API::stateInit('subscribers_manage');
$fields = Pommo_Fields::get();
$ids = FALSE;
if (!empty($_POST['ids'])) {
    $ids = explode(',', $_POST['ids']);
}
// ====== CSV EXPORT ======
if ($_POST['type'] == 'csv') {
    if (!$ids) {
        $group = new Pommo_Groups($state['group'], $state['status']);
        $subscribers = $group->members();
    } else {
        $subscribers = Pommo_Subscribers::get(array('id' => $ids));
    }
    // supply headers