Modified:
trunk/schoorbs-includes/database/mysql.php
trunk/schoorbs-includes/database/mysqli.php
trunk/schoorbs-includes/database/pgsql.php
trunk/schoorbs-includes/global.functions.php
trunk/schoorbs-includes/trailer.php
trunk/schoorbs-misc/themes/contented6/edit-area.tpl.php
trunk/schoorbs-misc/themes/contented6/search.tpl.php
trunk/schoorbs-misc/themes/contented6/view-entry.tpl.php
trunk/schoorbs-misc/themes/contented6/week-view.tpl.php
Log:
Removed a lot of uneeded code
Modified: trunk/schoorbs-includes/database/mysql.php
==============================================================================
--- trunk/schoorbs-includes/database/mysql.php (original)
+++ trunk/schoorbs-includes/database/mysql.php Wed Mar 4 15:54:47 2009
@@ -201,30 +201,6 @@
}
}
-
-/**
- * Generate non-standard SQL for LIMIT clauses:
- *
- * @return string
- * @param $count int
- * @param $offset int
- */
-function sql_syntax_limit($count, $offset)
-{
- return " LIMIT $offset,$count ";
-}
-
-/**
- * Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
- *
- * @return string
- * @param $fieldname string
- */
-function sql_syntax_timestamp_to_unix($fieldname)
-{
- return " UNIX_TIMESTAMP($fieldname) ";
-}
-
/**
* Escapes an SQL parameter
*
Modified: trunk/schoorbs-includes/database/mysqli.php
==============================================================================
--- trunk/schoorbs-includes/database/mysqli.php (original)
+++ trunk/schoorbs-includes/database/mysqli.php Wed Mar 4 15:54:47 2009
@@ -198,30 +198,6 @@
}
}
-
-/**
- * Generate non-standard SQL for LIMIT clauses:
- *
- * @return string
- * @param $count int
- * @param $offset int
- */
-function sql_syntax_limit($count, $offset)
-{
- return " LIMIT $offset,$count ";
-}
-
-/**
- * Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
- *
- * @return string
- * @param $fieldname string
- */
-function sql_syntax_timestamp_to_unix($fieldname)
-{
- return " UNIX_TIMESTAMP($fieldname) ";
-}
-
/**
* Escapes a string for use as a SQL parameter
*
Modified: trunk/schoorbs-includes/database/pgsql.php
==============================================================================
--- trunk/schoorbs-includes/database/pgsql.php (original)
+++ trunk/schoorbs-includes/database/pgsql.php Wed Mar 4 15:54:47 2009
@@ -239,30 +239,6 @@
}
}
-//
-/**
- * Generate non-standard SQL for LIMIT clauses.
- *
- * @param int $count the number of rows which will be fetched
- * @param int $offset
- * @return string String that could be used in a SQL-Query
- */
-function sql_syntax_limit($count, $offset)
-{
- return " LIMIT $count OFFSET $offset ";
-}
-
-/**
- * Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
- *
- * @param string $fieldname The name of the field containing the date
information
- * @return string String that could be used in a SQL-Query
- */
-function sql_syntax_timestamp_to_unix($fieldname)
-{
- return " DATE_PART('epoch', $fieldname) ";
-}
-
/**
* Escapes an SQL parameter
*
Modified: trunk/schoorbs-includes/global.functions.php
==============================================================================
--- trunk/schoorbs-includes/global.functions.php (original)
+++ trunk/schoorbs-includes/global.functions.php Wed Mar 4 15:54:47 2009
@@ -63,17 +63,6 @@
}
/**
- * Get the local day name based on language. Note 2000-01-02 is a Sunday.
- *
- * @param int $daynumber
- * @return string
- */
-function day_name($daynumber)
-{
- return utf8_strftime('%A', mktime(0,0,0,1,2+$daynumber,2000));
-}
-
-/**
* If crossing dst determine if you need to make a modification
* of 3600 seconds (1 hour) in either direction.
*
@@ -95,17 +84,4 @@
$modification = 0;
return $modification;
-}
-
-/**
- * Alias for htmlentities
- *
- * @author Uwe L. Korn <uw...@xhochy.org>
- * @param string the text which should be escaped
- * @param int $nQuoteStyle
- * @param string $sCharset
- */
-function ht($sCode, $nQuoteStyle = ENT_COMPAT, $sCharset = 'UTF-8')
-{
- return htmlentities($sCode, $nQuoteStyle, $sCharset);
}
Modified: trunk/schoorbs-includes/trailer.php
==============================================================================
--- trunk/schoorbs-includes/trailer.php (original)
+++ trunk/schoorbs-includes/trailer.php Wed Mar 4 15:54:47 2009
@@ -79,7 +79,7 @@
echo "</div>";
// Include a link to view this page in printing mode
- echo '<div id="schoorbs-footer-pview"><a href="' .
basename($_SERVER['PHP_SELF']) . '?' .
ht($_SERVER['QUERY_STRING']) . '&pview=1">' . get_vocab("ppreview");
+ echo '<div id="schoorbs-footer-pview"><a href="' .
basename($_SERVER['PHP_SELF']) . '?' .
htmlentities($_SERVER['QUERY_STRING']) . '&pview=1">' .
get_vocab("ppreview");
}
?></a>
</div>
Modified: trunk/schoorbs-misc/themes/contented6/edit-area.tpl.php
==============================================================================
--- trunk/schoorbs-misc/themes/contented6/edit-area.tpl.php (original)
+++ trunk/schoorbs-misc/themes/contented6/edit-area.tpl.php Wed Mar 4
15:54:47 2009
@@ -3,7 +3,7 @@
<br /><br />
<div class="form">
<form method="post" action="<?php echo
self::makeInternalUrl('edit-area.php', array('area' =>
$area->getId())); ?>">
- <label for="area-name"><?php echo get_vocab('name'); ?></label>
<input type="text" id="area-name" name="area-name" value="<?php echo
ht($area->getName()); ?>" />
+ <label for="area-name"><?php echo get_vocab('name'); ?></label>
<input type="text" id="area-name" name="area-name" value="<?php echo
htmlentities($area->getName()); ?>" />
<br />
<input type="submit"value="<?php echo get_vocab('change'); ?>" />
</form>
Modified: trunk/schoorbs-misc/themes/contented6/search.tpl.php
==============================================================================
--- trunk/schoorbs-misc/themes/contented6/search.tpl.php (original)
+++ trunk/schoorbs-misc/themes/contented6/search.tpl.php Wed Mar 4
15:54:47 2009
@@ -77,9 +77,9 @@
.Lang::_(date('F', $oEntry->getEndTime())).' '
.date('Y H:i', $oEntry->getEndTime()); ?>)
<p>
- <?php $aOut = str_split($oEntry->getDescription(), 100); echo
ht($aOut[0]); ?>
+ <?php $aOut = str_split($oEntry->getDescription(), 100); echo
htmlentities($aOut[0]); ?>
<a href="view-entry.php?id=<?php echo
$oEntry->getId(); ?>">...</a>
- <br /><em><?php echo Lang::_('Booked by'); ?> <strong><?php echo
ht($oEntry->getCreateBy()); ?></strong></em>
+ <br /><em><?php echo Lang::_('Booked by'); ?> <strong><?php echo
htmlentities($oEntry->getCreateBy()); ?></strong></em>
</p>
</li>
<?php } ?>
Modified: trunk/schoorbs-misc/themes/contented6/view-entry.tpl.php
==============================================================================
--- trunk/schoorbs-misc/themes/contented6/view-entry.tpl.php (original)
+++ trunk/schoorbs-misc/themes/contented6/view-entry.tpl.php Wed Mar 4
15:54:47 2009
@@ -1,5 +1,5 @@
<div class="vevent">
- <h3 class="summary"><?php echo ht($entry->getName()); ?></h3>
+ <h3 class="summary"><?php echo htmlentities($entry->getName()); ?></h3>
<table border="0" class="vevent">
<tr>
<td><strong><?php echo get_vocab('description'); ?></strong></td>
Modified: trunk/schoorbs-misc/themes/contented6/week-view.tpl.php
==============================================================================
--- trunk/schoorbs-misc/themes/contented6/week-view.tpl.php (original)
+++ trunk/schoorbs-misc/themes/contented6/week-view.tpl.php Wed Mar 4
15:54:47 2009
@@ -81,9 +81,9 @@
.Lang::_(date('F', $oEntry->getEndTime())).' '
.date('Y H:i', $oEntry->getEndTime()); ?>)
<p>
- <?php $aOut = str_split($oEntry->getDescription(), 100); echo
ht($aOut[0]); ?>
+ <?php $aOut = str_split($oEntry->getDescription(), 100); echo
htmlentities($aOut[0]); ?>
<a href="view-entry.php?id=<?php echo $oEntry->getId(); ?>">...</a>
- <br /><em><?php echo Lang::_('Booked by'); ?> <strong><?php echo
ht($oEntry->getCreateBy()); ?></strong></em>
+ <br /><em><?php echo Lang::_('Booked by'); ?> <strong><?php echo
htmlentities($oEntry->getCreateBy()); ?></strong></em>
</p>
</li>
<?php } ?>