Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1574... Línea 1574...
1574
	 *
1574
	 *
1575
	 * @noinspection PhpUnusedParameterInspection
1575
	 * @noinspection PhpUnusedParameterInspection
1576
	 */
1576
	 */
1577
	function qStr($s, $magic_quotes=false)
1577
	function qStr($s, $magic_quotes=false)
1578
	{
1578
	{
1579
		if ($this->noNullStrings && strlen($s) == 0) {
-
 
1580
			$s = ' ';
-
 
1581
		}
-
 
1582
		else if (strlen($s) == 0) {
1579
		if (strlen((string)$s) == 0) {
1583
			return "''";
1580
			return $this->noNullStrings ? "' '" : "''";
1584
		}
1581
		}
1585
		if ($this->replaceQuote[0] == '\\'){
1582
		if ($this->replaceQuote[0] == '\\'){
1586
			$s = str_replace('\\','\\\\',$s);
1583
			$s = str_replace('\\','\\\\',$s);
1587
		}
1584
		}
1588
		return  "'" . str_replace("'", $this->replaceQuote, $s) . "'";
1585
		return  "'" . str_replace("'", $this->replaceQuote, $s) . "'";