In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000236 [In-Portal CMS] Optimization task always 2009-08-22 06:09 2010-01-11 22:05
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000236: Don't use preg_replace for removing trailing words in strings
Description Currently in some places we are using mentioned later code to strip trailing word from string:

$pos_sql = preg_replace('/(.*) OR $/', '\\1', $pos_sql)

This is not very efficient and should be replaced with code like this:

$pos_sql = substr($pos_sql, -2); // "-2" is "(-1) * strlen('OR')"
Additional Information

Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker