An action to obtain a judgment, restraining and preventing any illegal expenditure of, waste of, or injury to, the estate, funds, or other property of a county, town, city or city and county of the state, may be maintained against any officer thereof, or any agent, or other person, acting in its behalf, either by a citizen resident therein, or by a corporation, who is assessed for and is liable to pay, or, within one year before the commencement of the action, has paid, a tax therein. This section does not affect any right of action in favor of a county, city, town, or city and county, or any public officer; provided, that no injunction shall be granted restraining the
offering for sale, sale, or issuance of any municipal bonds for public improvements or public utilities.
An action brought pursuant to this section to enjoin a public improvement project shall take special precedence over all civil matters on the calendar of the court except those matters to which equal precedence on the calendar is granted by law.