Subversion Repositories eFlore/Applications.cel

Rev

Rev 862 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 862 Rev 995
Line 95... Line 95...
95
				$temp = rtrim( str_replace('.', '. ', $temp) );
95
				$temp = rtrim( str_replace('.', '. ', $temp) );
96
				$this->debug['parse_auth'][] = "4 (temp:$temp)";
96
				$this->debug['parse_auth'][] = "4 (temp:$temp)";
Line 97... Line 97...
97
				
97
				
98
				//normalise "et", "and" to ampersand (et al. is a special case)
98
				//normalise "et", "and" to ampersand (et al. is a special case)
99
//				if ( $temp like '% et al%' ) {
99
//				if ( $temp like '% et al%' ) {
100
				if ( ereg(' et al', $temp) ) {
100
				if ( preg_match('/ et al/', $temp) ) {
101
					$temp = str_replace(' et al','zzzzz', $temp);
101
					$temp = str_replace(' et al','zzzzz', $temp);
102
					$this->debug['parse_auth'][] = "4a (temp:$temp)";
102
					$this->debug['parse_auth'][] = "4a (temp:$temp)";
Line 103... Line -...
103
				}
-
 
104
				
-
 
105
//				$temp = str_replace(temp,' et ',' '||'&'||' ');
103
				}
106
//				$temp = replace(temp,' and ',' '||'&'||' ');
104
				
107
				$temp = str_replace(' et ',' & ', $temp );
-
 
108
				$temp = str_replace(' and ',' & ', $temp );
-
 
-
 
105
				$temp = str_replace(' et ',' & ', $temp );
109
//				if ( $temp like '%zzzzz%' ) {
106
				$temp = str_replace(' and ',' & ', $temp );
110
//				if ( ereg('zzzzz', $temp) ) {
-
 
Line 111... Line 107...
111
				$temp = str_replace('zzzzz',' et al', $temp);
107
 
Line 112... Line 108...
112
//				}
108
				$temp = str_replace('zzzzz',' et al', $temp);
113
 
109
 
114
				$this->debug['parse_auth'][] = "5 (temp:$temp)";
110
				$this->debug['parse_auth'][] = "5 (temp:$temp)";
115
				
111
				
116
				//remove commas before dates (only)
112
				//remove commas before dates (only)
117
				//	like '%, 17%'
113
				//	like '%, 17%'
Line 118... Line 114...
118
				if ( ereg(', 17', $temp) ) {
114
				if ( preg_match('/, 17/', $temp) ) {
119
					$temp = str_replace(', 17',' 17', $temp);
115
					$temp = str_replace(', 17',' 17', $temp);
120
					$this->debug['parse_auth'][] = "5a (temp:$temp)";
116
					$this->debug['parse_auth'][] = "5a (temp:$temp)";
121
				}
117
				}
122
				
118
				
Line 123... Line 119...
123
				//	like '%, 18%'
119
				//	like '%, 18%'
124
				if ( ereg(', 18', $temp) ) {
120
				if ( preg_match('/, 18/', $temp) ) {
125
					$temp = str_replace(', 18',' 18', $temp);
121
					$temp = str_replace(', 18',' 18', $temp);
126
					$this->debug['parse_auth'][] = "5b (temp:$temp)";
122
					$this->debug['parse_auth'][] = "5b (temp:$temp)";
127
				}
123
				}
Line 128... Line 124...
128
				
124
				
129
				//	like '%, 19%'
125
				//	like '%, 19%'
130
				if ( ereg(', 19', $temp) ) {
126
				if ( preg_match('/, 19/', $temp) ) {
131
					$temp = str_replace(', 19',' 19', $temp);
127
					$temp = str_replace(', 19',' 19', $temp);
132
					$this->debug['parse_auth'][] = "5c (temp:$temp)";
128
					$this->debug['parse_auth'][] = "5c (temp:$temp)";
Line 133... Line 129...
133
				}
129
				}
Line 149... Line 145...
149
				foreach( explode(' ', $temp) as $this_word ) {
145
				foreach( explode(' ', $temp) as $this_word ) {
Line 150... Line 146...
150
				
146
				
Line 151... Line 147...
151
					$this->debug['parse_auth'][] = "7 (this_word:$this_word)";
147
					$this->debug['parse_auth'][] = "7 (this_word:$this_word)";
152
					
148
					
153
					//	like '(%'
149
					//	like '(%'
154
					if ( ereg('^\(', $this_word) ) {
150
					if ( preg_match('/^\(/', $this_word) ) {
155
						$elapsed_chars .= '(';
151
						$elapsed_chars .= '(';
156
						$this_word = substr( $this_word, 1 );
152
						$this_word = substr( $this_word, 1 );