Skip to content
Snippets Groups Projects
Commit e0a79aee authored by Brett Bieber's avatar Brett Bieber
Browse files

Add two patches. One that strips html from strings inserted into the database....

Add two patches. One that strips html from strings inserted into the database. One that makes the relatioships file compatible with php 5.3
parent f3f9bd40
No related branches found
No related tags found
No related merge requests found
Index: database.php
===================================================================
--- database.php (revision 3939)
+++ database.php (working copy)
@@ -612,6 +612,10 @@
* @return string Sanitised string
*/
function sanitise_string($string) {
+ while($string != html_entity_decode($string)) {
+ $string = html_entity_decode($string);
+ }
+ $string = strip_tags($string);
return mysql_real_escape_string(trim($string));
}
### Eclipse Workspace Patch 1.0
#P UNL_Elgg
Index: elgg/engine/lib/relationships.php
===================================================================
--- elgg/engine/lib/relationships.php (revision 3938)
+++ elgg/engine/lib/relationships.php (working copy)
@@ -60,7 +60,7 @@
* @param string $name
* @return mixed
*/
- protected function __get($name) {
+ public function __get($name) {
if (isset($this->attributes[$name]))
return $this->attributes[$name];
@@ -74,7 +74,7 @@
* @param mixed $value
* @return mixed
*/
- protected function __set($name, $value) {
+ public function __set($name, $value) {
$this->attributes[$name] = $value;
return true;
}
# Make a directory for elgg data files outside the root
mkdir elgg_data
mkdir elgg_data &> /dev/null
#Do patches
cd elgg
patch -p0 < ../patches/lowercase_post.diff
cd mod/groups
patch -p0 < ../../../patches/add_closing_labels.diff
patch -p0 -s -N -r tmp.rej < patches/relationship_get_set_public.diff > /dev/null
patch -p0 -s -N -d elgg -r tmp.rej < patches/lowercase_post.diff > /dev/null
patch -p0 -s -N -d elgg/engine/lib -r tmp.rej < patches/database_strip_html.diff > /dev/null
patch -p0 -s -N -d elgg/mod/groups -r tmp.rej < patches/add_closing_labels.diff > /dev/null
rm tmp.rej
echo 'Setup successful'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment