Changeset 506
- Timestamp:
- Apr 5, 2015 12:48:13 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/js/Utilities.js
r500 r506 70 70 71 71 /* 72 * Encode HTML by proxying content via an in-memory div, setting its inner text which jQuery automatically encodes.72 * Encode/decode HTML by proxying content via an in-memory div, setting its inner text which jQuery automatically encodes. 73 73 Then we pull the encoded contents back out. The div never exists on the page. 74 74 --------------------------------------------------------------------- 75 75 $('select').append($('<option>', { 76 76 value: value, 77 text: htmlEncode(text)77 text: Strangecode.htmlEncode(text) 78 78 })); 79 79 --------------------------------------------------------------------- 80 80 * 81 81 * @access public 82 * @version 1. 082 * @version 1.1 83 83 * @since 30 Jun 2013 84 84 */ … … 86 86 return $('<div/>').text(text).html(); 87 87 }; 88 jQuery.fn.htmlEncode = Strangecode.htmlEncode; 88 Strangecode.htmlDecode = function(text) { 89 return $('<div/>').html(value).text(); 90 }; -
trunk/lib/ACL.inc.php
r502 r506 294 294 "); 295 295 296 $app->logMsg(sprintf('Added %s node %s to parent %s .', $type, $name, $parent), LOG_INFO, __FILE__, __LINE__);296 $app->logMsg(sprintf('Added %s node %s to parent %s', $type, $name, $parent), LOG_INFO, __FILE__, __LINE__); 297 297 return mysql_insert_id($db->getDBH()); 298 298 } … … 497 497 $db->query("UPDATE $tbl SET rgt = rgt + $total_transversal_value WHERE rgt >= $new_parent_rgt AND $primary_key NOT IN ('" . join("','", $ids) . "')"); 498 498 499 $app->logMsg(sprintf('Moved %s node %s to new parent %s .', $type, $name, $new_parent), LOG_INFO, __FILE__, __LINE__);499 $app->logMsg(sprintf('Moved %s node %s to new parent %s', $type, $name, $new_parent), LOG_INFO, __FILE__, __LINE__); 500 500 return true; 501 501 } … … 566 566 567 567 $db->query("REPLACE INTO acl_tbl VALUES ('$aro_id', '$aco_id', '$axo_id', '$allow', NOW())"); 568 $app->logMsg(sprintf('Set %s: %s -> %s -> %s .', $allow, $aro, $aco, $axo), LOG_INFO, __FILE__, __LINE__);568 $app->logMsg(sprintf('Set %s: %s -> %s -> %s', $allow, $aro, $aco, $axo), LOG_INFO, __FILE__, __LINE__); 569 569 570 570 return true; … … 694 694 if (!list($access) = mysql_fetch_row($qid)) { 695 695 $this->cache->set($cache_hash, 'deny'); 696 $app->logMsg(sprintf('Access denied: %s -> %s -> %s . No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);696 $app->logMsg(sprintf('Access denied: %s -> %s -> %s (no records found).', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__); 697 697 return false; 698 698 } … … 701 701 702 702 if ('allow' == $access) { 703 $app->logMsg(sprintf('Access granted: %s -> %s -> %s .', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);703 $app->logMsg(sprintf('Access granted: %s -> %s -> %s', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__); 704 704 return true; 705 705 } else { 706 $app->logMsg(sprintf('Access denied: %s -> %s -> %s .', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);706 $app->logMsg(sprintf('Access denied: %s -> %s -> %s', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__); 707 707 return false; 708 708 }
Note: See TracChangeset
for help on using the changeset viewer.